Go to the source code of this file.
Data Structures | |
struct | sockinet |
struct | afd |
Functions | |
int | get_name (const char *, struct afd *, struct addrinfo **, char *, struct addrinfo *, int) |
int | get_addr (const char *, int, struct addrinfo **, struct addrinfo *, int) |
int | str_isnumber (const char *) |
int | get_ai (struct addrinfo **to_ai, struct addrinfo const *pai, struct afd *afd, const char *addr, short port) |
char * | gai_strerror (ecode) int ecode |
Variables | |
int | translate = NO |
in6_addr | faith_prefix = IN6ADDR_ANY_INIT |
const char | in_addrany [] = { 0, 0, 0, 0 } |
const char | in6_addrany [] |
const char | in_loopback [] = { 127, 0, 0, 1 } |
const char | in6_loopback [] |
afd | afdl |
char * | ai_errlist [] |
* | servname |
const struct addrinfo * | hints |
addrinfo ** | res |
afd * | afd |
char * | numaddr |
addrinfo * | pai |
int | port0 |
int | af |
|
|
|
|
|
|
|
Definition at line 149 of file getaddrinfo.c. References pai.
00154 { 00155 char *p; 00156 if ((*to_ai = (struct addrinfo *)malloc(sizeof(struct addrinfo) + 00157 ((afd)->a_socklen))) 00158 == NULL) 00159 return 0; 00160 memcpy(*to_ai, pai, sizeof(struct addrinfo)); 00161 (*to_ai)->ai_addr = (struct sockaddr *)((*to_ai) + 1); 00162 memset((*to_ai)->ai_addr, 0, (afd)->a_socklen); 00163 (*to_ai)->ai_addrlen = (afd)->a_socklen; 00164 #if HAVE_SOCKADDR_LEN 00165 (*to_ai)->ai_addr->sa_len= (afd)->a_socklen; 00166 #endif 00167 (*to_ai)->ai_addr->sa_family = (*to_ai)->ai_family = (afd)->a_af; 00168 ((struct sockinet *)(*to_ai)->ai_addr)->si_port = port; 00169 p = (char *)((*to_ai)->ai_addr); 00170 memcpy(p + (afd)->a_off, (addr), (afd)->a_addrlen); 00171 return 1; 00172 } |
|
Referenced by check_name(), lookup_name(), open_socket_in(), open_socket_out(), and try_bind_local(). |
|
Definition at line 54 of file getaddrinfo.c. |
|
Definition at line 55 of file getaddrinfo.c. |
|
Definition at line 66 of file getaddrinfo.c. |
|
Initial value: { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } Definition at line 67 of file getaddrinfo.c. |
|
Definition at line 70 of file getaddrinfo.c. |
|
Initial value: { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 } Definition at line 71 of file getaddrinfo.c. |
|
|
|
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 120 of file getaddrinfo.c. |
|
Definition at line 215 of file getaddrinfo.c. |
|
Definition at line 216 of file getaddrinfo.c. |
|
Definition at line 519 of file getaddrinfo.c. |
|
Definition at line 469 of file getaddrinfo.c. |
|
Definition at line 471 of file getaddrinfo.c. |
|
Definition at line 520 of file getaddrinfo.c. Referenced by get_ai(). |
|
Definition at line 521 of file getaddrinfo.c. |
|
Definition at line 518 of file getaddrinfo.c. |