DnsClient is the process that handles retrieving DNS lookups.
More...
DnsClient is the process that handles retrieving DNS lookups.
◆ addIpAddress()
bool DnsClient::addIpAddress |
( |
string |
, |
|
|
ip |
|
|
) |
| |
Adds a DNS entry with the specified hostname and IP address to the DNS table.
- Parameters
-
hostname,the | hostname of the node. |
ipAddress,the | IP address of the node. |
- Returns
- bool, true if successful, otherwise false.
◆ getHostAt()
string DnsClient::getHostAt |
( |
int |
| ) |
|
Returns the hostname at the specified index.
- Parameters
-
index,the | index of the hostname of interest. |
- Returns
- string, the hostname at the specified index.
◆ getIpOfHost()
vector< ip > DnsClient::getIpOfHost |
( |
string |
| ) |
|
Returns a list of IP addresses associated with the specified hostname.
- Parameters
-
hostname,the | hostname of interest. |
- Returns
- vector<ip>, the list of IP addresses associated with the specified hostname.
◆ getServerIp()
ip DnsClient::getServerIp |
( |
| ) |
|
Returns the IP address of the DNS server.
- Returns
- ip, the DNS server ip address.
◆ getServerIpv6()
ipv6 DnsClient::getServerIpv6 |
( |
| ) |
const |
Returns the IPv6 address of the DNS server.
- Returns
- ipv6, the DNS server ipv6 address.
◆ getStrToIpCount()
int DnsClient::getStrToIpCount |
( |
| ) |
|
Returns the number of DNS entries in the DNS table.
- Returns
- int, the number of DNS entries in the DNS table.
◆ isEnabled()
bool DnsClient::isEnabled |
( |
| ) |
|
Returns true if this DNS client process is enabled, otherwise false.
- Returns
- bool, true if this DNS client process is enabled, otherwise false.
◆ isHostNameExisted()
bool DnsClient::isHostNameExisted |
( |
string |
| ) |
|
Returns true if the hostname exists in the DNS table, otherwise false.
- Parameters
-
hostname,the | hostname of interest. |
- Returns
- bool, true if the hostname exists in the DNS table, otherwise false.
◆ isIpExisted()
bool DnsClient::isIpExisted |
( |
string |
, |
|
|
ip |
|
|
) |
| |
Returns true if the hostname and IP address DNS entry exists, otherwise false.
- Parameters
-
hostname,the | hostname to lookup. |
ipAddress,the | IP address to lookup. |
- Returns
- bool, true if the hostname and IP address entry exists, otherwise false.
◆ isValidName()
bool DnsClient::isValidName |
( |
string |
| ) |
|
Returns true if the hostname is a valid name (non-special characters), otherwise false.
- Parameters
-
hostname,the | hostname of interest. |
- Returns
- bool, true if the hostname is a valid name (non-special characters), otherwise false.
◆ removeIp()
void DnsClient::removeIp |
( |
string |
, |
|
|
ip |
|
|
) |
| |
Removes the DNS entry from the table based on the hostname and the IP address.
- Parameters
-
hostname,the | hostname of the node. |
ipAddress,the | IP address of the node. |
◆ removeIpAddress()
void DnsClient::removeIpAddress |
( |
string |
| ) |
|
Removes the DNS entry from the table based on the hostname.
- Parameters
-
hostname,the | hostname associated with the IP address to remove. |
◆ setEnabled()
void DnsClient::setEnabled |
( |
bool |
| ) |
|
Enable or disable Dns Client Process.
- Parameters
-
bEnable,true | to enable, otherwise false. |
◆ setServerIp()
void DnsClient::setServerIp |
( |
ip |
| ) |
|
Sets the IP address of the DNS server.
- Parameters
-
ipAddress,the | DNS server IP address. |
◆ setServerIpv6()
void DnsClient::setServerIpv6 |
( |
ipv6 |
| ) |
|
Sets the IPv6 address of the DNS server.
- Parameters
-
ipAddress,the | DNS server IPv6 address. |
The documentation for this class was generated from the following file: