2 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
3 * Use is subject to license terms.
14 /* AI_NUMERICSERV is not a valid flag for getaddrinfo */
15 #define AI_MASK 0x0038 /* mask of valid flags */
17 /* EAI_OVERFLOW was removed from ISC */
18 #define EAI_BADHINTS 12
21 * these are libresolv2 functions that were renamed in previous versions to
22 * res_* because they conflict with libnsl or libc
25 #define endhostent res_endhostent /* libnsl */
26 void endhostent
__P((void));
27 #define endnetent res_endnetent /* libc */
28 void endnetent
__P((void));
29 #define freeaddrinfo res_freeaddrinfo /* libc */
30 void freeaddrinfo
__P((struct addrinfo
*));
31 #define freehostent res_freehostent /* libc and libnsl */
32 void freehostent
__P((struct hostent
*));
33 #define getaddrinfo res_getaddrinfo /* libc */
34 int getaddrinfo
__P((const char *, const char *,
35 const struct addrinfo
*, struct addrinfo
**));
36 #define gethostbyaddr res_gethostbyaddr /* libnsl */
37 struct hostent
*gethostbyaddr
__P((const char *, int, int));
38 #define gethostbyname res_gethostbyname /* libnsl */
39 struct hostent
*gethostbyname
__P((const char *));
40 #define gethostbyname2 res_gethostbyname2 /* lib/nsswitch/dns */
41 struct hostent
*gethostbyname2
__P((const char *, int));
42 #define gethostent res_gethostent /* libnsl */
43 struct hostent
*gethostent
__P((void));
44 #define getipnodebyaddr res_getipnodebyaddr /* libnsl and libc */
45 struct hostent
*getipnodebyaddr
__P((const void *, size_t, int, int *));
46 #define getipnodebyname res_getipnodebyname /* libnsl and libc */
47 struct hostent
*getipnodebyname
__P((const char *, int, int, int *));
49 #define getnetbyaddr res_getnetbyaddr /* libc */
50 struct netent
*getnetbyaddr
__P((unsigned long, int));
51 #define getnetbyname res_getnetbyname /* libc */
52 struct netent
*getnetbyname
__P((const char *));
53 #define getnetent res_getnetent /* libc */
54 struct netent
*getnetent
__P((void));
55 #define sethostent res_sethostent /* libnsl */
56 void sethostent
__P((int));
57 #define setnetent res_setnetent /* libc */
58 void setnetent
__P((int));
61 * these are other irs functions now included in libresolv.so.2. We rename the
62 * ones that overlap with libc or libnsl
65 /* endprotoent is in libc.so.1 */
66 #define endprotoent res_endprotoent
67 void endprotoent
__P((void));
69 /* endservent is in libc.so.1 */
70 #define endservent res_endservent
71 void endservent
__P((void));
73 /* note: the next two symbols are variables, not functions */
75 /* gai_errlist is in libc.so.1 */
76 #define gai_errlist res_gai_errlist
78 /* gai_nerr is in libc.so.1 */
79 #define gai_nerr res_gai_nerr
81 /* gai_strerror is in libc.so.1 */
82 #define gai_strerror res_gai_strerror
83 const char *gai_strerror
__P((int ecode
));
85 /* gethostbyaddr_r is in libnsl.so.1 */
86 #define gethostbyaddr_r res_gethostbyaddr_r
87 struct hostent
*gethostbyaddr_r
__P((const char *addr
, int len
, int type
,
88 struct hostent
*hptr
, char *buf
,
89 int buflen
, int *h_errnop
));
91 /* gethostbyname_r is in libnsl.so.1 */
92 #define gethostbyname_r res_gethostbyname_r
93 struct hostent
*gethostbyname_r
__P((const char *name
, struct hostent
*hptr
,
94 char *buf
, int buflen
, int *h_errnop
));
96 /* gethostent_r is in libnsl.so.1 */
97 #define gethostent_r res_gethostent_r
98 struct hostent
*gethostent_r
__P((struct hostent
*hptr
, char *buf
, int buflen
,
101 /* getnameinfo is in libc.so.1 */
102 #define getnameinfo res_getnameinfo
103 int getnameinfo
__P((const struct sockaddr
*, size_t, char *,
104 size_t, char *, size_t, int));
106 /* getnetbyaddr_r is in libc.so.1 */
107 #define getnetbyaddr_r res_getnetbyaddr_r
108 struct netent
*getnetbyaddr_r
__P((long, int, struct netent
*, char *, int));
110 /* getnetbyname_r is in libc.so.1 */
111 #define getnetbyname_r res_getnetbyname_r
112 struct netent
*getnetbyname_r
__P((const char *, struct netent
*, char *, int));
114 /* getnetent_r is in libc.so.1 */
115 #define getnetent_r res_getnetent_r
116 struct netent
*getnetent_r
__P((struct netent
*, char *, int));
118 /* getprotobyname is in libc.so.1 */
119 #define getprotobyname res_getprotobyname
120 struct protoent
*getprotobyname
__P((const char *));
122 /* getprotobyname_r is in libc.so.1 */
123 #define getprotobyname_r res_getprotobyname_r
124 struct protoent
*getprotobyname_r
__P((const char *, struct protoent
*,
127 /* getprotobynumber is in libc.so.1 */
128 #define getprotobynumber res_getprotobynumber
129 struct protoent
*getprotobynumber
__P((int));
131 /* getprotobynumber_r is in libc.so.1 */
132 #define getprotobynumber_r res_getprotobynumber_r
133 struct protoent
*getprotobynumber_r
__P((int,
134 struct protoent
*, char *, int));
136 /* getprotoent is in libc.so.1 */
137 #define getprotoent res_getprotoent
138 struct protoent
*getprotoent
__P((void));
140 /* getprotoent_r is in libc.so.1 */
141 #define getprotoent_r res_getprotoent_r
142 struct protoent
*getprotoent_r
__P((struct protoent
*, char *, int));
144 /* getservbyname is in libc.so.1 and libnsl.so.1 */
145 #define getservbyname res_getservbyname
146 struct servent
*getservbyname
__P((const char *, const char *));
148 /* getservbyname_r is in libc.so.1 and libnsl.so.1 */
149 #define getservbyname_r res_getservbyname_r
150 struct servent
*getservbyname_r
__P((const char *name
, const char *,
151 struct servent
*, char *, int));
153 /* getservbyport is in libc.so.1 and libnsl.so.1 */
154 #define getservbyport res_getservbyport
155 struct servent
*getservbyport
__P((int, const char *));
157 /* getservbyport_r is in libc.so.1 and libnsl.so.1 */
158 #define getservbyport_r res_getservbyport_r
159 struct servent
*getservbyport_r
__P((int port
, const char *,
160 struct servent
*, char *, int));
162 /* getservent is in libc.so.1 */
163 #define getservent res_getservent
164 struct servent
*getservent
__P((void));
166 /* getservent_r is in libc.so.1 */
167 #define getservent_r res_getservent_r
168 struct servent
*getservent_r
__P((struct servent
*, char *, int));
170 /* innetgr is in libc.so.1 */
171 #define innetgr res_innetgr
172 int innetgr
__P((const char *, const char *, const char *, const char *));
174 /* setprotoent is in libc.so.1 */
175 #define setprotoent res_setprotoent
176 void setprotoent
__P((int));
178 /* setservent is in libc.so.1 */
179 #define setservent res_setservent
180 void setservent
__P((int));
188 #endif /* _PORT_NETDB_H */