1/* $Id: stub.h,v 1.1 2003/06/04 00:27:13 marka Exp $ */ 2 3#ifndef STUB_H 4#define STUB_H 5 6#ifdef HAVE_GETHOSTBYNAME 7extern struct hostent * 8idn_stub_gethostbyname(const char *name); 9#endif 10 11#ifdef GETHOST_R_GLIBC_FLAVOR 12#ifdef HAVE_GETHOSTBYNAME_R 13extern int 14idn_stub_gethostbyname_r(const char *name, struct hostent *result, 15 char *buffer, size_t buflen, 16 struct hostent **rp, int *errp); 17#endif 18#else /* GETHOST_R_GLIBC_FLAVOR */ 19#ifdef HAVE_GETHOSTBYNAME_R 20extern struct hostent * 21idn_stub_gethostbyname_r(const char *name, struct hostent *result, 22 char *buffer, int buflen, int *errp); 23#endif 24#endif /* GETHOST_R_GLIBC_FLAVOR */ 25 26#ifdef HAVE_GETHOSTBYNAME2 27extern struct hostent * 28idn_stub_gethostbyname2(const char *name, int af); 29#endif 30 31#ifdef GETHOST_R_GLIBC_FLAVOR 32#ifdef HAVE_GETHOSTBYNAME2_R 33extern int 34idn_stub_gethostbyname2_r(const char *name, int af, struct hostent *result, 35 char *buffer, size_t buflen, 36 struct hostent **rp, int *errp); 37#endif 38#endif /* GETHOST_R_GLIBC_FLAVOR */ 39 40#ifdef HAVE_GETHOSTBYADDR 41extern struct hostent * 42idn_stub_gethostbyaddr(GHBA_ADDR_T addr, GHBA_ADDRLEN_T len, int type); 43#endif 44 45#ifdef GETHOST_R_GLIBC_FLAVOR 46#ifdef HAVE_GETHOSTBYADDR_R 47extern int 48idn_stub_gethostbyaddr_r(GHBA_ADDR_T addr, GHBA_ADDRLEN_T len, int type, 49 struct hostent *result, char *buffer, 50 size_t buflen, struct hostent **rp, int *errp); 51#endif 52#else /* GETHOST_R_GLIBC_FLAVOR */ 53#ifdef HAVE_GETHOSTBYADDR_R 54extern struct hostent * 55idn_stub_gethostbyaddr_r(GHBA_ADDR_T addr, GHBA_ADDRLEN_T len, int type, 56 struct hostent *result, char *buffer, 57 int buflen, int *errp); 58#endif 59#endif /* GETHOST_R_GLIBC_FLAVOR */ 60 61#ifdef HAVE_GETIPNODEBYNAME 62extern struct hostent * 63idn_stub_getipnodebyname(const char *name, int af, int flags, int *errp); 64#endif 65 66#ifdef HAVE_GETIPNODEBYADDR 67extern struct hostent * 68idn_stub_getipnodebyaddr(const void *src, size_t len, int af, int *errp); 69#endif 70 71#ifdef HAVE_FREEHOSTENT 72extern void 73idn_stub_freehostent(struct hostent *hp); 74#endif 75 76#ifdef HAVE_GETADDRINFO 77extern int 78idn_stub_getaddrinfo(const char *nodename, const char *servname, 79 const struct addrinfo *hints, struct addrinfo **res); 80#endif 81 82#ifdef HAVE_FREEADDRINFO 83extern void 84idn_stub_freeaddrinfo(struct addrinfo *aip); 85#endif 86 87#ifdef HAVE_GETNAMEINFO 88extern int 89idn_stub_getnameinfo(const struct sockaddr *sa, GNI_SALEN_T salen, 90 char *host, GNI_HOSTLEN_T hostlen, char *serv, 91 GNI_SERVLEN_T servlen, GNI_FLAGS_T flags); 92#endif 93 94#endif /* STUB_H */ 95