1 /* $Id: stub.h,v 1.1.1.1 2003/06/04 00:27:13 marka Exp $ */
6 #ifdef HAVE_GETHOSTBYNAME
7 extern struct hostent *
8 idn_stub_gethostbyname(const char *name);
11 #ifdef GETHOST_R_GLIBC_FLAVOR
12 #ifdef HAVE_GETHOSTBYNAME_R
14 idn_stub_gethostbyname_r(const char *name, struct hostent *result,
15 char *buffer, size_t buflen,
16 struct hostent **rp, int *errp);
18 #else /* GETHOST_R_GLIBC_FLAVOR */
19 #ifdef HAVE_GETHOSTBYNAME_R
20 extern struct hostent *
21 idn_stub_gethostbyname_r(const char *name, struct hostent *result,
22 char *buffer, int buflen, int *errp);
24 #endif /* GETHOST_R_GLIBC_FLAVOR */
26 #ifdef HAVE_GETHOSTBYNAME2
27 extern struct hostent *
28 idn_stub_gethostbyname2(const char *name, int af);
31 #ifdef GETHOST_R_GLIBC_FLAVOR
32 #ifdef HAVE_GETHOSTBYNAME2_R
34 idn_stub_gethostbyname2_r(const char *name, int af, struct hostent *result,
35 char *buffer, size_t buflen,
36 struct hostent **rp, int *errp);
38 #endif /* GETHOST_R_GLIBC_FLAVOR */
40 #ifdef HAVE_GETHOSTBYADDR
41 extern struct hostent *
42 idn_stub_gethostbyaddr(GHBA_ADDR_T addr, GHBA_ADDRLEN_T len, int type);
45 #ifdef GETHOST_R_GLIBC_FLAVOR
46 #ifdef HAVE_GETHOSTBYADDR_R
48 idn_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);
52 #else /* GETHOST_R_GLIBC_FLAVOR */
53 #ifdef HAVE_GETHOSTBYADDR_R
54 extern struct hostent *
55 idn_stub_gethostbyaddr_r(GHBA_ADDR_T addr, GHBA_ADDRLEN_T len, int type,
56 struct hostent *result, char *buffer,
57 int buflen, int *errp);
59 #endif /* GETHOST_R_GLIBC_FLAVOR */
61 #ifdef HAVE_GETIPNODEBYNAME
62 extern struct hostent *
63 idn_stub_getipnodebyname(const char *name, int af, int flags, int *errp);
66 #ifdef HAVE_GETIPNODEBYADDR
67 extern struct hostent *
68 idn_stub_getipnodebyaddr(const void *src, size_t len, int af, int *errp);
71 #ifdef HAVE_FREEHOSTENT
73 idn_stub_freehostent(struct hostent *hp);
76 #ifdef HAVE_GETADDRINFO
78 idn_stub_getaddrinfo(const char *nodename, const char *servname,
79 const struct addrinfo *hints, struct addrinfo **res);
82 #ifdef HAVE_FREEADDRINFO
84 idn_stub_freeaddrinfo(struct addrinfo *aip);
87 #ifdef HAVE_GETNAMEINFO
89 idn_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);