xref: /freebsd/include/netdb.h (revision 6e778a7efdc0e804471750157f6bacd1ef7d1580)
159deaec5SRodney W. Grimes /*-
2*6e778a7eSPedro F. Giffuni  * SPDX-License-Identifier: (BSD-3-Clause AND ISC)
32321c474SPedro F. Giffuni  *
459deaec5SRodney W. Grimes  * Copyright (c) 1980, 1983, 1988, 1993
559deaec5SRodney W. Grimes  *	The Regents of the University of California.  All rights reserved.
659deaec5SRodney W. Grimes  *
759deaec5SRodney W. Grimes  * Redistribution and use in source and binary forms, with or without
859deaec5SRodney W. Grimes  * modification, are permitted provided that the following conditions
959deaec5SRodney W. Grimes  * are met:
1059deaec5SRodney W. Grimes  * 1. Redistributions of source code must retain the above copyright
1159deaec5SRodney W. Grimes  *    notice, this list of conditions and the following disclaimer.
1259deaec5SRodney W. Grimes  * 2. Redistributions in binary form must reproduce the above copyright
1359deaec5SRodney W. Grimes  *    notice, this list of conditions and the following disclaimer in the
1459deaec5SRodney W. Grimes  *    documentation and/or other materials provided with the distribution.
15f2556687SWarner Losh  * 3. Neither the name of the University nor the names of its contributors
1659deaec5SRodney W. Grimes  *    may be used to endorse or promote products derived from this software
1759deaec5SRodney W. Grimes  *    without specific prior written permission.
1859deaec5SRodney W. Grimes  *
1959deaec5SRodney W. Grimes  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2059deaec5SRodney W. Grimes  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2159deaec5SRodney W. Grimes  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2259deaec5SRodney W. Grimes  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2359deaec5SRodney W. Grimes  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2459deaec5SRodney W. Grimes  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2559deaec5SRodney W. Grimes  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2659deaec5SRodney W. Grimes  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2759deaec5SRodney W. Grimes  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2859deaec5SRodney W. Grimes  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2959deaec5SRodney W. Grimes  * SUCH DAMAGE.
3059deaec5SRodney W. Grimes  *
3159deaec5SRodney W. Grimes  * -
3259deaec5SRodney W. Grimes  * Portions Copyright (c) 1993 by Digital Equipment Corporation.
3359deaec5SRodney W. Grimes  *
3459deaec5SRodney W. Grimes  * Permission to use, copy, modify, and distribute this software for any
3559deaec5SRodney W. Grimes  * purpose with or without fee is hereby granted, provided that the above
3659deaec5SRodney W. Grimes  * copyright notice and this permission notice appear in all copies, and that
3759deaec5SRodney W. Grimes  * the name of Digital Equipment Corporation not be used in advertising or
3859deaec5SRodney W. Grimes  * publicity pertaining to distribution of the document or software without
3959deaec5SRodney W. Grimes  * specific, written prior permission.
4059deaec5SRodney W. Grimes  *
4159deaec5SRodney W. Grimes  * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
4259deaec5SRodney W. Grimes  * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
4359deaec5SRodney W. Grimes  * OF MERCHANTABILITY AND FITNESS.   IN NO EVENT SHALL DIGITAL EQUIPMENT
4459deaec5SRodney W. Grimes  * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
4559deaec5SRodney W. Grimes  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
4659deaec5SRodney W. Grimes  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
4759deaec5SRodney W. Grimes  * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
4859deaec5SRodney W. Grimes  * SOFTWARE.
4959deaec5SRodney W. Grimes  * -
5059deaec5SRodney W. Grimes  * --Copyright--
5159deaec5SRodney W. Grimes  */
5259deaec5SRodney W. Grimes 
530160f9c0SPeter Wemm /*
540160f9c0SPeter Wemm  *      @(#)netdb.h	8.1 (Berkeley) 6/2/93
550160f9c0SPeter Wemm  *      From: Id: netdb.h,v 8.9 1996/11/19 08:39:29 vixie Exp $
56a4add9a9SPeter Wemm  * $FreeBSD$
570160f9c0SPeter Wemm  */
580160f9c0SPeter Wemm 
5959deaec5SRodney W. Grimes #ifndef _NETDB_H_
6059deaec5SRodney W. Grimes #define _NETDB_H_
6159deaec5SRodney W. Grimes 
62315d6d9cSPeter Wemm #include <sys/cdefs.h>
63abbd8902SMike Barcroft #include <sys/_types.h>
64ad9fdc8fSHajimu UMEMOTO 
6507acf54bSEd Schouten #ifndef _IN_ADDR_T_DECLARED
6607acf54bSEd Schouten typedef	__uint32_t	in_addr_t;
6707acf54bSEd Schouten #define	_IN_ADDR_T_DECLARED
6807acf54bSEd Schouten #endif
6907acf54bSEd Schouten 
7007acf54bSEd Schouten #ifndef _IN_PORT_T_DECLARED
7107acf54bSEd Schouten typedef	__uint16_t	in_port_t;
7207acf54bSEd Schouten #define	_IN_PORT_T_DECLARED
7307acf54bSEd Schouten #endif
7407acf54bSEd Schouten 
75abbd8902SMike Barcroft #ifndef _SIZE_T_DECLARED
76abbd8902SMike Barcroft typedef	__size_t	size_t;
77abbd8902SMike Barcroft #define	_SIZE_T_DECLARED
78ad9fdc8fSHajimu UMEMOTO #endif
79315d6d9cSPeter Wemm 
80abbd8902SMike Barcroft #ifndef _SOCKLEN_T_DECLARED
81abbd8902SMike Barcroft typedef	__socklen_t	socklen_t;
82abbd8902SMike Barcroft #define	_SOCKLEN_T_DECLARED
833e9c0bd5SBruce Evans #endif
843e9c0bd5SBruce Evans 
85036ae3ddSHajimu UMEMOTO #ifndef _UINT32_T_DECLARED
86036ae3ddSHajimu UMEMOTO typedef	__uint32_t	uint32_t;
87036ae3ddSHajimu UMEMOTO #define	_UINT32_T_DECLARED
88036ae3ddSHajimu UMEMOTO #endif
89036ae3ddSHajimu UMEMOTO 
900160f9c0SPeter Wemm #ifndef _PATH_HEQUIV
9159deaec5SRodney W. Grimes # define	_PATH_HEQUIV	"/etc/hosts.equiv"
920160f9c0SPeter Wemm #endif
9359deaec5SRodney W. Grimes #define	_PATH_HOSTS	"/etc/hosts"
9459deaec5SRodney W. Grimes #define	_PATH_NETWORKS	"/etc/networks"
9559deaec5SRodney W. Grimes #define	_PATH_PROTOCOLS	"/etc/protocols"
9659deaec5SRodney W. Grimes #define	_PATH_SERVICES	"/etc/services"
97e622b479SHajimu UMEMOTO #define	_PATH_SERVICES_DB "/var/db/services.db"
9859deaec5SRodney W. Grimes 
995342d17fSHajimu UMEMOTO #define	h_errno (*__h_errno())
100d58a9efdSPeter Wemm 
10159deaec5SRodney W. Grimes /*
10259deaec5SRodney W. Grimes  * Structures returned by network data base library.  All addresses are
10359deaec5SRodney W. Grimes  * supplied in host order, and returned in network order (suitable for
10459deaec5SRodney W. Grimes  * use in system calls).
10559deaec5SRodney W. Grimes  */
10659deaec5SRodney W. Grimes struct hostent {
10759deaec5SRodney W. Grimes 	char	*h_name;	/* official name of host */
10859deaec5SRodney W. Grimes 	char	**h_aliases;	/* alias list */
10959deaec5SRodney W. Grimes 	int	h_addrtype;	/* host address type */
11059deaec5SRodney W. Grimes 	int	h_length;	/* length of address */
11159deaec5SRodney W. Grimes 	char	**h_addr_list;	/* list of addresses from name server */
11271d9c781SMike Pritchard #define	h_addr	h_addr_list[0]	/* address, for backward compatibility */
11359deaec5SRodney W. Grimes };
11459deaec5SRodney W. Grimes 
11559deaec5SRodney W. Grimes struct netent {
11659deaec5SRodney W. Grimes 	char		*n_name;	/* official name of net */
11759deaec5SRodney W. Grimes 	char		**n_aliases;	/* alias list */
11859deaec5SRodney W. Grimes 	int		n_addrtype;	/* net address type */
119036ae3ddSHajimu UMEMOTO 	uint32_t	n_net;		/* network # */
12059deaec5SRodney W. Grimes };
12159deaec5SRodney W. Grimes 
12259deaec5SRodney W. Grimes struct servent {
12359deaec5SRodney W. Grimes 	char	*s_name;	/* official service name */
12459deaec5SRodney W. Grimes 	char	**s_aliases;	/* alias list */
12559deaec5SRodney W. Grimes 	int	s_port;		/* port # */
12659deaec5SRodney W. Grimes 	char	*s_proto;	/* protocol to use */
12759deaec5SRodney W. Grimes };
12859deaec5SRodney W. Grimes 
12959deaec5SRodney W. Grimes struct protoent {
13059deaec5SRodney W. Grimes 	char	*p_name;	/* official protocol name */
13159deaec5SRodney W. Grimes 	char	**p_aliases;	/* alias list */
13259deaec5SRodney W. Grimes 	int	p_proto;	/* protocol # */
13359deaec5SRodney W. Grimes };
13459deaec5SRodney W. Grimes 
1357d56d374SYoshinobu Inoue struct addrinfo {
1367d56d374SYoshinobu Inoue 	int	ai_flags;	/* AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST */
137b1f9559aSHajimu UMEMOTO 	int	ai_family;	/* AF_xxx */
1387d56d374SYoshinobu Inoue 	int	ai_socktype;	/* SOCK_xxx */
1397d56d374SYoshinobu Inoue 	int	ai_protocol;	/* 0 or IPPROTO_xxx for IPv4 and IPv6 */
140036ae3ddSHajimu UMEMOTO 	socklen_t ai_addrlen;	/* length of ai_addr */
1417d56d374SYoshinobu Inoue 	char	*ai_canonname;	/* canonical name for hostname */
1427d56d374SYoshinobu Inoue 	struct	sockaddr *ai_addr;	/* binary address */
1437d56d374SYoshinobu Inoue 	struct	addrinfo *ai_next;	/* next structure in linked list */
1447d56d374SYoshinobu Inoue };
1457d56d374SYoshinobu Inoue 
14607acf54bSEd Schouten #define	IPPORT_RESERVED	1024
14707acf54bSEd Schouten 
14859deaec5SRodney W. Grimes /*
14959deaec5SRodney W. Grimes  * Error return codes from gethostbyname() and gethostbyaddr()
15033dee819SBrian Feldman  * (left in h_errno).
15159deaec5SRodney W. Grimes  */
15259deaec5SRodney W. Grimes 
153d58a9efdSPeter Wemm #define	NETDB_INTERNAL	-1	/* see errno */
154d58a9efdSPeter Wemm #define	NETDB_SUCCESS	0	/* no problem */
15559deaec5SRodney W. Grimes #define	HOST_NOT_FOUND	1 /* Authoritative Answer Host not found */
15671d9c781SMike Pritchard #define	TRY_AGAIN	2 /* Non-Authoritative Host not found, or SERVERFAIL */
15759deaec5SRodney W. Grimes #define	NO_RECOVERY	3 /* Non recoverable errors, FORMERR, REFUSED, NOTIMP */
15859deaec5SRodney W. Grimes #define	NO_DATA		4 /* Valid name, no data record of requested type */
15959deaec5SRodney W. Grimes #define	NO_ADDRESS	NO_DATA		/* no address, look for MX record */
16059deaec5SRodney W. Grimes 
1617d56d374SYoshinobu Inoue /*
1627d56d374SYoshinobu Inoue  * Error return codes from getaddrinfo()
1637d56d374SYoshinobu Inoue  */
16427f9f419SHajimu UMEMOTO #if 0
16527f9f419SHajimu UMEMOTO /* obsoleted */
1667d56d374SYoshinobu Inoue #define	EAI_ADDRFAMILY	 1	/* address family for hostname not supported */
16727f9f419SHajimu UMEMOTO #endif
1687d56d374SYoshinobu Inoue #define	EAI_AGAIN	 2	/* temporary failure in name resolution */
1697d56d374SYoshinobu Inoue #define	EAI_BADFLAGS	 3	/* invalid value for ai_flags */
1707d56d374SYoshinobu Inoue #define	EAI_FAIL	 4	/* non-recoverable failure in name resolution */
1717d56d374SYoshinobu Inoue #define	EAI_FAMILY	 5	/* ai_family not supported */
1727d56d374SYoshinobu Inoue #define	EAI_MEMORY	 6	/* memory allocation failure */
17327f9f419SHajimu UMEMOTO #if 0
17427f9f419SHajimu UMEMOTO /* obsoleted */
1757d56d374SYoshinobu Inoue #define	EAI_NODATA	 7	/* no address associated with hostname */
17627f9f419SHajimu UMEMOTO #endif
1777d56d374SYoshinobu Inoue #define	EAI_NONAME	 8	/* hostname nor servname provided, or not known */
1787d56d374SYoshinobu Inoue #define	EAI_SERVICE	 9	/* servname not supported for ai_socktype */
1797d56d374SYoshinobu Inoue #define	EAI_SOCKTYPE	10	/* ai_socktype not supported */
1807d56d374SYoshinobu Inoue #define	EAI_SYSTEM	11	/* system error returned in errno */
181734aa104SHajimu UMEMOTO #define	EAI_BADHINTS	12	/* invalid value for hints */
182734aa104SHajimu UMEMOTO #define	EAI_PROTOCOL	13	/* resolved protocol is unknown */
183734aa104SHajimu UMEMOTO #define	EAI_OVERFLOW	14	/* argument buffer overflow */
184734aa104SHajimu UMEMOTO #define	EAI_MAX		15
1857d56d374SYoshinobu Inoue 
1867d56d374SYoshinobu Inoue /*
1877d56d374SYoshinobu Inoue  * Flag values for getaddrinfo()
1887d56d374SYoshinobu Inoue  */
1897d56d374SYoshinobu Inoue #define	AI_PASSIVE	0x00000001 /* get address to use bind() */
1907d56d374SYoshinobu Inoue #define	AI_CANONNAME	0x00000002 /* fill ai_canonname */
191c224435eSHajimu UMEMOTO #define	AI_NUMERICHOST	0x00000004 /* prevent host name resolution */
192c224435eSHajimu UMEMOTO #define	AI_NUMERICSERV	0x00000008 /* prevent service name resolution */
193c224435eSHajimu UMEMOTO /* valid flags for addrinfo (not a standard def, apps should not use it) */
19492826806SHajimu UMEMOTO #define AI_MASK \
195c224435eSHajimu UMEMOTO     (AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST | AI_NUMERICSERV | \
1962cff354fSHajimu UMEMOTO     AI_ADDRCONFIG | AI_ALL | AI_V4MAPPED)
1977d56d374SYoshinobu Inoue 
1987d56d374SYoshinobu Inoue #define	AI_ALL		0x00000100 /* IPv6 and IPv4-mapped (with AI_V4MAPPED) */
1997d56d374SYoshinobu Inoue #define	AI_V4MAPPED_CFG	0x00000200 /* accept IPv4-mapped if kernel supports */
2007d56d374SYoshinobu Inoue #define	AI_ADDRCONFIG	0x00000400 /* only if any address is assigned */
2017d56d374SYoshinobu Inoue #define	AI_V4MAPPED	0x00000800 /* accept IPv4-mapped IPv6 address */
2027d56d374SYoshinobu Inoue /* special recommended flags for getipnodebyname */
2037d56d374SYoshinobu Inoue #define	AI_DEFAULT	(AI_V4MAPPED_CFG | AI_ADDRCONFIG)
2047d56d374SYoshinobu Inoue 
2057d56d374SYoshinobu Inoue /*
2067d56d374SYoshinobu Inoue  * Constants for getnameinfo()
2077d56d374SYoshinobu Inoue  */
2087d56d374SYoshinobu Inoue #define	NI_MAXHOST	1025
2097d56d374SYoshinobu Inoue #define	NI_MAXSERV	32
2107d56d374SYoshinobu Inoue 
2117d56d374SYoshinobu Inoue /*
2127d56d374SYoshinobu Inoue  * Flag values for getnameinfo()
2137d56d374SYoshinobu Inoue  */
2147d56d374SYoshinobu Inoue #define	NI_NOFQDN	0x00000001
2157d56d374SYoshinobu Inoue #define	NI_NUMERICHOST	0x00000002
2167d56d374SYoshinobu Inoue #define	NI_NAMEREQD	0x00000004
2177d56d374SYoshinobu Inoue #define	NI_NUMERICSERV	0x00000008
2187d56d374SYoshinobu Inoue #define	NI_DGRAM	0x00000010
219b4a395a4SEd Schouten #define	NI_NUMERICSCOPE	0x00000020
2207d56d374SYoshinobu Inoue 
2217d56d374SYoshinobu Inoue /*
2227d56d374SYoshinobu Inoue  * Scope delimit character
2237d56d374SYoshinobu Inoue  */
22412cefbccSYoshinobu Inoue #define	SCOPE_DELIMITER	'%'
2257d56d374SYoshinobu Inoue 
22659deaec5SRodney W. Grimes __BEGIN_DECLS
227bb28f3c2SWarner Losh void		endhostent(void);
228bb28f3c2SWarner Losh void		endnetent(void);
229bb28f3c2SWarner Losh void		endprotoent(void);
230bb28f3c2SWarner Losh void		endservent(void);
2311a4cc578SDavid Schultz #if __BSD_VISIBLE || (__POSIX_VISIBLE && __POSIX_VISIBLE <= 200112)
2323da59cd0SHajimu UMEMOTO struct hostent	*gethostbyaddr(const void *, socklen_t, int);
233bb28f3c2SWarner Losh struct hostent	*gethostbyname(const char *);
2341a4cc578SDavid Schultz #endif
235bb28f3c2SWarner Losh struct hostent	*gethostent(void);
236036ae3ddSHajimu UMEMOTO struct netent	*getnetbyaddr(uint32_t, int);
237bb28f3c2SWarner Losh struct netent	*getnetbyname(const char *);
238bb28f3c2SWarner Losh struct netent	*getnetent(void);
239bb28f3c2SWarner Losh struct protoent	*getprotobyname(const char *);
240bb28f3c2SWarner Losh struct protoent	*getprotobynumber(int);
241bb28f3c2SWarner Losh struct protoent	*getprotoent(void);
242bb28f3c2SWarner Losh struct servent	*getservbyname(const char *, const char *);
243bb28f3c2SWarner Losh struct servent	*getservbyport(int, const char *);
244bb28f3c2SWarner Losh struct servent	*getservent(void);
245bb28f3c2SWarner Losh void		sethostent(int);
246bb28f3c2SWarner Losh /* void		sethostfile(const char *); */
247bb28f3c2SWarner Losh void		setnetent(int);
248bb28f3c2SWarner Losh void		setprotoent(int);
249bb28f3c2SWarner Losh int		getaddrinfo(const char *, const char *,
250bb28f3c2SWarner Losh 			    const struct addrinfo *, struct addrinfo **);
251bb28f3c2SWarner Losh int		getnameinfo(const struct sockaddr *, socklen_t, char *,
252bb28f3c2SWarner Losh 			    size_t, char *, size_t, int);
253bb28f3c2SWarner Losh void		freeaddrinfo(struct addrinfo *);
254ed613866SAlexey Zelkin const char	*gai_strerror(int);
255bb28f3c2SWarner Losh void		setservent(int);
25674b3fad6SPeter Wemm 
2571a4cc578SDavid Schultz #if __BSD_VISIBLE
2581a4cc578SDavid Schultz void		endnetgrent(void);
2591a4cc578SDavid Schultz void		freehostent(struct hostent *);
2601a4cc578SDavid Schultz int		gethostbyaddr_r(const void *, socklen_t, int, struct hostent *,
2611a4cc578SDavid Schultz     char *, size_t, struct hostent **, int *);
2621a4cc578SDavid Schultz int		gethostbyname_r(const char *, struct hostent *, char *, size_t,
2631a4cc578SDavid Schultz     struct hostent **, int *);
2641a4cc578SDavid Schultz struct hostent	*gethostbyname2(const char *, int);
2651a4cc578SDavid Schultz int		gethostbyname2_r(const char *, int, struct hostent *, char *,
2661a4cc578SDavid Schultz     size_t, struct hostent **, int *);
2671a4cc578SDavid Schultz int		gethostent_r(struct hostent *, char *, size_t,
2681a4cc578SDavid Schultz     struct hostent **, int *);
2691a4cc578SDavid Schultz struct hostent	*getipnodebyaddr(const void *, size_t, int, int *);
2701a4cc578SDavid Schultz struct hostent	*getipnodebyname(const char *, int, int, int *);
2711a4cc578SDavid Schultz int		getnetbyaddr_r(uint32_t, int, struct netent *, char *, size_t,
2721a4cc578SDavid Schultz     struct netent**, int *);
2731a4cc578SDavid Schultz int		getnetbyname_r(const char *, struct netent *, char *, size_t,
2741a4cc578SDavid Schultz     struct netent **, int *);
2751a4cc578SDavid Schultz int		getnetent_r(struct netent *, char *, size_t, struct netent **,
2761a4cc578SDavid Schultz     int *);
2771a4cc578SDavid Schultz int		getnetgrent(char **, char **, char **);
278714ac002SMark Johnston int		getnetgrent_r(char **, char **, char **, char *, size_t);
2791a4cc578SDavid Schultz int		getprotobyname_r(const char *, struct protoent *, char *,
2801a4cc578SDavid Schultz     size_t, struct protoent **);
2811a4cc578SDavid Schultz int		getprotobynumber_r(int, struct protoent *, char *, size_t,
2821a4cc578SDavid Schultz     struct protoent **);
2831a4cc578SDavid Schultz int		getprotoent_r(struct protoent *, char *, size_t,
2841a4cc578SDavid Schultz     struct protoent **);
2851a4cc578SDavid Schultz int		getservbyname_r(const char *, const char *, struct servent *,
2861a4cc578SDavid Schultz     char *, size_t, struct servent **);
2871a4cc578SDavid Schultz int		getservbyport_r(int, const char *, struct servent *, char *,
2881a4cc578SDavid Schultz     size_t, struct servent **);
2891a4cc578SDavid Schultz int		getservent_r(struct servent *, char *, size_t,
2901a4cc578SDavid Schultz     struct servent **);
2911a4cc578SDavid Schultz void		herror(const char *);
292f6ab8089SEd Schouten const char	*hstrerror(int);
2931a4cc578SDavid Schultz int		innetgr(const char *, const char *, const char *, const char *);
2941a4cc578SDavid Schultz void		setnetgrent(const char *);
2951a4cc578SDavid Schultz #endif
2961a4cc578SDavid Schultz 
2971a4cc578SDavid Schultz 
29874b3fad6SPeter Wemm /*
29974b3fad6SPeter Wemm  * PRIVATE functions specific to the FreeBSD implementation
30074b3fad6SPeter Wemm  */
30174b3fad6SPeter Wemm 
30274b3fad6SPeter Wemm /* DO NOT USE THESE, THEY ARE SUBJECT TO CHANGE AND ARE NOT PORTABLE!!! */
3035342d17fSHajimu UMEMOTO int	* __h_errno(void);
30459deaec5SRodney W. Grimes __END_DECLS
30559deaec5SRodney W. Grimes 
30659deaec5SRodney W. Grimes #endif /* !_NETDB_H_ */
307