diff options
Diffstat (limited to 'mdk-stage1/dietlibc/include/netdb.h')
-rw-r--r-- | mdk-stage1/dietlibc/include/netdb.h | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/mdk-stage1/dietlibc/include/netdb.h b/mdk-stage1/dietlibc/include/netdb.h index 29f452ee9..887faa999 100644 --- a/mdk-stage1/dietlibc/include/netdb.h +++ b/mdk-stage1/dietlibc/include/netdb.h @@ -23,9 +23,9 @@ struct servent extern void endservent (void) __THROW; extern struct servent *getservent (void) __THROW; -extern struct servent *getservbyname (__const char *__name, - __const char *__proto) __THROW; -extern struct servent *getservbyport (int __port, __const char *__proto) +extern struct servent *getservbyname (const char *__name, + const char *__proto) __THROW; +extern struct servent *getservbyport (int __port, const char *__proto) __THROW; struct hostent @@ -45,4 +45,31 @@ extern struct hostent *gethostbyaddr (const void *__addr, socklen_t __len, extern struct hostent *gethostbyname (const char *__name) __THROW; extern struct hostent *gethostbyname2 (const char *__name, int __af) __THROW; +/* this glibc "invention" is so ugly, I'm going to throw up any minute + * now */ +extern int gethostbyname_r(const char* NAME, struct hostent* RESULT_BUF,char* BUF, + size_t BUFLEN, struct hostent** RESULT, + int* H_ERRNOP) __THROW; + +#define HOST_NOT_FOUND 1 +#define TRY_AGAIN 2 +#define NO_RECOVERY 3 +#define NO_ADDRESS 4 + +extern int gethostbyaddr_r(const char* addr, size_t length, int format, + struct hostent* result, char *buf, size_t buflen, + struct hostent **RESULT, int *h_errnop) __THROW; + +struct protoent { + char *p_name; /* official protocol name */ + char **p_aliases; /* alias list */ + int p_proto; /* protocol number */ +}; + +struct protoent *getprotoent(void) __THROW; +struct protoent *getprotobyname(const char *name) __THROW; +struct protoent *getprotobynumber(int proto) __THROW; +void setprotoent(int stayopen) __THROW; +void endprotoent(void) __THROW; + #endif |