From d53b08c506ff57935b8147c6d37398139e7a2d73 Mon Sep 17 00:00:00 2001 From: ueno Date: Tue, 22 Jan 2002 08:33:28 +0000 Subject: [PATCH] * getaddrinfo.c: Synch up with the HEAD of tcpdump/missing/*. * addrinfo.h: Ditto. --- addrinfo.h | 24 ++++++++++++------------ getaddrinfo.c | 42 +++++++++++++++++++----------------------- 2 files changed, 31 insertions(+), 35 deletions(-) diff --git a/addrinfo.h b/addrinfo.h index b6e8130..3cf2537 100644 --- a/addrinfo.h +++ b/addrinfo.h @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ -/* $Id: addrinfo.h,v 1.1 2000-11-17 10:52:55 ueno Exp $ */ +/* $Id: addrinfo.h,v 1.2 2002-01-22 08:33:28 ueno Exp $ */ #ifndef HAVE_ADDRINFO @@ -79,17 +79,17 @@ struct addrinfo { struct addrinfo *ai_next; /* next structure in linked list */ }; -extern void freeaddrinfo __P((struct addrinfo *)); -extern void freehostent __P((struct hostent *)); -extern char *gai_strerror __P((int)); -extern int getaddrinfo __P((const char *, const char *, - const struct addrinfo *, struct addrinfo **)); -extern int getnameinfo __P((const struct sockaddr *, size_t, char *, - size_t, char *, size_t, int)); -extern struct hostent *getipnodebyaddr __P((const void *, size_t, int, int *)); -extern struct hostent *getipnodebyname __P((const char *, int, int, int *)); -extern int inet_pton __P((int, const char *, void *)); -extern const char *inet_ntop __P((int, const void *, char *, size_t)); +extern void freeaddrinfo (struct addrinfo *); +extern void freehostent (struct hostent *); +extern char *gai_strerror (int); +extern int getaddrinfo (const char *, const char *, + const struct addrinfo *, struct addrinfo **); +extern int getnameinfo (const struct sockaddr *, size_t, char *, + size_t, char *, size_t, int); +extern struct hostent *getipnodebyaddr (const void *, size_t, int, int *); +extern struct hostent *getipnodebyname (const char *, int, int, int *); +extern int inet_pton (int, const char *, void *); +extern const char *inet_ntop (int, const void *, char *, size_t); #endif /* HAVE_ADDRINFO */ /* diff --git a/getaddrinfo.c b/getaddrinfo.c index edbd85b..af8d114 100644 --- a/getaddrinfo.c +++ b/getaddrinfo.c @@ -51,7 +51,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /opt/backups/cvs.m17n.org/root/starttls/Attic/getaddrinfo.c,v 1.2 2000-11-17 10:52:55 ueno Exp $"; + "@(#) $Header: /opt/backups/cvs.m17n.org/root/starttls/Attic/getaddrinfo.c,v 1.3 2002-01-22 08:33:28 ueno Exp $"; #endif #include @@ -74,10 +74,6 @@ static const char rcsid[] = #include #include -#ifndef HAVE_PORTABLE_PROTOTYPE -#include "cdecl_ext.h" -#endif - #ifndef HAVE_U_INT32_T #include "bittypes.h" #endif @@ -175,24 +171,24 @@ static const struct explore explore[] = { #endif -static int str_isnumber __P((const char *)); -static int explore_fqdn __P((const struct addrinfo *, const char *, - const char *, struct addrinfo **)); -static int explore_null __P((const struct addrinfo *, const char *, - const char *, struct addrinfo **)); -static int explore_numeric __P((const struct addrinfo *, const char *, - const char *, struct addrinfo **)); -static int explore_numeric_scope __P((const struct addrinfo *, const char *, - const char *, struct addrinfo **)); -static int get_name __P((const char *, const struct afd *, struct addrinfo **, - char *, const struct addrinfo *, const char *)); -static int get_canonname __P((const struct addrinfo *, - struct addrinfo *, const char *)); -static struct addrinfo *get_ai __P((const struct addrinfo *, - const struct afd *, const char *)); -static int get_portmatch __P((const struct addrinfo *, const char *)); -static int get_port __P((struct addrinfo *, const char *, int)); -static const struct afd *find_afd __P((int)); +static int str_isnumber (const char *); +static int explore_fqdn (const struct addrinfo *, const char *, + const char *, struct addrinfo **); +static int explore_null (const struct addrinfo *, const char *, + const char *, struct addrinfo **); +static int explore_numeric (const struct addrinfo *, const char *, + const char *, struct addrinfo **); +static int explore_numeric_scope (const struct addrinfo *, const char *, + const char *, struct addrinfo **); +static int get_name (const char *, const struct afd *, struct addrinfo **, + char *, const struct addrinfo *, const char *); +static int get_canonname (const struct addrinfo *, + struct addrinfo *, const char *); +static struct addrinfo *get_ai (const struct addrinfo *, + const struct afd *, const char *); +static int get_portmatch (const struct addrinfo *, const char *); +static int get_port (struct addrinfo *, const char *, int); +static const struct afd *find_afd (int); static char *ai_errlist[] = { "Success", -- 1.7.10.4