#include "lwip/ip_addr.h"Include dependency graph for netdb.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Data Structures | |
| struct | hostent |
| struct | protoent |
| struct | servent |
Defines | |
| #define | HOST_NOT_FOUND ENSRNXDOMAIN |
| #define | NO_ADDRESS ENSRNODATA |
| #define | NO_DATA ENSRNODATA |
| #define | TRY_AGAIN ENSRTIMEOUT |
| #define | h_addr h_addr_list[0] |
Functions | |
| protoent * | getprotobyname (const char *name) |
| protoent * | getprotobynumber (int proto) |
| hostent * | gethostbyname (const char *name) |
| hostent * | gethostbyaddr (const char *addr, int len, int type) |
| void | setnameservers (const struct in_addr *ns1, const struct in_addr *ns2) |
| void | getnameservers (struct in_addr *ns1, struct in_addr *ns2) |
Variables | |
| int | h_errno |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||||||
|
Definition at line 238 of file netdb.c. References AF_INET, array_free, free, gethostbynameaddr(), hostent::h_addr_list, hostent::h_aliases, hostent::h_name, gethost_result::host, and len.
00239 {
00240 static struct gethost_result r;
00241 static int init = 0;
00242 if (!init) {
00243 init = 1;
00244 memset (&r, 0, sizeof (r));
00245 }
00246 if (len != sizeof (struct in_addr) || type != AF_INET) {
00247 errno = EINVAL;
00248 return 0;
00249 }
00250 if (r.host.h_aliases)
00251 array_free (r.host.h_aliases);
00252 if (r.host.h_addr_list)
00253 array_free (r.host.h_addr_list);
00254 if (r.host.h_name)
00255 free (r.host.h_name);
00256 return gethostbynameaddr (0, *((struct in_addr *) addr), &r);
00257 }
|
Here is the call graph for this function:
|
|
Definition at line 219 of file netdb.c. References array_free, free, gethostbynameaddr(), hostent::h_addr_list, hostent::h_aliases, hostent::h_name, gethost_result::host, name, and in_addr::s_addr. Referenced by main().
00220 {
00221 struct in_addr addr;
00222 static struct gethost_result r;
00223 static int init = 0;
00224 if (!init) {
00225 init = 1;
00226 memset (&r, 0, sizeof (r));
00227 }
00228 addr.s_addr = 0;
00229 if (r.host.h_aliases)
00230 array_free (r.host.h_aliases);
00231 if (r.host.h_addr_list)
00232 array_free (r.host.h_addr_list);
00233 if (r.host.h_name)
00234 free (r.host.h_name);
00235 return gethostbynameaddr (name, addr, &r);
00236 }
|
Here is the call graph for this function:
|
||||||||||||
|
Definition at line 135 of file netdb.c. References __nameservers, and in_addr::s_addr.
00136 {
00137 ns1->s_addr = __nameservers[0].s_addr;
00138 ns2->s_addr = __nameservers[1].s_addr;
00139 }
|
|
|
|
|
|
|
|
||||||||||||
|
Definition at line 129 of file netdb.c. References __nameservers, and in_addr::s_addr.
00130 {
00131 __nameservers[0].s_addr = ns1->s_addr;
00132 __nameservers[1].s_addr = ns2->s_addr;
00133 }
|
|
|
|
1.3.4