cctools
|
Look up domain names and addresses directly. More...
Go to the source code of this file.
Macros | |
#define | DOMAIN_NAME_MAX 256 |
Maximum number of characters in a domain name or address. More... | |
Functions | |
int | domain_name_lookup (const char *name, char *addr) |
Resolve a domain name to an IP address. More... | |
int | domain_name_lookup_reverse (const char *addr, char *name) |
Resolve an IP address to a domain name with caching. More... | |
Look up domain names and addresses directly.
Most applications should use domain_name_cache.h, which uses an internal cache to perform lookups quickly.
#define DOMAIN_NAME_MAX 256 |
Maximum number of characters in a domain name or address.
int domain_name_lookup | ( | const char * | name, |
char * | addr | ||
) |
Resolve a domain name to an IP address.
name | A string containing a domain name like "www.google.com". |
addr | A string where the IP address will be written. |
int domain_name_lookup_reverse | ( | const char * | addr, |
char * | name | ||
) |
Resolve an IP address to a domain name with caching.
addr | A string containing an IP address like "202.5.129.1" |
name | A string where the domain name will be written. |