summaryrefslogtreecommitdiff
path: root/src/lib/libc/net/getaddrinfo.c
diff options
context:
space:
mode:
authormillert <>2002-02-16 21:27:50 +0000
committermillert <>2002-02-16 21:27:50 +0000
commit052e020be6be85be6238c44b8386a61f8db7b6a4 (patch)
tree4cf8f905bd37027527533678516a258fa89e2696 /src/lib/libc/net/getaddrinfo.c
parentee0af55ed65515812050f3b9a8d431c941b73eb8 (diff)
downloadopenbsd-052e020be6be85be6238c44b8386a61f8db7b6a4.tar.gz
openbsd-052e020be6be85be6238c44b8386a61f8db7b6a4.tar.bz2
openbsd-052e020be6be85be6238c44b8386a61f8db7b6a4.zip
Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.
Diffstat (limited to 'src/lib/libc/net/getaddrinfo.c')
-rw-r--r--src/lib/libc/net/getaddrinfo.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/lib/libc/net/getaddrinfo.c b/src/lib/libc/net/getaddrinfo.c
index 5b36626ceb..72183d260b 100644
--- a/src/lib/libc/net/getaddrinfo.c
+++ b/src/lib/libc/net/getaddrinfo.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: getaddrinfo.c,v 1.31 2002/01/02 23:00:10 deraadt Exp $ */ 1/* $OpenBSD: getaddrinfo.c,v 1.32 2002/02/16 21:27:23 millert Exp $ */
2/* $KAME: getaddrinfo.c,v 1.31 2000/08/31 17:36:43 itojun Exp $ */ 2/* $KAME: getaddrinfo.c,v 1.31 2000/08/31 17:36:43 itojun Exp $ */
3 3
4/* 4/*
@@ -199,7 +199,7 @@ struct res_target {
199 int n; /* result length */ 199 int n; /* result length */
200}; 200};
201 201
202static int str_isnumber __P((const char *)); 202static int str_isnumber(const char *);
203static int explore_fqdn __P((const struct addrinfo *, const char *, 203static int explore_fqdn __P((const struct addrinfo *, const char *,
204 const char *, struct addrinfo **)); 204 const char *, struct addrinfo **));
205static int explore_null __P((const struct addrinfo *, 205static int explore_null __P((const struct addrinfo *,
@@ -212,32 +212,32 @@ static int get_canonname __P((const struct addrinfo *,
212 struct addrinfo *, const char *)); 212 struct addrinfo *, const char *));
213static struct addrinfo *get_ai __P((const struct addrinfo *, 213static struct addrinfo *get_ai __P((const struct addrinfo *,
214 const struct afd *, const char *)); 214 const struct afd *, const char *));
215static int get_portmatch __P((const struct addrinfo *, const char *)); 215static int get_portmatch(const struct addrinfo *, const char *);
216static int get_port __P((struct addrinfo *, const char *, int)); 216static int get_port(struct addrinfo *, const char *, int);
217static const struct afd *find_afd __P((int)); 217static const struct afd *find_afd(int);
218#if 0 218#if 0
219static int addrconfig __P((const struct addrinfo *)); 219static int addrconfig(const struct addrinfo *);
220#endif 220#endif
221#ifdef INET6 221#ifdef INET6
222static int ip6_str2scopeid __P((char *, struct sockaddr_in6 *)); 222static int ip6_str2scopeid(char *, struct sockaddr_in6 *);
223#endif 223#endif
224 224
225static void _sethtent __P((void)); 225static void _sethtent(void);
226static void _endhtent __P((void)); 226static void _endhtent(void);
227static struct addrinfo * _gethtent __P((const char *, const struct addrinfo *)); 227static struct addrinfo * _gethtent(const char *, const struct addrinfo *);
228static struct addrinfo *_files_getaddrinfo __P((const char *, 228static struct addrinfo *_files_getaddrinfo __P((const char *,
229 const struct addrinfo *)); 229 const struct addrinfo *));
230 230
231#ifdef YP 231#ifdef YP
232static struct addrinfo *_yphostent __P((char *, const struct addrinfo *)); 232static struct addrinfo *_yphostent(char *, const struct addrinfo *);
233static struct addrinfo *_yp_getaddrinfo __P((const char *, 233static struct addrinfo *_yp_getaddrinfo __P((const char *,
234 const struct addrinfo *)); 234 const struct addrinfo *));
235#endif 235#endif
236 236
237static struct addrinfo *getanswer __P((const querybuf *, int, const char *, int, 237static struct addrinfo *getanswer __P((const querybuf *, int, const char *, int,
238 const struct addrinfo *)); 238 const struct addrinfo *));
239static int res_queryN __P((const char *, struct res_target *)); 239static int res_queryN(const char *, struct res_target *);
240static int res_searchN __P((const char *, struct res_target *)); 240static int res_searchN(const char *, struct res_target *);
241static int res_querydomainN __P((const char *, const char *, 241static int res_querydomainN __P((const char *, const char *,
242 struct res_target *)); 242 struct res_target *));
243static struct addrinfo *_dns_getaddrinfo __P((const char *, 243static struct addrinfo *_dns_getaddrinfo __P((const char *,
@@ -1037,7 +1037,7 @@ getanswer(answer, anslen, qname, qtype, pai)
1037 int type, class, buflen, ancount, qdcount; 1037 int type, class, buflen, ancount, qdcount;
1038 int haveanswer, had_error; 1038 int haveanswer, had_error;
1039 char tbuf[MAXDNAME]; 1039 char tbuf[MAXDNAME];
1040 int (*name_ok) __P((const char *)); 1040 int (*name_ok)(const char *);
1041 char hostbuf[8*1024]; 1041 char hostbuf[8*1024];
1042 1042
1043 memset(&sentinel, 0, sizeof(sentinel)); 1043 memset(&sentinel, 0, sizeof(sentinel));
@@ -1509,9 +1509,9 @@ _yp_getaddrinfo(name, pai)
1509 1509
1510/* resolver logic */ 1510/* resolver logic */
1511 1511
1512extern const char *__hostalias __P((const char *)); 1512extern const char *__hostalias(const char *);
1513extern int h_errno; 1513extern int h_errno;
1514extern int res_opt __P((int, u_char *, int, int)); 1514extern int res_opt(int, u_char *, int, int);
1515 1515
1516/* 1516/*
1517 * Formulate a normal query, send, and await answer. 1517 * Formulate a normal query, send, and await answer.