summaryrefslogtreecommitdiff
path: root/resolv/netdb.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-04-02 03:09:41 +0000
committerUlrich Drepper <drepper@redhat.com>2000-04-02 03:09:41 +0000
commitad483238a1ef7bce6d8534a84ba548c455d1631e (patch)
treecb89ea9fdeba2be20d846869bcf726d9dca43f25 /resolv/netdb.h
parent9b48fa9b416094acd0f25a605c768f6cf3798f71 (diff)
Update.
* inet/arpa/inet.h (inet_addr): Change return type to in_addr_t. (inet_lnaof): Likewise. (inet_netof): Likewise. (inet_network): Likewise. (inet_aton): Likewise. (inet_makeaddr): Change parameter types to in_addr_t. (inet_neta): Likewise. (inet_ntop): Change type of last parameter to socklen_t. (inet_aton): Only make available if __USE_MISC. (inet_neta): Likewise. (inet_net_ntop): Likewise. (inet_net_pton): Likewise. (inet_nsap_ntoa): Likewise. * inet/in.h: Define in_port_t type. Define in_addr_t type. (struct in_addr): Use in_addr_t in definition. (IN_CLASSA): Use cast to in_addr_t. (IN_CLASSB): Likewise. (IN_CLASSC): Likewise. (IN_CLASSD): Likewise. (IN_EXPERIMENTAL): Likewise. (IN_BADCLASS): Likewise. (INADDR_ANY): Likewise. (INADDR_BROADCAST): Likewise. (INADDR_NONE): Likewise. (INADDR_LOOPBACK): Likewise. (INADDR_UNSPEC_GROUP): Likewise. (INADDR_ALLHOSTS_GROUP): Likewise. (INADDR_ALLRTRS_GROUP): Likewise. (INADDR_MAX_LOCAL_GROUP): Likewise. (struct sockaddr_in): Use in_port_t for sin_port element. (struct sockaddr_in6): Use in_port_t for sin6_port element. Use uint8_t instead of u_int8_t. * resolv/inet_addr.c (inet_addr): Change return type to in_addr_t. Call __inet_aton instead of inet_aton. (__inet_aton): Renamed from inet_aton. Add weak alias under old name. * resolv/netdb.h (gethostbyname2): Define only is __USE_MISC. (innetgr): Likewise. (struct addrinfo): Use socklen_t for ai_addrlen element. * sysdeps/unix/sysv/linux/bits/in.h (IPV6_MTU_DISCOVER, IPV6_MTU, IPV6_RECVERR): New defines.
Diffstat (limited to 'resolv/netdb.h')
-rw-r--r--resolv/netdb.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/resolv/netdb.h b/resolv/netdb.h
index 50420c3e44..1f96351e36 100644
--- a/resolv/netdb.h
+++ b/resolv/netdb.h
@@ -131,10 +131,12 @@ extern struct hostent *gethostbyaddr (__const char *__addr, size_t __len,
/* Return entry from host data base for host with NAME. */
extern struct hostent *gethostbyname (__const char *__name) __THROW;
+#ifdef __USE_MISC
/* Return entry from host data base for host with NAME. AF must be
set to the address type which is `AF_INET' for IPv4 or `AF_INET6'
for IPv6. */
extern struct hostent *gethostbyname2 (__const char *__name, int __af) __THROW;
+#endif
#ifdef __USE_UNIX98
/* Return entry from host data base which address match ADDR with
@@ -343,11 +345,11 @@ extern int getnetgrent (char **__restrict __hostp,
char **__restrict __userp,
char **__restrict __domainp) __THROW;
+#ifdef __USE_MISC
/* Test whether NETGROUP contains the triple (HOST,USER,DOMAIN). */
extern int innetgr (__const char *__netgroup, __const char *__host,
__const char *__user, __const char *domain) __THROW;
-#ifdef __USE_MISC
/* Reentrant version of `getnetgrent' where result is placed in BUFFER. */
extern int getnetgrent_r (char **__restrict __hostp,
char **__restrict __userp,
@@ -428,7 +430,7 @@ struct addrinfo
int ai_family; /* Protocol family for socket. */
int ai_socktype; /* Socket type. */
int ai_protocol; /* Protocol for socket. */
- int ai_addrlen; /* Length of socket address. */
+ socklen_t ai_addrlen; /* Length of socket address. */
struct sockaddr *ai_addr; /* Socket address for socket. */
char *ai_canonname; /* Canonical name for service location. */
struct addrinfo *ai_next; /* Pointer to next in list. */