* 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
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 */
/*
#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 <sys/types.h>
#include <stdio.h>
#include <errno.h>
-#ifndef HAVE_PORTABLE_PROTOTYPE
-#include "cdecl_ext.h"
-#endif
-
#ifndef HAVE_U_INT32_T
#include "bittypes.h"
#endif
#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",