|
reSIProcate
SIP stack, Dialog Usage Manager and related libraries
|
Provides a collection of utility functions for manipulating DNS names and IP addresses and discovering details about the local interfaces. More...
#include <DnsUtil.hxx>
Classes | |
| class | Exception |
Static Public Member Functions | |
| static const Data & | getLocalHostName () |
| static Data | getLocalDomainName () |
| static Data | getLocalIpAddress (const Data &defaultInterface=Data::Empty) |
| Gets the IP address of "the" local interface. | |
| static std::list< std::pair< Data, Data > > | getInterfaces (const Data &matchingInterface=Data::Empty) |
| static Data | inet_ntop (const struct in_addr &addr) |
| Converts from the network format to presentation format. | |
| static Data | inet_ntop (const struct sockaddr &addr) |
| Converts from the network format to presentation format. | |
| static int | inet_pton (const Data &printableIp, struct in_addr &dst) |
| Convert from the presentation format of the IPv4 address to struct in_addr. | |
| static bool | isIpAddress (const Data &ipAddress) |
| static bool | isIpV4Address (const Data &ipAddress) |
| static bool | isIpV6Address (const Data &ipAddress) |
| static const char * | inet_ntop (int af, const void *src, char *dst, size_t size) |
| Converts from the network format to presentation format. | |
| static int | inet_pton (int af, const char *src, void *dst) |
| Converts from the presentation format to network format. | |
| static Data | canonicalizeIpV6Address (const Data &ipV6Address) |
| Converts the printable form of an IPv6 address into consistent format so that string comparisons will do what you expect. | |
| static std::list< Data > | lookupARecords (const Data &host) |
| Used to synchronously query A records - only for test code usage. | |
Provides a collection of utility functions for manipulating DNS names and IP addresses and discovering details about the local interfaces.
Definition at line 28 of file DnsUtil.hxx.
Converts the printable form of an IPv6 address into consistent format so that string comparisons will do what you expect.
For instance, XXXX:0:0:0:YYYY:192.168.2.233 will be converted to XXXX::::YYYY:192.168.2.233. Currently, this is realized by (inet_ntop(inet_pton(input)).
Definition at line 427 of file DnsUtil.cxx.
|
static |
Definition at line 460 of file DnsUtil.cxx.
|
static |
Definition at line 187 of file DnsUtil.cxx.
|
static |
Definition at line 118 of file DnsUtil.cxx.
|
static |
Gets the IP address of "the" local interface.
Note that this will not work on systems with more than one ethernet interface.
Definition at line 222 of file DnsUtil.cxx.
|
static |
Converts from the network format to presentation format.
That is, it converts from struct in_addr to character representation of the IPv4 address.
Definition at line 240 of file DnsUtil.cxx.
|
static |
Converts from the network format to presentation format.
Converts from struct sockaddr to character representation of the IPv4 address.
Definition at line 258 of file DnsUtil.cxx.
|
static |
Converts from the network format to presentation format.
| af | the address family (AF_INET, AF_INET6) |
| src | the address of the networking representation to be converted (often of type struct in_addr *) |
| dst | the address where presentation format will be stored |
@size the size of the dst
Definition at line 637 of file DnsUtil.cxx.
|
static |
Convert from the presentation format of the IPv4 address to struct in_addr.
Definition at line 275 of file DnsUtil.cxx.
|
static |
Converts from the presentation format to network format.
| af | the address family (AF_INET, AF_INET6) |
| src | the address of the presentation representation to be converted |
| dst | the address where presentation format will be stored (struct in_addr *, or struct in_addr6 *) |
Definition at line 663 of file DnsUtil.cxx.
|
static |
Definition at line 453 of file DnsUtil.cxx.
|
static |
Definition at line 290 of file DnsUtil.cxx.
|
static |
Definition at line 386 of file DnsUtil.cxx.
Used to synchronously query A records - only for test code usage.
Definition at line 42 of file DnsUtil.cxx.