Contains dns native API.
- Namespace
- xtd::native
- Library
- xtd.core.native
- Warning
- Internal use only
|
static void | cleanup () |
| Closes the file /etc/hosts.
|
|
static void | destroy (intmax_t host) |
| Destroys host handle.
|
|
static intmax_t | get_host_by_address (const std::string &host_address, int32_t host_address_type) |
| Gets host by host IP address.
|
|
static intmax_t | get_host_by_name (const std::string &host_name) |
| Gets host by host name.
|
|
static std::vector< std::string > | get_aliases (intmax_t host) |
| Gets aliases for a host.
|
|
static std::vector< std::vector< uint8_t > > | get_addresses (intmax_t host) |
| Gets IP addresses for a host.
|
|
static std::string | get_host_name (intmax_t host) |
| Gets name for a host.
|
|
static int32_t | get_host_name (std::string &host_name) |
| Gets host name for the current computer.
|
|
static void | startup () |
| Opens the file /etc/hosts.
|
|
◆ cleanup()
static void xtd::native::dns::cleanup |
( |
| ) |
|
|
staticprotected |
Closes the file /etc/hosts.
- Warning
- Internal use only
◆ destroy()
static void xtd::native::dns::destroy |
( |
intmax_t |
host | ) |
|
|
staticprotected |
Destroys host handle.
- Parameters
-
host | The host handle to destroy. |
- Warning
- Internal use only
◆ get_host_by_address()
static intmax_t xtd::native::dns::get_host_by_address |
( |
const std::string & |
host_address, |
|
|
int32_t |
host_address_type |
|
) |
| |
|
staticprotected |
Gets host by host IP address.
- Parameters
-
host_address | The host IP address to resolve. |
host_address_type | The address family (see address_family_constants.h) to resolve. |
- Returns
- The host handle.
- Warning
- Internal use only
◆ get_host_by_name()
static intmax_t xtd::native::dns::get_host_by_name |
( |
const std::string & |
host_name | ) |
|
|
staticprotected |
Gets host by host name.
- Parameters
-
host_name | The name to resolve. |
- Returns
- The host handle.
- Warning
- Internal use only
◆ get_aliases()
static std::vector< std::string > xtd::native::dns::get_aliases |
( |
intmax_t |
host | ) |
|
|
staticprotected |
Gets aliases for a host.
- Parameters
-
host | The host handle to retrieve aliases. |
- Returns
- An alias array for yhe host.
- Warning
- Internal use only
◆ get_addresses()
static std::vector< std::vector< uint8_t > > xtd::native::dns::get_addresses |
( |
intmax_t |
host | ) |
|
|
staticprotected |
Gets IP addresses for a host.
- Parameters
-
host | The host handle to retrieve IP addresses. |
- Returns
- An IP address array for yhe host.
- Warning
- Internal use only
◆ get_host_name() [1/2]
static std::string xtd::native::dns::get_host_name |
( |
intmax_t |
host | ) |
|
|
staticprotected |
Gets name for a host.
- Parameters
-
host | The host handle to retrieve name. |
- Returns
- A string that represent the host.
- Warning
- Internal use only
◆ get_host_name() [2/2]
static int32_t xtd::native::dns::get_host_name |
( |
std::string & |
host_name | ) |
|
|
staticprotected |
Gets host name for the current computer.
- Parameters
-
host_name | The string that will contain the host name. |
- Returns
- 0 if succeed; otherwise error.
- Warning
- Internal use only
◆ startup()
static void xtd::native::dns::startup |
( |
| ) |
|
|
staticprotected |
Opens the file /etc/hosts.
- Warning
- Internal use only
The documentation for this class was generated from the following file:
- xtd.core.native/include/xtd/native/dns.hpp