Structure encapsulating relevant network interface information. More...
#include <NetworkInterface.hpp>
Public Member Functions | |
FASTDDS_EXPORTED_API | NetworkInterface (const std::string &name) |
Constructor by name. | |
FASTDDS_EXPORTED_API | NetworkInterface (const std::string &device, const std::string &ip, const LocatorWithMask &locator) |
Constructor by device name, IP address string and locator with mask. | |
virtual FASTDDS_EXPORTED_API | ~NetworkInterface ()=default |
Destructor. | |
FASTDDS_EXPORTED_API | NetworkInterface (const NetworkInterface &iface)=default |
Copy constructor. | |
FASTDDS_EXPORTED_API NetworkInterface & | operator= (const NetworkInterface &iface)=default |
Copy assignment. | |
FASTDDS_EXPORTED_API | NetworkInterface (NetworkInterface &&iface)=default |
Move constructor. | |
FASTDDS_EXPORTED_API NetworkInterface & | operator= (NetworkInterface &&iface)=default |
Move assignment. | |
FASTDDS_EXPORTED_API bool | operator== (const NetworkInterface &iface) const |
Comparison operator. | |
Public Attributes | |
std::string | name |
Interface device name or IP address in string format (to be filled by the user) | |
std::string | device |
Interface device name. | |
std::string | ip |
IP address in string format (includes scope ID in the IPv6 case) | |
LocatorWithMask | locator |
IP address with network mask. | |
Structure encapsulating relevant network interface information.
name
is the only attribute the user needs to provide. The rest of the attributes are internally filled, and are in fact ignored even if already provided by the user. FASTDDS_EXPORTED_API NetworkInterface | ( | const std::string & | name | ) |
Constructor by name.
FASTDDS_EXPORTED_API NetworkInterface | ( | const std::string & | device, |
const std::string & | ip, | ||
const LocatorWithMask & | locator ) |
Constructor by device name, IP address string and locator with mask.
|
virtualdefault |
Destructor.
|
default |
Copy constructor.
|
default |
Move constructor.
|
default |
Copy assignment.
|
default |
Move assignment.
FASTDDS_EXPORTED_API bool operator== | ( | const NetworkInterface & | iface | ) | const |
Comparison operator.
std::string device |
Interface device name.
std::string ip |
IP address in string format (includes scope ID in the IPv6 case)
LocatorWithMask locator |
IP address with network mask.
std::string name |
Interface device name or IP address in string format (to be filled by the user)