1 /* $NetBSD: stub.h,v 1.4 2014/12/10 04:37:56 christos Exp $ */
3 /* Id: stub.h,v 1.1 2003/06/04 00:27:13 marka Exp */
8 #ifdef HAVE_GETHOSTBYNAME
9 extern struct hostent
*
10 idn_stub_gethostbyname(const char *name
);
13 #ifdef GETHOST_R_GLIBC_FLAVOR
14 #ifdef HAVE_GETHOSTBYNAME_R
16 idn_stub_gethostbyname_r(const char *name
, struct hostent
*result
,
17 char *buffer
, size_t buflen
,
18 struct hostent
**rp
, int *errp
);
20 #else /* GETHOST_R_GLIBC_FLAVOR */
21 #ifdef HAVE_GETHOSTBYNAME_R
22 extern struct hostent
*
23 idn_stub_gethostbyname_r(const char *name
, struct hostent
*result
,
24 char *buffer
, int buflen
, int *errp
);
26 #endif /* GETHOST_R_GLIBC_FLAVOR */
28 #ifdef HAVE_GETHOSTBYNAME2
29 extern struct hostent
*
30 idn_stub_gethostbyname2(const char *name
, int af
);
33 #ifdef GETHOST_R_GLIBC_FLAVOR
34 #ifdef HAVE_GETHOSTBYNAME2_R
36 idn_stub_gethostbyname2_r(const char *name
, int af
, struct hostent
*result
,
37 char *buffer
, size_t buflen
,
38 struct hostent
**rp
, int *errp
);
40 #endif /* GETHOST_R_GLIBC_FLAVOR */
42 #ifdef HAVE_GETHOSTBYADDR
43 extern struct hostent
*
44 idn_stub_gethostbyaddr(GHBA_ADDR_T addr
, GHBA_ADDRLEN_T len
, int type
);
47 #ifdef GETHOST_R_GLIBC_FLAVOR
48 #ifdef HAVE_GETHOSTBYADDR_R
50 idn_stub_gethostbyaddr_r(GHBA_ADDR_T addr
, GHBA_ADDRLEN_T len
, int type
,
51 struct hostent
*result
, char *buffer
,
52 size_t buflen
, struct hostent
**rp
, int *errp
);
54 #else /* GETHOST_R_GLIBC_FLAVOR */
55 #ifdef HAVE_GETHOSTBYADDR_R
56 extern struct hostent
*
57 idn_stub_gethostbyaddr_r(GHBA_ADDR_T addr
, GHBA_ADDRLEN_T len
, int type
,
58 struct hostent
*result
, char *buffer
,
59 int buflen
, int *errp
);
61 #endif /* GETHOST_R_GLIBC_FLAVOR */
63 #ifdef HAVE_GETIPNODEBYNAME
64 extern struct hostent
*
65 idn_stub_getipnodebyname(const char *name
, int af
, int flags
, int *errp
);
68 #ifdef HAVE_GETIPNODEBYADDR
69 extern struct hostent
*
70 idn_stub_getipnodebyaddr(const void *src
, size_t len
, int af
, int *errp
);
73 #ifdef HAVE_FREEHOSTENT
75 idn_stub_freehostent(struct hostent
*hp
);
78 #ifdef HAVE_GETADDRINFO
80 idn_stub_getaddrinfo(const char *nodename
, const char *servname
,
81 const struct addrinfo
*hints
, struct addrinfo
**res
);
84 #ifdef HAVE_FREEADDRINFO
86 idn_stub_freeaddrinfo(struct addrinfo
*aip
);
89 #ifdef HAVE_GETNAMEINFO
91 idn_stub_getnameinfo(const struct sockaddr
*sa
, GNI_SALEN_T salen
,
92 char *host
, GNI_HOSTLEN_T hostlen
, char *serv
,
93 GNI_SERVLEN_T servlen
, GNI_FLAGS_T flags
);