Watt-32 tcp/ip  2.2 dev-rel.10
Data Structures | Functions | Variables
get_ai.c File Reference

Go to the source code of this file.

Data Structures

struct  afd
 
struct  explore
 

Functions

static int str_isnumber (const char *)
 
static int explore_fqdn (const struct addrinfo *, const char *, const char *, struct addrinfo **res)
 
static int explore_null (const struct addrinfo *, 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 addrinfoget_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 afdfind_afd (int)
 
char *W32_CALL gai_strerror (int ecode)
 
int W32_CALL if_nametoindex (const char *if_name)
 
char *W32_CALL if_indextoname (int if_id, char *if_name)
 
int __scope_ascii_to_id (const char *str)
 
int __scope_id_to_ascii (int scope)
 
static void free_addrinfo (struct addrinfo *ai)
 
void W32_CALL freeaddrinfo (struct addrinfo *ai)
 
static void afd_list_init (BOOL ip6_prio)
 Initialise afd_list[]. More...
 
int W32_CALL getaddrinfo (const char *hostname, const char *servname, const struct addrinfo *hints, struct addrinfo **res)
 
static void dump_addrinfo (const struct addrinfo *ai)
 
static void test_getaddrinfo (const char *host, const char *serv)
 
int main (void)
 

Variables

static const char rcsid []
 
static struct explore explore []
 
BOOL called_from_getai = FALSE
 
static struct afd afd_list [3]
 
static const char * ai_errlist []
 

Detailed Description

BSD getaddrinfo().

Definition in file get_ai.c.

Function Documentation

static void afd_list_init ( BOOL  ip6_prio)
static

Initialise afd_list[].

Give IPv6 protocol highest priority if 'ip6_prio' is TRUE.

Definition at line 273 of file get_ai.c.

Variable Documentation

const char* ai_errlist[]
static
Initial value:
= {
"Success",
"Address family for hostname not supported",
"Temporary failure in name resolution",
"Invalid value for ai_flags",
"Non-recoverable failure in name resolution",
"ai_family not supported",
"Memory allocation failure",
"No address associated with hostname",
"hostname nor servname provided, or not known",
"servname not supported for ai_socktype",
"ai_socktype not supported",
"System error returned in errno",
"Invalid value for hints",
"Resolved protocol is unknown",
"Unknown error",
}

Definition at line 128 of file get_ai.c.

struct explore explore[]
static
Initial value:
= {
{ AF_INET6, SOCK_DGRAM, IPPROTO_UDP, "udp", 7 },
{ AF_INET6, SOCK_STREAM, IPPROTO_TCP, "tcp", 7 },
{ AF_INET6, SOCK_RAW, ANY, NULL, 5 },
{ AF_INET, SOCK_DGRAM, IPPROTO_UDP, "udp", 7 },
{ AF_INET, SOCK_STREAM, IPPROTO_TCP, "tcp", 7 },
{ AF_INET, SOCK_RAW, ANY, NULL, 5 },
{ -1, 0, 0, NULL, 0 }
}

Definition at line 88 of file get_ai.c.

const char rcsid[]
static
Initial value:
= "@(#) $Header: /tcpdump/master/tcpdump/missing/"
"getaddrinfo.c,v 1.10 2000/10/24 00:56:53 fenner Exp $"

Definition at line 51 of file get_ai.c.