summaryrefslogtreecommitdiffstats
path: root/contrib/idn/idnkit-1.0-src/tools/runidn/stub.h
blob: 48167ed661947a20ef0e1ebd72611d4671781b5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
/* $Id: stub.h,v 1.1.1.1 2003/06/04 00:27:13 marka Exp $ */

#ifndef STUB_H
#define STUB_H

#ifdef HAVE_GETHOSTBYNAME
extern struct hostent *
idn_stub_gethostbyname(const char *name);
#endif

#ifdef GETHOST_R_GLIBC_FLAVOR
#ifdef HAVE_GETHOSTBYNAME_R
extern int
idn_stub_gethostbyname_r(const char *name, struct hostent *result,
			 char *buffer, size_t buflen,
			 struct hostent **rp, int *errp);
#endif
#else /* GETHOST_R_GLIBC_FLAVOR */
#ifdef HAVE_GETHOSTBYNAME_R
extern struct hostent *
idn_stub_gethostbyname_r(const char *name, struct hostent *result,
			 char *buffer, int buflen, int *errp);
#endif
#endif /* GETHOST_R_GLIBC_FLAVOR */

#ifdef HAVE_GETHOSTBYNAME2
extern struct hostent *
idn_stub_gethostbyname2(const char *name, int af);
#endif

#ifdef GETHOST_R_GLIBC_FLAVOR
#ifdef HAVE_GETHOSTBYNAME2_R
extern int
idn_stub_gethostbyname2_r(const char *name, int af, struct hostent *result,
			  char *buffer, size_t buflen,
			  struct hostent **rp, int *errp);
#endif
#endif /* GETHOST_R_GLIBC_FLAVOR */

#ifdef HAVE_GETHOSTBYADDR
extern struct hostent *
idn_stub_gethostbyaddr(GHBA_ADDR_T addr, GHBA_ADDRLEN_T len, int type);
#endif

#ifdef GETHOST_R_GLIBC_FLAVOR
#ifdef HAVE_GETHOSTBYADDR_R
extern int
idn_stub_gethostbyaddr_r(GHBA_ADDR_T addr, GHBA_ADDRLEN_T len, int type,
			 struct hostent *result, char *buffer,
			 size_t buflen, struct hostent **rp, int *errp);
#endif
#else /* GETHOST_R_GLIBC_FLAVOR */
#ifdef HAVE_GETHOSTBYADDR_R
extern struct hostent *
idn_stub_gethostbyaddr_r(GHBA_ADDR_T addr, GHBA_ADDRLEN_T len, int type,
			 struct hostent *result, char *buffer,
			 int buflen, int *errp);
#endif
#endif /* GETHOST_R_GLIBC_FLAVOR */

#ifdef HAVE_GETIPNODEBYNAME
extern struct hostent *
idn_stub_getipnodebyname(const char *name, int af, int flags, int *errp);
#endif

#ifdef HAVE_GETIPNODEBYADDR
extern struct hostent *
idn_stub_getipnodebyaddr(const void *src, size_t len, int af, int *errp);
#endif

#ifdef HAVE_FREEHOSTENT
extern void
idn_stub_freehostent(struct hostent *hp);
#endif

#ifdef HAVE_GETADDRINFO
extern int
idn_stub_getaddrinfo(const char *nodename, const char *servname,
		     const struct addrinfo *hints, struct addrinfo **res);
#endif

#ifdef HAVE_FREEADDRINFO
extern void
idn_stub_freeaddrinfo(struct addrinfo *aip);
#endif

#ifdef HAVE_GETNAMEINFO
extern int
idn_stub_getnameinfo(const struct sockaddr *sa, GNI_SALEN_T salen,
		     char *host, GNI_HOSTLEN_T hostlen, char *serv,
		     GNI_SERVLEN_T servlen, GNI_FLAGS_T flags);
#endif

#endif /* STUB_H */