Blame resolv/res_hconf.h

Packit Service 82fcde
/* Copyright (C) 1993-2018 Free Software Foundation, Inc.
Packit Service 82fcde
   This file is part of the GNU C Library.
Packit Service 82fcde
   Contributed by David Mosberger (davidm@azstarnet.com).
Packit Service 82fcde
Packit Service 82fcde
   The GNU C Library is free software; you can redistribute it and/or
Packit Service 82fcde
   modify it under the terms of the GNU Lesser General Public
Packit Service 82fcde
   License as published by the Free Software Foundation; either
Packit Service 82fcde
   version 2.1 of the License, or (at your option) any later version.
Packit Service 82fcde
Packit Service 82fcde
   The GNU C Library is distributed in the hope that it will be useful,
Packit Service 82fcde
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 82fcde
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Service 82fcde
   Lesser General Public License for more details.
Packit Service 82fcde
Packit Service 82fcde
   You should have received a copy of the GNU Lesser General Public
Packit Service 82fcde
   License along with the GNU C Library; if not, see
Packit Service 82fcde
   <http://www.gnu.org/licenses/>.  */
Packit Service 82fcde
Packit Service 82fcde
#ifndef _RES_HCONF_H_
Packit Service 82fcde
#define _RES_HCONF_H_
Packit Service 82fcde
Packit Service 82fcde
#include <netdb.h>
Packit Service 82fcde
Packit Service 82fcde
#define TRIMDOMAINS_MAX	4
Packit Service 82fcde
Packit Service 82fcde
struct hconf
Packit Service 82fcde
{
Packit Service 82fcde
  /* We keep the INITIALIZED member only for backwards compatibility.  New
Packit Service 82fcde
     code should just call _res_hconf_init unconditionally.  For this field
Packit Service 82fcde
     to be used safely, users must ensure that either (1) a call to
Packit Service 82fcde
     _res_hconf_init happens-before any load from INITIALIZED, or (2) an
Packit Service 82fcde
     assignment of zero to INITIALIZED happens-before any load from it, and
Packit Service 82fcde
     these loads use acquire MO if the intent is to skip calling
Packit Service 82fcde
     _res_hconf_init if the load returns a nonzero value.  Such acquire MO
Packit Service 82fcde
     loads will then synchronize with the release MO store to INITIALIZED
Packit Service 82fcde
     in do_init in res_hconf.c; see pthread_once for more detail.  */
Packit Service 82fcde
  int initialized;
Packit Service 82fcde
  int unused1;
Packit Service 82fcde
  int unused2[4];
Packit Service 82fcde
  int num_trimdomains;
Packit Service 82fcde
  const char *trimdomain[TRIMDOMAINS_MAX];
Packit Service 82fcde
  unsigned int flags;
Packit Service 82fcde
#  define HCONF_FLAG_INITED	(1 << 0) /* initialized? */
Packit Service 82fcde
#  define HCONF_FLAG_REORDER	(1 << 3) /* list best address first */
Packit Service 82fcde
#  define HCONF_FLAG_MULTI	(1 << 4) /* see comments for gethtbyname() */
Packit Service 82fcde
};
Packit Service 82fcde
extern struct hconf _res_hconf;
Packit Service 82fcde
Packit Service 82fcde
extern void _res_hconf_init (void) attribute_hidden;
Packit Service 82fcde
extern void _res_hconf_trim_domain (char *domain);
Packit Service 82fcde
extern void _res_hconf_trim_domains (struct hostent *hp);
Packit Service 82fcde
extern void _res_hconf_reorder_addrs (struct hostent *hp);
Packit Service 82fcde
Packit Service 82fcde
#endif /* _RES_HCONF_H_ */