Home | History | Annotate | Line # | Download | only in include
netdb.h revision 1.55.2.2
      1  1.55.2.2    bouyer /*	$NetBSD: netdb.h,v 1.55.2.2 2011/01/23 21:47:49 bouyer Exp $	*/
      2      1.12    itojun 
      3      1.12    itojun /*
      4       1.6       mrg  * Copyright (c) 1980, 1983, 1988, 1993
      5       1.6       mrg  *	The Regents of the University of California.  All rights reserved.
      6       1.1       cgd  *
      7       1.1       cgd  * Redistribution and use in source and binary forms, with or without
      8       1.1       cgd  * modification, are permitted provided that the following conditions
      9       1.1       cgd  * are met:
     10       1.1       cgd  * 1. Redistributions of source code must retain the above copyright
     11       1.1       cgd  *    notice, this list of conditions and the following disclaimer.
     12       1.1       cgd  * 2. Redistributions in binary form must reproduce the above copyright
     13       1.1       cgd  *    notice, this list of conditions and the following disclaimer in the
     14       1.1       cgd  *    documentation and/or other materials provided with the distribution.
     15      1.31       agc  * 3. Neither the name of the University nor the names of its contributors
     16       1.1       cgd  *    may be used to endorse or promote products derived from this software
     17       1.1       cgd  *    without specific prior written permission.
     18       1.1       cgd  *
     19       1.1       cgd  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     20       1.1       cgd  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     21       1.1       cgd  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     22       1.1       cgd  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     23       1.1       cgd  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     24       1.1       cgd  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     25       1.1       cgd  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     26       1.1       cgd  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     27       1.1       cgd  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     28       1.1       cgd  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     29       1.1       cgd  * SUCH DAMAGE.
     30       1.6       mrg  * -
     31       1.6       mrg  * Portions Copyright (c) 1993 by Digital Equipment Corporation.
     32      1.39  christos  *
     33       1.6       mrg  * Permission to use, copy, modify, and distribute this software for any
     34       1.6       mrg  * purpose with or without fee is hereby granted, provided that the above
     35       1.6       mrg  * copyright notice and this permission notice appear in all copies, and that
     36       1.6       mrg  * the name of Digital Equipment Corporation not be used in advertising or
     37       1.6       mrg  * publicity pertaining to distribution of the document or software without
     38       1.6       mrg  * specific, written prior permission.
     39      1.39  christos  *
     40       1.6       mrg  * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
     41       1.6       mrg  * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
     42       1.6       mrg  * OF MERCHANTABILITY AND FITNESS.   IN NO EVENT SHALL DIGITAL EQUIPMENT
     43       1.6       mrg  * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
     44       1.6       mrg  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
     45       1.6       mrg  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
     46       1.6       mrg  * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
     47       1.6       mrg  * SOFTWARE.
     48       1.6       mrg  * -
     49      1.39  christos  * Portions Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
     50      1.39  christos  * All rights reserved.
     51      1.39  christos  *
     52      1.39  christos  * Redistribution and use in source and binary forms, with or without
     53      1.39  christos  * modification, are permitted provided that the following conditions
     54      1.39  christos  * are met:
     55      1.39  christos  * 1. Redistributions of source code must retain the above copyright
     56      1.39  christos  *    notice, this list of conditions and the following disclaimer.
     57      1.39  christos  * 2. Redistributions in binary form must reproduce the above copyright
     58      1.39  christos  *    notice, this list of conditions and the following disclaimer in the
     59      1.39  christos  *    documentation and/or other materials provided with the distribution.
     60      1.39  christos  * 3. All advertising materials mentioning features or use of this software
     61      1.39  christos  *    must display the following acknowledgement:
     62      1.39  christos  *    This product includes software developed by WIDE Project and
     63      1.39  christos  *    its contributors.
     64      1.39  christos  * 4. Neither the name of the project nor the names of its contributors
     65      1.39  christos  *    may be used to endorse or promote products derived from this software
     66      1.39  christos  *    without specific prior written permission.
     67      1.39  christos  *
     68      1.39  christos  * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
     69      1.39  christos  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     70      1.39  christos  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     71      1.39  christos  * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
     72      1.39  christos  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     73      1.39  christos  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     74      1.39  christos  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     75      1.39  christos  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     76      1.39  christos  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     77      1.39  christos  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     78      1.39  christos  * SUCH DAMAGE.
     79      1.39  christos  * -
     80       1.6       mrg  * --Copyright--
     81       1.6       mrg  */
     82       1.6       mrg 
     83      1.39  christos /*
     84      1.39  christos  *      @(#)netdb.h	8.1 (Berkeley) 6/2/93
     85  1.55.2.1       jdc  *	Id: netdb.h,v 1.15.18.6 2006/10/02 01:23:09 marka Exp
     86      1.39  christos  */
     87      1.39  christos 
     88       1.1       cgd #ifndef _NETDB_H_
     89      1.39  christos #define	_NETDB_H_
     90       1.1       cgd 
     91      1.13    kleink #include <machine/ansi.h>
     92      1.37    kleink #include <machine/endian_machdep.h>
     93      1.23    kleink #include <sys/ansi.h>
     94       1.6       mrg #include <sys/cdefs.h>
     95      1.29     bjh21 #include <sys/featuretest.h>
     96      1.13    kleink #include <inttypes.h>
     97      1.23    kleink /*
     98      1.23    kleink  * Data types
     99      1.23    kleink  */
    100      1.23    kleink #ifndef socklen_t
    101      1.23    kleink typedef __socklen_t	socklen_t;
    102      1.39  christos #define	socklen_t	__socklen_t
    103      1.23    kleink #endif
    104      1.23    kleink 
    105      1.13    kleink #ifdef  _BSD_SIZE_T_
    106      1.13    kleink typedef _BSD_SIZE_T_	size_t;
    107      1.13    kleink #undef  _BSD_SIZE_T_
    108      1.13    kleink #endif
    109      1.11    kleink 
    110      1.29     bjh21 #if defined(_NETBSD_SOURCE)
    111      1.39  christos #ifndef _PATH_HEQUIV
    112       1.1       cgd #define	_PATH_HEQUIV	"/etc/hosts.equiv"
    113      1.39  christos #endif
    114      1.39  christos #ifndef _PATH_HOSTS
    115       1.1       cgd #define	_PATH_HOSTS	"/etc/hosts"
    116      1.39  christos #endif
    117      1.39  christos #ifndef _PATH_NETWORKS
    118       1.1       cgd #define	_PATH_NETWORKS	"/etc/networks"
    119      1.39  christos #endif
    120      1.39  christos #ifndef _PATH_PROTOCOLS
    121       1.1       cgd #define	_PATH_PROTOCOLS	"/etc/protocols"
    122      1.39  christos #endif
    123      1.39  christos #ifndef _PATH_SERVICES
    124       1.1       cgd #define	_PATH_SERVICES	"/etc/services"
    125      1.11    kleink #endif
    126      1.54  christos #ifndef _PATH_SERVICES_DB
    127  1.55.2.1       jdc #define	_PATH_SERVICES_DB "/var/db/services.db"
    128      1.54  christos #endif
    129      1.39  christos #endif
    130       1.1       cgd 
    131      1.39  christos __BEGIN_DECLS
    132       1.6       mrg extern int h_errno;
    133      1.39  christos __END_DECLS
    134       1.6       mrg 
    135  1.55.2.1       jdc /*%
    136       1.1       cgd  * Structures returned by network data base library.  All addresses are
    137       1.1       cgd  * supplied in host order, and returned in network order (suitable for
    138       1.1       cgd  * use in system calls).
    139       1.1       cgd  */
    140       1.1       cgd struct	hostent {
    141  1.55.2.1       jdc 	char	*h_name;	/*%< official name of host */
    142  1.55.2.1       jdc 	char	**h_aliases;	/*%< alias list */
    143  1.55.2.1       jdc 	int	h_addrtype;	/*%< host address type */
    144  1.55.2.1       jdc 	int	h_length;	/*%< length of address */
    145  1.55.2.1       jdc 	char	**h_addr_list;	/*%< list of addresses from name server */
    146  1.55.2.1       jdc #define	h_addr	h_addr_list[0]	/*%< address, for backward compatiblity */
    147       1.1       cgd };
    148       1.1       cgd 
    149  1.55.2.1       jdc /*%
    150       1.1       cgd  * Assumption here is that a network number
    151       1.6       mrg  * fits in an unsigned long -- probably a poor one.
    152       1.1       cgd  */
    153       1.1       cgd struct	netent {
    154  1.55.2.1       jdc 	char		*n_name;	/*%< official name of net */
    155  1.55.2.1       jdc 	char		**n_aliases;	/*%< alias list */
    156  1.55.2.1       jdc 	int		n_addrtype;	/*%< net address type */
    157      1.37    kleink #if (defined(__sparc__) && defined(_LP64)) || \
    158      1.37    kleink     (defined(__sh__) && defined(_LP64) && (_BYTE_ORDER == _BIG_ENDIAN))
    159      1.37    kleink 	int		__n_pad0;	/* ABI compatibility */
    160      1.37    kleink #endif
    161  1.55.2.1       jdc 	uint32_t	n_net;		/*%< network # */
    162      1.37    kleink #if defined(__alpha__) || (defined(__i386__) && defined(_LP64)) || \
    163      1.37    kleink     (defined(__sh__) && defined(_LP64) && (_BYTE_ORDER == _LITTLE_ENDIAN))
    164      1.37    kleink 	int		__n_pad0;	/* ABI compatibility */
    165      1.37    kleink #endif
    166       1.1       cgd };
    167       1.1       cgd 
    168       1.1       cgd struct	servent {
    169  1.55.2.1       jdc 	char	*s_name;	/*%< official service name */
    170  1.55.2.1       jdc 	char	**s_aliases;	/*%< alias list */
    171  1.55.2.1       jdc 	int	s_port;		/*%< port # */
    172  1.55.2.1       jdc 	char	*s_proto;	/*%< protocol to use */
    173       1.1       cgd };
    174       1.1       cgd 
    175       1.1       cgd struct	protoent {
    176  1.55.2.1       jdc 	char	*p_name;	/*%< official protocol name */
    177  1.55.2.1       jdc 	char	**p_aliases;	/*%< alias list */
    178  1.55.2.1       jdc 	int	p_proto;	/*%< protocol # */
    179       1.1       cgd };
    180       1.1       cgd 
    181      1.23    kleink /*
    182      1.23    kleink  * Note: ai_addrlen used to be a size_t, per RFC 2553.
    183      1.23    kleink  * In XNS5.2, and subsequently in POSIX-2001 and
    184      1.23    kleink  * draft-ietf-ipngwg-rfc2553bis-02.txt it was changed to a socklen_t.
    185      1.55  christos  * To accommodate for this while preserving binary compatibility with the
    186      1.23    kleink  * old interface, we prepend or append 32 bits of padding, depending on
    187      1.23    kleink  * the (LP64) architecture's endianness.
    188      1.23    kleink  *
    189      1.23    kleink  * This should be deleted the next time the libc major number is
    190      1.23    kleink  * incremented.
    191      1.23    kleink  */
    192      1.30     bjh21 #if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 520 || \
    193      1.30     bjh21     defined(_NETBSD_SOURCE)
    194      1.12    itojun struct addrinfo {
    195  1.55.2.1       jdc 	int		ai_flags;	/*%< AI_PASSIVE, AI_CANONNAME */
    196  1.55.2.1       jdc 	int		ai_family;	/*%< PF_xxx */
    197  1.55.2.1       jdc 	int		ai_socktype;	/*%< SOCK_xxx */
    198  1.55.2.1       jdc 	int		ai_protocol;	/*%< 0 or IPPROTO_xxx for IPv4 and IPv6 */
    199      1.38    kleink #if defined(__sparc__) && defined(_LP64)
    200  1.55.2.1       jdc 	int		__ai_pad0;	/* ABI compatibility */
    201      1.23    kleink #endif
    202  1.55.2.1       jdc 	socklen_t	 ai_addrlen;	/*%< length of ai_addr */
    203      1.23    kleink #if defined(__alpha__) || (defined(__i386__) && defined(_LP64))
    204  1.55.2.1       jdc 	int		__ai_pad0;	/* ABI compatibility */
    205      1.23    kleink #endif
    206  1.55.2.1       jdc 	char		*ai_canonname;	/*%< canonical name for hostname */
    207  1.55.2.1       jdc 	struct sockaddr	*ai_addr; 	/*%< binary address */
    208  1.55.2.1       jdc 	struct addrinfo	*ai_next; 	/*%< next structure in linked list */
    209      1.12    itojun };
    210      1.13    kleink #endif
    211      1.12    itojun 
    212  1.55.2.1       jdc /*%
    213       1.1       cgd  * Error return codes from gethostbyname() and gethostbyaddr()
    214       1.1       cgd  * (left in extern int h_errno).
    215       1.1       cgd  */
    216       1.5       jtc 
    217      1.29     bjh21 #if defined(_NETBSD_SOURCE)
    218  1.55.2.1       jdc #define	NETDB_INTERNAL	-1	/*%< see errno */
    219  1.55.2.1       jdc #define	NETDB_SUCCESS	0	/*%< no problem */
    220      1.11    kleink #endif
    221       1.1       cgd #define	NO_ADDRESS	NO_DATA		/* no address, look for MX record */
    222  1.55.2.1       jdc #define	HOST_NOT_FOUND	1 /*%< Authoritative Answer Host not found */
    223  1.55.2.1       jdc #define	TRY_AGAIN	2 /*%< Non-Authoritive Host not found, or SERVERFAIL */
    224  1.55.2.1       jdc #define	NO_RECOVERY	3 /*%< Non recoverable errors, FORMERR, REFUSED, NOTIMP */
    225  1.55.2.1       jdc #define	NO_DATA		4 /*%< Valid name, no data record of requested type */
    226  1.55.2.1       jdc #if defined(_NETBSD_SOURCE)
    227  1.55.2.1       jdc #define	NO_ADDRESS	NO_DATA		/*%< no address, look for MX record */
    228      1.11    kleink #endif
    229       1.1       cgd 
    230      1.12    itojun /*
    231      1.12    itojun  * Error return codes from getaddrinfo()
    232      1.12    itojun  */
    233      1.30     bjh21 #if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 520 || \
    234      1.30     bjh21     defined(_NETBSD_SOURCE)
    235  1.55.2.1       jdc #define	EAI_ADDRFAMILY	 1	/*%< address family for hostname not supported */
    236  1.55.2.1       jdc #define	EAI_AGAIN	 2	/*%< temporary failure in name resolution */
    237  1.55.2.1       jdc #define	EAI_BADFLAGS	 3	/*%< invalid value for ai_flags */
    238  1.55.2.1       jdc #define	EAI_FAIL	 4	/*%< non-recoverable failure in name resolution */
    239  1.55.2.1       jdc #define	EAI_FAMILY	 5	/*%< ai_family not supported */
    240  1.55.2.1       jdc #define	EAI_MEMORY	 6	/*%< memory allocation failure */
    241  1.55.2.1       jdc #define	EAI_NODATA	 7	/*%< no address associated with hostname */
    242  1.55.2.1       jdc #define	EAI_NONAME	 8	/*%< hostname nor servname provided, or not known */
    243  1.55.2.1       jdc #define	EAI_SERVICE	 9	/*%< servname not supported for ai_socktype */
    244  1.55.2.1       jdc #define	EAI_SOCKTYPE	10	/*%< ai_socktype not supported */
    245  1.55.2.1       jdc #define	EAI_SYSTEM	11	/*%< system error returned in errno */
    246      1.53  ginsbach #define	EAI_BADHINTS	12	/* invalid value for hints */
    247      1.53  ginsbach #define	EAI_PROTOCOL	13	/* resolved protocol is unknown */
    248      1.53  ginsbach #define	EAI_OVERFLOW	14	/* argument buffer overflow */
    249      1.53  ginsbach #define	EAI_MAX		15
    250      1.30     bjh21 #endif /* _POSIX_C_SOURCE >= 200112 || _XOPEN_SOURCE >= 520 || _NETBSD_SOURCE */
    251      1.12    itojun 
    252  1.55.2.1       jdc /*%
    253      1.12    itojun  * Flag values for getaddrinfo()
    254      1.12    itojun  */
    255      1.30     bjh21 #if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 520 || \
    256      1.30     bjh21     defined(_NETBSD_SOURCE)
    257      1.12    itojun #define	AI_PASSIVE	0x00000001 /* get address to use bind() */
    258      1.12    itojun #define	AI_CANONNAME	0x00000002 /* fill ai_canonname */
    259      1.35    itojun #define	AI_NUMERICHOST	0x00000004 /* prevent host name resolution */
    260      1.35    itojun #define	AI_NUMERICSERV	0x00000008 /* prevent service name resolution */
    261      1.35    itojun /* valid flags for addrinfo (not a standard def, apps should not use it) */
    262      1.35    itojun #define	AI_MASK	\
    263      1.35    itojun     (AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST | AI_NUMERICSERV)
    264      1.41  christos #endif
    265      1.12    itojun 
    266      1.30     bjh21 #if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 520 || \
    267      1.30     bjh21     defined(_NETBSD_SOURCE)
    268  1.55.2.1       jdc /*%
    269      1.12    itojun  * Constants for getnameinfo()
    270      1.12    itojun  */
    271      1.29     bjh21 #if defined(_NETBSD_SOURCE)
    272      1.12    itojun #define	NI_MAXHOST	1025
    273      1.12    itojun #define	NI_MAXSERV	32
    274      1.22    kleink #endif
    275      1.12    itojun 
    276  1.55.2.1       jdc /*%
    277      1.12    itojun  * Flag values for getnameinfo()
    278      1.12    itojun  */
    279      1.12    itojun #define	NI_NOFQDN	0x00000001
    280      1.12    itojun #define	NI_NUMERICHOST	0x00000002
    281      1.12    itojun #define	NI_NAMEREQD	0x00000004
    282      1.12    itojun #define	NI_NUMERICSERV	0x00000008
    283      1.12    itojun #define	NI_DGRAM	0x00000010
    284  1.55.2.2    bouyer #define	NI_WITHSCOPEID	0x00000020
    285      1.39  christos #define	NI_NUMERICSCOPE	0x00000040
    286      1.14    itojun 
    287  1.55.2.1       jdc /*%
    288      1.14    itojun  * Scope delimit character
    289      1.14    itojun  */
    290      1.29     bjh21 #if defined(_NETBSD_SOURCE)
    291      1.39  christos #define	SCOPE_DELIMITER	'%'
    292      1.22    kleink #endif
    293      1.30     bjh21 #endif /* (_POSIX_C_SOURCE - 0) >= 200112L || ... */
    294      1.18    itojun 
    295       1.1       cgd __BEGIN_DECLS
    296      1.48     perry void		endhostent(void);
    297      1.48     perry void		endnetent(void);
    298      1.48     perry void		endprotoent(void);
    299      1.48     perry void		endservent(void);
    300      1.44  ginsbach #if (_XOPEN_SOURCE - 0) >= 520 && (_XOPEN_SOURCE - 0) < 600 || \
    301      1.44  ginsbach     defined(_NETBSD_SOURCE)
    302      1.44  ginsbach #if 0 /* we do not ship this */
    303      1.48     perry void		freehostent(struct hostent *);
    304      1.44  ginsbach #endif
    305      1.44  ginsbach #endif
    306      1.48     perry struct hostent	*gethostbyaddr(const char *, socklen_t, int);
    307      1.48     perry struct hostent	*gethostbyname(const char *);
    308      1.29     bjh21 #if defined(_NETBSD_SOURCE)
    309      1.48     perry struct hostent	*gethostbyname2(const char *, int);
    310      1.11    kleink #endif
    311      1.48     perry struct hostent	*gethostent(void);
    312      1.48     perry struct netent	*getnetbyaddr(uint32_t, int);
    313      1.48     perry struct netent	*getnetbyname(const char *);
    314      1.48     perry struct netent	*getnetent(void);
    315      1.48     perry struct protoent	*getprotobyname(const char *);
    316      1.48     perry struct protoent	*getprotobynumber(int);
    317      1.48     perry struct protoent	*getprotoent(void);
    318      1.48     perry struct servent	*getservbyname(const char *, const char *);
    319      1.48     perry struct servent	*getservbyport(int, const char *);
    320      1.48     perry struct servent	*getservent(void);
    321      1.29     bjh21 #if defined(_NETBSD_SOURCE)
    322      1.48     perry void		herror(const char *);
    323      1.48     perry const char	*hstrerror(int);
    324      1.11    kleink #endif
    325      1.48     perry void		sethostent(int);
    326      1.29     bjh21 #if defined(_NETBSD_SOURCE)
    327      1.48     perry /* void		sethostfile(const char *); */
    328      1.11    kleink #endif
    329      1.48     perry void		setnetent(int);
    330      1.48     perry void		setprotoent(int);
    331      1.30     bjh21 #if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 520 || \
    332      1.30     bjh21     defined(_NETBSD_SOURCE)
    333      1.48     perry void		setservent(int);
    334      1.50    kleink int		getaddrinfo(const char * __restrict, const char * __restrict,
    335      1.50    kleink 				 const struct addrinfo * __restrict,
    336      1.50    kleink 				 struct addrinfo ** __restrict);
    337      1.50    kleink int		getnameinfo(const struct sockaddr * __restrict, socklen_t,
    338      1.50    kleink 				 char * __restrict, socklen_t,
    339      1.50    kleink 				 char * __restrict, socklen_t, int);
    340      1.48     perry void		freeaddrinfo(struct addrinfo *);
    341      1.48     perry const char	*gai_strerror(int);
    342      1.13    kleink #endif
    343      1.48     perry void		setservent(int);
    344       1.1       cgd __END_DECLS
    345       1.1       cgd 
    346       1.1       cgd #endif /* !_NETDB_H_ */
    347