forgot toolchain
[tomato.git] / release / src-rt-6.x.4708 / toolchains / hndtools-arm-linux-2.6.36-uclibc-4.5.3 / arm-brcm-linux-uclibcgnueabi / sysroot / usr / include / netdb.h
blobde4dc6baf51d015363f0b0d71555149ed99ae589
1 /* Copyright (C) 1996-2002, 2003, 2004 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, write to the Free
16 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
17 02111-1307 USA. */
19 /* All data returned by the network data base library are supplied in
20 host order and returned in network order (suitable for use in
21 system calls). */
23 #ifndef _NETDB_H
24 #define _NETDB_H 1
26 #include <features.h>
28 #include <netinet/in.h>
29 #include <stdint.h>
30 #if defined __USE_MISC && defined __UCLIBC_HAS_RPC__
31 /* This is necessary to make this include file properly replace the
32 Sun version. */
33 # include <rpc/netdb.h>
34 #endif
36 #ifdef __USE_GNU
37 # define __need_sigevent_t
38 # include <bits/siginfo.h>
39 # define __need_timespec
40 # include <time.h>
41 #endif
43 #include <bits/netdb.h>
45 /* Absolute file name for network data base files. */
46 #define _PATH_HEQUIV "/etc/hosts.equiv"
47 #define _PATH_HOSTS "/etc/hosts"
48 #define _PATH_NETWORKS "/etc/networks"
49 #define _PATH_NSSWITCH_CONF "/etc/nsswitch.conf"
50 #define _PATH_PROTOCOLS "/etc/protocols"
51 #define _PATH_SERVICES "/etc/services"
54 __BEGIN_DECLS
56 /* Error status for non-reentrant lookup functions.
57 We use a macro to access always the thread-specific `h_errno' variable. */
58 #define h_errno (*__h_errno_location ())
60 /* Function to get address of global `h_errno' variable. */
61 extern int *__h_errno_location (void) __THROW __attribute__ ((__const__));
63 /* Macros for accessing h_errno from inside libc. */
65 /* Possible values left in `h_errno'. */
66 #define NETDB_INTERNAL -1 /* See errno. */
67 #define NETDB_SUCCESS 0 /* No problem. */
68 #define HOST_NOT_FOUND 1 /* Authoritative Answer Host not found. */
69 #define TRY_AGAIN 2 /* Non-Authoritative Host not found,
70 or SERVERFAIL. */
71 #define NO_RECOVERY 3 /* Non recoverable errors, FORMERR, REFUSED,
72 NOTIMP. */
73 #define NO_DATA 4 /* Valid name, no data record of requested
74 type. */
75 #define NO_ADDRESS NO_DATA /* No address, look for MX record. */
77 #ifdef __USE_XOPEN2K
78 /* Highest reserved Internet port number. */
79 # define IPPORT_RESERVED 1024
80 #endif
82 #ifdef __USE_GNU
83 /* Scope delimiter for getaddrinfo(), getnameinfo(). */
84 # define SCOPE_DELIMITER '%'
85 #endif
87 /* Print error indicated by `h_errno' variable on standard error. STR
88 if non-null is printed before the error string. */
89 extern void herror (__const char *__str) __THROW;
91 /* Return string associated with error ERR_NUM. */
92 extern __const char *hstrerror (int __err_num) __THROW;
95 /* Description of data base entry for a single host. */
96 struct hostent
98 char *h_name; /* Official name of host. */
99 char **h_aliases; /* Alias list. */
100 int h_addrtype; /* Host address type. */
101 int h_length; /* Length of address. */
102 char **h_addr_list; /* List of addresses from name server. */
103 #define h_addr h_addr_list[0] /* Address, for backward compatibility. */
106 /* Open host data base files and mark them as staying open even after
107 a later search if STAY_OPEN is non-zero.
109 This function is a possible cancellation point and therefore not
110 marked with __THROW. */
111 extern void sethostent (int __stay_open);
113 /* Close host data base files and clear `stay open' flag.
115 This function is a possible cancellation point and therefore not
116 marked with __THROW. */
117 extern void endhostent (void);
119 /* Get next entry from host data base file. Open data base if
120 necessary.
122 This function is a possible cancellation point and therefore not
123 marked with __THROW. */
124 extern struct hostent *gethostent (void);
126 /* Return entry from host data base which address match ADDR with
127 length LEN and type TYPE.
129 This function is a possible cancellation point and therefore not
130 marked with __THROW. */
131 extern struct hostent *gethostbyaddr (__const void *__addr, __socklen_t __len,
132 int __type);
134 /* Return entry from host data base for host with NAME.
136 This function is a possible cancellation point and therefore not
137 marked with __THROW. */
138 extern struct hostent *gethostbyname (__const char *__name);
140 #ifdef __USE_MISC
141 /* Return entry from host data base for host with NAME. AF must be
142 set to the address type which is `AF_INET' for IPv4 or `AF_INET6'
143 for IPv6.
145 This function is not part of POSIX and therefore no official
146 cancellation point. But due to similarity with an POSIX interface
147 or due to the implementation it is a cancellation point and
148 therefore not marked with __THROW. */
149 extern struct hostent *gethostbyname2 (__const char *__name, int __af);
151 /* Reentrant versions of the functions above. The additional
152 arguments specify a buffer of BUFLEN starting at BUF. The last
153 argument is a pointer to a variable which gets the value which
154 would be stored in the global variable `herrno' by the
155 non-reentrant functions.
157 These functions are not part of POSIX and therefore no official
158 cancellation point. But due to similarity with an POSIX interface
159 or due to the implementation they are cancellation points and
160 therefore not marked with __THROW. */
161 extern int gethostent_r (struct hostent *__restrict __result_buf,
162 char *__restrict __buf, size_t __buflen,
163 struct hostent **__restrict __result,
164 int *__restrict __h_errnop);
166 extern int gethostbyaddr_r (__const void *__restrict __addr, __socklen_t __len,
167 int __type,
168 struct hostent *__restrict __result_buf,
169 char *__restrict __buf, size_t __buflen,
170 struct hostent **__restrict __result,
171 int *__restrict __h_errnop);
173 extern int gethostbyname_r (__const char *__restrict __name,
174 struct hostent *__restrict __result_buf,
175 char *__restrict __buf, size_t __buflen,
176 struct hostent **__restrict __result,
177 int *__restrict __h_errnop);
179 extern int gethostbyname2_r (__const char *__restrict __name, int __af,
180 struct hostent *__restrict __result_buf,
181 char *__restrict __buf, size_t __buflen,
182 struct hostent **__restrict __result,
183 int *__restrict __h_errnop);
184 #endif /* misc */
187 /* Open network data base files and mark them as staying open even
188 after a later search if STAY_OPEN is non-zero.
190 This function is a possible cancellation point and therefore not
191 marked with __THROW. */
192 extern void setnetent (int __stay_open);
194 /* Close network data base files and clear `stay open' flag.
196 This function is a possible cancellation point and therefore not
197 marked with __THROW. */
198 extern void endnetent (void);
200 /* Get next entry from network data base file. Open data base if
201 necessary.
203 This function is a possible cancellation point and therefore not
204 marked with __THROW. */
205 extern struct netent *getnetent (void);
207 /* Return entry from network data base which address match NET and
208 type TYPE.
210 This function is a possible cancellation point and therefore not
211 marked with __THROW. */
212 extern struct netent *getnetbyaddr (uint32_t __net, int __type);
214 /* Return entry from network data base for network with NAME.
216 This function is a possible cancellation point and therefore not
217 marked with __THROW. */
218 extern struct netent *getnetbyname (__const char *__name);
220 #ifdef __USE_MISC
221 /* Reentrant versions of the functions above. The additional
222 arguments specify a buffer of BUFLEN starting at BUF. The last
223 argument is a pointer to a variable which gets the value which
224 would be stored in the global variable `herrno' by the
225 non-reentrant functions.
227 These functions are not part of POSIX and therefore no official
228 cancellation point. But due to similarity with an POSIX interface
229 or due to the implementation they are cancellation points and
230 therefore not marked with __THROW. */
231 extern int getnetent_r (struct netent *__restrict __result_buf,
232 char *__restrict __buf, size_t __buflen,
233 struct netent **__restrict __result,
234 int *__restrict __h_errnop);
235 extern int getnetbyaddr_r (uint32_t __net, int __type,
236 struct netent *__restrict __result_buf,
237 char *__restrict __buf, size_t __buflen,
238 struct netent **__restrict __result,
239 int *__restrict __h_errnop);
240 extern int getnetbyname_r (__const char *__restrict __name,
241 struct netent *__restrict __result_buf,
242 char *__restrict __buf, size_t __buflen,
243 struct netent **__restrict __result,
244 int *__restrict __h_errnop);
245 #endif /* __USE_MISC */
248 /* Description of data base entry for a single service. */
249 struct servent
251 char *s_name; /* Official service name. */
252 char **s_aliases; /* Alias list. */
253 int s_port; /* Port number. */
254 char *s_proto; /* Protocol to use. */
257 /* Open service data base files and mark them as staying open even
258 after a later search if STAY_OPEN is non-zero.
260 This function is a possible cancellation point and therefore not
261 marked with __THROW. */
262 extern void setservent (int __stay_open);
264 /* Close service data base files and clear `stay open' flag.
266 This function is a possible cancellation point and therefore not
267 marked with __THROW. */
268 extern void endservent (void);
270 /* Get next entry from service data base file. Open data base if
271 necessary.
273 This function is a possible cancellation point and therefore not
274 marked with __THROW. */
275 extern struct servent *getservent (void);
277 /* Return entry from network data base for network with NAME and
278 protocol PROTO.
280 This function is a possible cancellation point and therefore not
281 marked with __THROW. */
282 extern struct servent *getservbyname (__const char *__name,
283 __const char *__proto);
285 /* Return entry from service data base which matches port PORT and
286 protocol PROTO.
288 This function is a possible cancellation point and therefore not
289 marked with __THROW. */
290 extern struct servent *getservbyport (int __port, __const char *__proto);
293 #ifdef __USE_MISC
294 /* Reentrant versions of the functions above. The additional
295 arguments specify a buffer of BUFLEN starting at BUF.
297 These functions are not part of POSIX and therefore no official
298 cancellation point. But due to similarity with an POSIX interface
299 or due to the implementation they are cancellation points and
300 therefore not marked with __THROW. */
301 extern int getservent_r (struct servent *__restrict __result_buf,
302 char *__restrict __buf, size_t __buflen,
303 struct servent **__restrict __result);
305 extern int getservbyname_r (__const char *__restrict __name,
306 __const char *__restrict __proto,
307 struct servent *__restrict __result_buf,
308 char *__restrict __buf, size_t __buflen,
309 struct servent **__restrict __result);
311 extern int getservbyport_r (int __port, __const char *__restrict __proto,
312 struct servent *__restrict __result_buf,
313 char *__restrict __buf, size_t __buflen,
314 struct servent **__restrict __result);
315 #endif /* misc */
318 /* Description of data base entry for a single service. */
319 struct protoent
321 char *p_name; /* Official protocol name. */
322 char **p_aliases; /* Alias list. */
323 int p_proto; /* Protocol number. */
326 /* Open protocol data base files and mark them as staying open even
327 after a later search if STAY_OPEN is non-zero.
329 This function is a possible cancellation point and therefore not
330 marked with __THROW. */
331 extern void setprotoent (int __stay_open);
333 /* Close protocol data base files and clear `stay open' flag.
335 This function is a possible cancellation point and therefore not
336 marked with __THROW. */
337 extern void endprotoent (void);
339 /* Get next entry from protocol data base file. Open data base if
340 necessary.
342 This function is a possible cancellation point and therefore not
343 marked with __THROW. */
344 extern struct protoent *getprotoent (void);
346 /* Return entry from protocol data base for network with NAME.
348 This function is a possible cancellation point and therefore not
349 marked with __THROW. */
350 extern struct protoent *getprotobyname (__const char *__name);
352 /* Return entry from protocol data base which number is PROTO.
354 This function is a possible cancellation point and therefore not
355 marked with __THROW. */
356 extern struct protoent *getprotobynumber (int __proto);
359 #ifdef __USE_MISC
360 /* Reentrant versions of the functions above. The additional
361 arguments specify a buffer of BUFLEN starting at BUF.
363 These functions are not part of POSIX and therefore no official
364 cancellation point. But due to similarity with an POSIX interface
365 or due to the implementation they are cancellation points and
366 therefore not marked with __THROW. */
367 extern int getprotoent_r (struct protoent *__restrict __result_buf,
368 char *__restrict __buf, size_t __buflen,
369 struct protoent **__restrict __result);
371 extern int getprotobyname_r (__const char *__restrict __name,
372 struct protoent *__restrict __result_buf,
373 char *__restrict __buf, size_t __buflen,
374 struct protoent **__restrict __result);
376 extern int getprotobynumber_r (int __proto,
377 struct protoent *__restrict __result_buf,
378 char *__restrict __buf, size_t __buflen,
379 struct protoent **__restrict __result);
382 #ifdef __UCLIBC_HAS_NETGROUP__
383 /* Establish network group NETGROUP for enumeration.
385 This function is not part of POSIX and therefore no official
386 cancellation point. But due to similarity with an POSIX interface
387 or due to the implementation it is a cancellation point and
388 therefore not marked with __THROW. */
389 extern int setnetgrent (__const char *__netgroup);
391 /* Free all space allocated by previous `setnetgrent' call.
393 This function is not part of POSIX and therefore no official
394 cancellation point. But due to similarity with an POSIX interface
395 or due to the implementation it is a cancellation point and
396 therefore not marked with __THROW. */
397 extern void endnetgrent (void);
399 /* Get next member of netgroup established by last `setnetgrent' call
400 and return pointers to elements in HOSTP, USERP, and DOMAINP.
402 This function is not part of POSIX and therefore no official
403 cancellation point. But due to similarity with an POSIX interface
404 or due to the implementation it is a cancellation point and
405 therefore not marked with __THROW. */
406 extern int getnetgrent (char **__restrict __hostp,
407 char **__restrict __userp,
408 char **__restrict __domainp);
411 /* Test whether NETGROUP contains the triple (HOST,USER,DOMAIN).
413 This function is not part of POSIX and therefore no official
414 cancellation point. But due to similarity with an POSIX interface
415 or due to the implementation it is a cancellation point and
416 therefore not marked with __THROW. */
417 extern int innetgr (__const char *__netgroup, __const char *__host,
418 __const char *__user, __const char *domain);
420 /* Reentrant version of `getnetgrent' where result is placed in BUFFER.
422 This function is not part of POSIX and therefore no official
423 cancellation point. But due to similarity with an POSIX interface
424 or due to the implementation it is a cancellation point and
425 therefore not marked with __THROW. */
426 extern int getnetgrent_r (char **__restrict __hostp,
427 char **__restrict __userp,
428 char **__restrict __domainp,
429 char *__restrict __buffer, size_t __buflen);
430 #endif /* UCLIBC_HAS_NETGROUP */
431 #endif /* misc */
434 /* ruserpass - remote password check.
435 This function also exists in glibc but is undocumented */
436 extern int ruserpass(const char *host, const char **aname, const char **apass);
439 #ifdef __USE_BSD
440 /* Call `rshd' at port RPORT on remote machine *AHOST to execute CMD.
441 The local user is LOCUSER, on the remote machine the command is
442 executed as REMUSER. In *FD2P the descriptor to the socket for the
443 connection is returned. The caller must have the right to use a
444 reserved port. When the function returns *AHOST contains the
445 official host name.
447 This function is not part of POSIX and therefore no official
448 cancellation point. But due to similarity with an POSIX interface
449 or due to the implementation it is a cancellation point and
450 therefore not marked with __THROW. */
451 extern int rcmd (char **__restrict __ahost, unsigned short int __rport,
452 __const char *__restrict __locuser,
453 __const char *__restrict __remuser,
454 __const char *__restrict __cmd, int *__restrict __fd2p);
456 #if 0
457 /* FIXME */
458 /* This is the equivalent function where the protocol can be selected
459 and which therefore can be used for IPv6.
461 This function is not part of POSIX and therefore no official
462 cancellation point. But due to similarity with an POSIX interface
463 or due to the implementation it is a cancellation point and
464 therefore not marked with __THROW. */
465 extern int rcmd_af (char **__restrict __ahost, unsigned short int __rport,
466 __const char *__restrict __locuser,
467 __const char *__restrict __remuser,
468 __const char *__restrict __cmd, int *__restrict __fd2p,
469 sa_family_t __af);
470 #endif
472 /* Call `rexecd' at port RPORT on remote machine *AHOST to execute
473 CMD. The process runs at the remote machine using the ID of user
474 NAME whose cleartext password is PASSWD. In *FD2P the descriptor
475 to the socket for the connection is returned. When the function
476 returns *AHOST contains the official host name.
478 This function is not part of POSIX and therefore no official
479 cancellation point. But due to similarity with an POSIX interface
480 or due to the implementation it is a cancellation point and
481 therefore not marked with __THROW. */
482 extern int rexec (char **__restrict __ahost, int __rport,
483 __const char *__restrict __name,
484 __const char *__restrict __pass,
485 __const char *__restrict __cmd, int *__restrict __fd2p);
487 /* This is the equivalent function where the protocol can be selected
488 and which therefore can be used for IPv6.
490 This function is not part of POSIX and therefore no official
491 cancellation point. But due to similarity with an POSIX interface
492 or due to the implementation it is a cancellation point and
493 therefore not marked with __THROW. */
494 extern int rexec_af (char **__restrict __ahost, int __rport,
495 __const char *__restrict __name,
496 __const char *__restrict __pass,
497 __const char *__restrict __cmd, int *__restrict __fd2p,
498 sa_family_t __af);
500 /* Check whether user REMUSER on system RHOST is allowed to login as LOCUSER.
501 If SUSER is not zero the user tries to become superuser. Return 0 if
502 it is possible.
504 This function is not part of POSIX and therefore no official
505 cancellation point. But due to similarity with an POSIX interface
506 or due to the implementation it is a cancellation point and
507 therefore not marked with __THROW. */
508 extern int ruserok (__const char *__rhost, int __suser,
509 __const char *__remuser, __const char *__locuser);
511 #if 0
512 /* FIXME */
513 /* This is the equivalent function where the protocol can be selected
514 and which therefore can be used for IPv6.
516 This function is not part of POSIX and therefore no official
517 cancellation point. But due to similarity with an POSIX interface
518 or due to the implementation it is a cancellation point and
519 therefore not marked with __THROW. */
520 extern int ruserok_af (__const char *__rhost, int __suser,
521 __const char *__remuser, __const char *__locuser,
522 sa_family_t __af);
523 #endif
525 /* Try to allocate reserved port, returning a descriptor for a socket opened
526 at this port or -1 if unsuccessful. The search for an available port
527 will start at ALPORT and continues with lower numbers.
529 This function is not part of POSIX and therefore no official
530 cancellation point. But due to similarity with an POSIX interface
531 or due to the implementation it is a cancellation point and
532 therefore not marked with __THROW. */
533 extern int rresvport (int *__alport);
535 #if 0
536 /* FIXME */
537 /* This is the equivalent function where the protocol can be selected
538 and which therefore can be used for IPv6.
540 This function is not part of POSIX and therefore no official
541 cancellation point. But due to similarity with an POSIX interface
542 or due to the implementation it is a cancellation point and
543 therefore not marked with __THROW. */
544 extern int rresvport_af (int *__alport, sa_family_t __af);
545 #endif
546 #endif
549 /* Extension from POSIX.1g. */
550 #ifdef __USE_POSIX
551 /* Structure to contain information about address of a service provider. */
552 struct addrinfo
554 int ai_flags; /* Input flags. */
555 int ai_family; /* Protocol family for socket. */
556 int ai_socktype; /* Socket type. */
557 int ai_protocol; /* Protocol for socket. */
558 socklen_t ai_addrlen; /* Length of socket address. */
559 struct sockaddr *ai_addr; /* Socket address for socket. */
560 char *ai_canonname; /* Canonical name for service location. */
561 struct addrinfo *ai_next; /* Pointer to next in list. */
564 /* Possible values for `ai_flags' field in `addrinfo' structure. */
565 # define AI_PASSIVE 0x0001 /* Socket address is intended for `bind'. */
566 # define AI_CANONNAME 0x0002 /* Request for canonical name. */
567 # define AI_NUMERICHOST 0x0004 /* Don't use name resolution. */
568 # define AI_V4MAPPED 0x0008 /* IPv4 mapped addresses are acceptable. */
569 # define AI_ALL 0x0010 /* Return IPv4 mapped and IPv6 addresses. */
570 # define AI_ADDRCONFIG 0x0020 /* Use configuration of this host to choose
571 returned address type.. */
572 # ifdef __USE_GNU
573 # define AI_IDN 0x0040 /* IDN encode input (assuming it is encoded
574 in the current locale's character set)
575 before looking it up. */
576 # define AI_CANONIDN 0x0080 /* Translate canonical name from IDN format. */
577 # define AI_IDN_ALLOW_UNASSIGNED 0x0100 /* Don't reject unassigned Unicode
578 code points. */
579 # define AI_IDN_USE_STD3_ASCII_RULES 0x0200 /* Validate strings according to
580 STD3 rules. */
581 # endif
582 # define AI_NUMERICSERV 0x0400 /* Don't use name resolution. */
584 /* Error values for `getaddrinfo' function. */
585 # define EAI_BADFLAGS -1 /* Invalid value for `ai_flags' field. */
586 # define EAI_NONAME -2 /* NAME or SERVICE is unknown. */
587 # define EAI_AGAIN -3 /* Temporary failure in name resolution. */
588 # define EAI_FAIL -4 /* Non-recoverable failure in name res. */
589 # define EAI_NODATA -5 /* No address associated with NAME. */
590 # define EAI_FAMILY -6 /* `ai_family' not supported. */
591 # define EAI_SOCKTYPE -7 /* `ai_socktype' not supported. */
592 # define EAI_SERVICE -8 /* SERVICE not supported for `ai_socktype'. */
593 # define EAI_ADDRFAMILY -9 /* Address family for NAME not supported. */
594 # define EAI_MEMORY -10 /* Memory allocation failure. */
595 # define EAI_SYSTEM -11 /* System error returned in `errno'. */
596 # define EAI_OVERFLOW -12 /* Argument buffer overflow. */
597 # ifdef __USE_GNU
598 # define EAI_INPROGRESS -100 /* Processing request in progress. */
599 # define EAI_CANCELED -101 /* Request canceled. */
600 # define EAI_NOTCANCELED -102 /* Request not canceled. */
601 # define EAI_ALLDONE -103 /* All requests done. */
602 # define EAI_INTR -104 /* Interrupted by a signal. */
603 # define EAI_IDN_ENCODE -105 /* IDN encoding failed. */
604 # endif
606 # define NI_MAXHOST 1025
607 # define NI_MAXSERV 32
609 # define NI_NUMERICHOST 1 /* Don't try to look up hostname. */
610 # define NI_NUMERICSERV 2 /* Don't convert port number to name. */
611 # define NI_NOFQDN 4 /* Only return nodename portion. */
612 # define NI_NAMEREQD 8 /* Don't return numeric addresses. */
613 # define NI_DGRAM 16 /* Look up UDP service rather than TCP. */
614 # ifdef __USE_GNU
615 # define NI_IDN 32 /* Convert name from IDN format. */
616 # define NI_IDN_ALLOW_UNASSIGNED 64 /* Don't reject unassigned Unicode
617 code points. */
618 # define NI_IDN_USE_STD3_ASCII_RULES 128 /* Validate strings according to
619 STD3 rules. */
620 # endif
622 /* Translate name of a service location and/or a service name to set of
623 socket addresses.
625 This function is a possible cancellation point and therefore not
626 marked with __THROW. */
627 extern int getaddrinfo (__const char *__restrict __name,
628 __const char *__restrict __service,
629 __const struct addrinfo *__restrict __req,
630 struct addrinfo **__restrict __pai);
632 /* Free `addrinfo' structure AI including associated storage. */
633 extern void freeaddrinfo (struct addrinfo *__ai) __THROW;
635 /* Convert error return from getaddrinfo() to a string. */
636 extern __const char *gai_strerror (int __ecode) __THROW;
638 /* Translate a socket address to a location and service name.
640 This function is a possible cancellation point and therefore not
641 marked with __THROW. */
642 extern int getnameinfo (__const struct sockaddr *__restrict __sa,
643 socklen_t __salen, char *__restrict __host,
644 socklen_t __hostlen, char *__restrict __serv,
645 socklen_t __servlen, unsigned int __flags);
646 #endif /* POSIX */
648 __END_DECLS
650 #endif /* netdb.h */