NetworkManager::IpConfig Class

class NetworkManager::IpConfig

This class represents IP configuration. More...

Header: #include <NetworkManagerQt/IpConfig>
CMake: find_package(KF6 REQUIRED COMPONENTS NetworkManagerQt)
target_link_libraries(mytarget PRIVATE KF6::NetworkManagerQt)

Public Functions

IpConfig()
IpConfig(const NetworkManager::IpAddresses &addresses, const QList<QHostAddress> &nameservers, const QStringList &domains, const NetworkManager::IpRoutes &routes)
IpConfig(const NetworkManager::IpConfig &other)
~IpConfig()
NetworkManager::IpAddresses addresses() const
(since 5.14.0) QStringList dnsOptions() const
QStringList domains() const
(since 0.9.9.0) QString gateway() const
bool isValid() const
QList<QHostAddress> nameservers() const
NetworkManager::IpRoutes routes() const
(since 0.9.9.0) QStringList searches() const
void setIPv4Path(const QString &path)
void setIPv6Path(const QString &path)
NetworkManager::IpConfig &operator=(const NetworkManager::IpConfig &other)

Detailed Description

Member Function Documentation

IpConfig::IpConfig()

Constructs an empty IpConfig object.

IpConfig::IpConfig(const NetworkManager::IpAddresses &addresses, const QList<QHostAddress> &nameservers, const QStringList &domains, const NetworkManager::IpRoutes &routes)

Constructs an IP config object with a list of addresses, nameservers, domains and routes.

IpConfig::IpConfig(const NetworkManager::IpConfig &other)

Constructs an IpConfig object that is a copy of the object other.

[noexcept] IpConfig::~IpConfig()

Destroys this IpConfig object.

NetworkManager::IpAddresses IpConfig::addresses() const

Returns a list of IP addresses and gateway related to this configuration. Use IpAddress::ip() to access the IP address and IpAddress::gateway() to access the gateway address.

[since 5.14.0] QStringList IpConfig::dnsOptions() const

Returns a list of DNS options that modify the behaviour of the DNS resolver.

This function was introduced in 5.14.0.

QStringList IpConfig::domains() const

Returns a list of domains related to this configuration.

[since 0.9.9.0] QString IpConfig::gateway() const

Returns the gateway in use

This function was introduced in 0.9.9.0.

bool IpConfig::isValid() const

Returns false if the list of IP addresses is empty

QList<QHostAddress> IpConfig::nameservers() const

Returns a list of nameservers related to this configuration.

NetworkManager::IpRoutes IpConfig::routes() const

Returns a list of static routes (not the default gateway) related to this configuration. Use addresses() to retrieve the default gateway.

[since 0.9.9.0] QStringList IpConfig::searches() const

Returns a list of DNS searches.

This function was introduced in 0.9.9.0.

void IpConfig::setIPv4Path(const QString &path)

Configure this class using the information on the following path

void IpConfig::setIPv6Path(const QString &path)

Configure this class using the information on the following path

NetworkManager::IpConfig &IpConfig::operator=(const NetworkManager::IpConfig &other)

Makes a copy of the IpConfig object other.