A name server address and optional port.
More...
#include <dns_options.hpp>
A name server address and optional port.
Definition at line 39 of file dns_options.hpp.
◆ DnsAddress() [1/2]
| openvpn::DnsAddress::DnsAddress |
( |
| ) |
|
|
default |
◆ ~DnsAddress()
| virtual openvpn::DnsAddress::~DnsAddress |
( |
| ) |
|
|
virtualdefaultnoexcept |
◆ DnsAddress() [2/2]
| openvpn::DnsAddress::DnsAddress |
( |
const std::string & |
address_input | ) |
|
|
inlineexplicit |
Constructs the DnsAddress object by parsing the input string into separate "address" and "port" fields. If "port" is missing, it will be set to 0.
Supported formats: 192.168.0.1 192.168.0.1:53 [2001:db8:1234::1]
Definition at line 55 of file dns_options.hpp.
◆ from_json()
| void openvpn::DnsAddress::from_json |
( |
const Json::Value & |
root, |
|
|
const std::string & |
title |
|
) |
| |
|
inline |
◆ operator==()
| bool openvpn::DnsAddress::operator== |
( |
const DnsAddress & |
| ) |
const |
|
default |
◆ to_json()
| Json::Value openvpn::DnsAddress::to_json |
( |
| ) |
const |
|
inline |
◆ to_string()
| std::string openvpn::DnsAddress::to_string |
( |
| ) |
const |
|
inline |
Return string representation of the IP address and port stored in the DnsAddress object.
The output of this method is expected to be parsable by this class constructor.
- Returns
- std::string the string representation generated
Definition at line 111 of file dns_options.hpp.
◆ validate()
| void openvpn::DnsAddress::validate |
( |
const std::string & |
title | ) |
const |
|
inline |
◆ address
| std::string openvpn::DnsAddress::address |
◆ port
| unsigned int openvpn::DnsAddress::port = 0 |
The documentation for this class was generated from the following file: