NetworkInterface
class NetworkInterface
Functions
| Name | Description |
|---|---|
| NetworkInterface | Construct a NetworkInterface object from an interface or IP address. |
| name | Return the interface name for the object (for instance, 'lo' or 'enp4s0') |
| presentationIP | Return the presentation address for the object. |
Function Details
NetworkInterface
NetworkInterface(const std::string& name_or_ip, bool exclude_loopback = true)
Construct a NetworkInterface object from an interface or IP address.
name
inline const std::string& name() const noexcept
Return the interface name for the object (for instance, 'lo' or 'enp4s0')
presentationIP
inline const std::string& presentationIP() const noexcept
Return the presentation address for the object.
The presentation address is the IP address (four numbers between 0 and 255, separated with '.')