An implementation of NetworkManagerInterface which simulates a network configuration.
◆ FakeNetworkManager()
Create a new FakeNetworkManager.
- Parameters
-
interfaces | the interfaces to return |
ipv4_default_route_if_index | the interface that has the default gateway |
ipv4_default_route | the default gateway |
hostname | the hostname |
domain_name | the domain name |
name_servers | the name servers to return. |
◆ GetDHCPStatus()
Get the DHCP status of an interface
- Parameters
-
iface | the interface to check the DHCP status of |
- Returns
- One of DHCP_STATUS_ACTIVE, DHCP_STATUS_INACTIVE or DHCP_STATUS_UNKNOWN.
Implements ola::rdm::NetworkManagerInterface.
◆ GetDomainName()
const string ola::rdm::FakeNetworkManager::GetDomainName |
( |
| ) |
const |
|
virtual |
◆ GetHostname()
const string ola::rdm::FakeNetworkManager::GetHostname |
( |
| ) |
const |
|
virtual |
◆ GetInterfacePicker()
const InterfacePicker * ola::rdm::FakeNetworkManager::GetInterfacePicker |
( |
| ) |
const |
|
virtual |
◆ GetIPV4DefaultRoute()
bool ola::rdm::FakeNetworkManager::GetIPV4DefaultRoute |
( |
int32_t * |
if_index, |
|
|
ola::network::IPV4Address * |
default_route |
|
) |
| const |
|
virtual |
Get the IPv4 default route
- Parameters
-
[out] | if_index | the index of the interface the machine's default is on |
[out] | default_route | the machine's default route as an IPV4Address object |
- Returns
- true if we managed to fetch the default route, false otherwise
- Note
- if it manages to fetch the route information and there isn't a route, it will return the special wildcard address, which can be tested for with IsWildcard().
Implements ola::rdm::NetworkManagerInterface.
◆ GetNameServers()
The documentation for this class was generated from the following files: