diff options
Diffstat (limited to 'freebsd/include/netdb.h')
-rw-r--r-- | freebsd/include/netdb.h | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/freebsd/include/netdb.h b/freebsd/include/netdb.h index 2c2e4b3f..2da7755d 100644 --- a/freebsd/include/netdb.h +++ b/freebsd/include/netdb.h @@ -60,6 +60,16 @@ #include <sys/cdefs.h> #include <sys/_types.h> +#ifndef _IN_ADDR_T_DECLARED +typedef __uint32_t in_addr_t; +#define _IN_ADDR_T_DECLARED +#endif + +#ifndef _IN_PORT_T_DECLARED +typedef __uint16_t in_port_t; +#define _IN_PORT_T_DECLARED +#endif + #ifndef _SIZE_T_DECLARED typedef __size_t size_t; #define _SIZE_T_DECLARED @@ -122,7 +132,7 @@ struct protoent { struct addrinfo { int ai_flags; /* AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST */ - int ai_family; /* PF_xxx */ + int ai_family; /* AF_xxx */ int ai_socktype; /* SOCK_xxx */ int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */ socklen_t ai_addrlen; /* length of ai_addr */ @@ -131,6 +141,8 @@ struct addrinfo { struct addrinfo *ai_next; /* next structure in linked list */ }; +#define IPPORT_RESERVED 1024 + /* * Error return codes from gethostbyname() and gethostbyaddr() * (left in h_errno). @@ -179,7 +191,7 @@ struct addrinfo { /* valid flags for addrinfo (not a standard def, apps should not use it) */ #define AI_MASK \ (AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST | AI_NUMERICSERV | \ - AI_ADDRCONFIG) + AI_ADDRCONFIG | AI_ALL | AI_V4MAPPED) #define AI_ALL 0x00000100 /* IPv6 and IPv4-mapped (with AI_V4MAPPED) */ #define AI_V4MAPPED_CFG 0x00000200 /* accept IPv4-mapped if kernel supports */ @@ -202,9 +214,7 @@ struct addrinfo { #define NI_NAMEREQD 0x00000004 #define NI_NUMERICSERV 0x00000008 #define NI_DGRAM 0x00000010 -#if 0 /* obsolete */ -#define NI_WITHSCOPEID 0x00000020 -#endif +#define NI_NUMERICSCOPE 0x00000020 /* * Scope delimit character @@ -263,6 +273,7 @@ int getnetbyname_r(const char *, struct netent *, char *, size_t, int getnetent_r(struct netent *, char *, size_t, struct netent **, int *); int getnetgrent(char **, char **, char **); +int getnetgrent_r(char **, char **, char **, char *, size_t); int getprotobyname_r(const char *, struct protoent *, char *, size_t, struct protoent **); int getprotobynumber_r(int, struct protoent *, char *, size_t, @@ -276,7 +287,7 @@ int getservbyport_r(int, const char *, struct servent *, char *, int getservent_r(struct servent *, char *, size_t, struct servent **); void herror(const char *); -__const char *hstrerror(int); +const char *hstrerror(int); int innetgr(const char *, const char *, const char *, const char *); void setnetgrent(const char *); #endif |