Fast DDS  Version 3.1.2
Fast DDS
Loading...
Searching...
No Matches
NetworkInterface Struct Reference

Structure encapsulating relevant network interface information. More...

#include <NetworkInterface.hpp>

Inheritance diagram for NetworkInterface:

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 NetworkInterfaceoperator= (const NetworkInterface &iface)=default
 Copy assignment.
 
FASTDDS_EXPORTED_API NetworkInterface (NetworkInterface &&iface)=default
 Move constructor.
 
FASTDDS_EXPORTED_API NetworkInterfaceoperator= (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.
 

Detailed Description

Structure encapsulating relevant network interface information.

Note
When using this structure to interact with Fast-DDS, 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.

Constructor & Destructor Documentation

◆ NetworkInterface() [1/4]

FASTDDS_EXPORTED_API NetworkInterface ( const std::string &  name)

Constructor by name.

◆ NetworkInterface() [2/4]

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.

◆ ~NetworkInterface()

virtual FASTDDS_EXPORTED_API ~NetworkInterface ( )
virtualdefault

Destructor.

◆ NetworkInterface() [3/4]

FASTDDS_EXPORTED_API NetworkInterface ( const NetworkInterface iface)
default

Copy constructor.

◆ NetworkInterface() [4/4]

FASTDDS_EXPORTED_API NetworkInterface ( NetworkInterface &&  iface)
default

Move constructor.

Member Function Documentation

◆ operator=() [1/2]

FASTDDS_EXPORTED_API NetworkInterface & operator= ( const NetworkInterface iface)
default

Copy assignment.

◆ operator=() [2/2]

FASTDDS_EXPORTED_API NetworkInterface & operator= ( NetworkInterface &&  iface)
default

Move assignment.

◆ operator==()

FASTDDS_EXPORTED_API bool operator== ( const NetworkInterface iface) const

Comparison operator.

Member Data Documentation

◆ device

std::string device

Interface device name.

◆ ip

std::string ip

IP address in string format (includes scope ID in the IPv6 case)

◆ locator

LocatorWithMask locator

IP address with network mask.

◆ name

std::string name

Interface device name or IP address in string format (to be filled by the user)


The documentation for this struct was generated from the following file: