Fast RTPS  Version 2.14.1
Fast RTPS
Loading...
Searching...
No Matches

Class IPFinder, to determine the IP of the NICs. More...

#include <IPFinder.h>

Classes

struct  info_IP
 Structure info_IP with information about a specific IP obtained from a NIC. More...
 
struct  info_MAC
 Structure info_MAC with information about a specific MAC obtained from a NIC. More...
 

Public Types

enum  IPTYPE { IP4 , IP6 , IP4_LOCAL , IP6_LOCAL }
 Enum IPTYPE, to define the type of IP obtained from the NICs. More...
 
typedef struct eprosima::fastrtps::rtps::IPFinder::info_IP info_IP
 Structure info_IP with information about a specific IP obtained from a NIC.
 
typedef struct eprosima::fastrtps::rtps::IPFinder::info_MAC info_MAC
 Structure info_MAC with information about a specific MAC obtained from a NIC.
 

Public Member Functions

 IPFinder ()
 
virtual ~IPFinder ()
 

Static Public Member Functions

static RTPS_DllAPI bool getIPs (std::vector< info_IP > *vec_name, bool return_loopback=false)
 
static RTPS_DllAPI bool getIP4Address (LocatorList_t *locators)
 Get the IP4Adresses in all interfaces.
 
static RTPS_DllAPI bool getIP6Address (LocatorList_t *locators)
 Get the IP6Adresses in all interfaces.
 
static RTPS_DllAPI bool getAllIPAddress (LocatorList_t *locators)
 Get all IP Adresses in all interfaces.
 
static RTPS_DllAPI bool parseIP4 (info_IP &info)
 Parses an IP4 string, populating a info_IP with its value.
 
static RTPS_DllAPI bool parseIP6 (info_IP &info)
 Parses an IP6 string, populating a info_IP with its value.
 
static RTPS_DllAPI std::string getIPv4Address (const std::string &name)
 
static RTPS_DllAPI std::string getIPv6Address (const std::string &name)
 
static RTPS_DllAPI bool getAllMACAddress (std::vector< info_MAC > *macs)
 Get all MAC Adresses of all interfaces.
 

Detailed Description

Class IPFinder, to determine the IP of the NICs.

Member Typedef Documentation

◆ info_IP

Structure info_IP with information about a specific IP obtained from a NIC.

◆ info_MAC

Structure info_MAC with information about a specific MAC obtained from a NIC.

Member Enumeration Documentation

◆ IPTYPE

enum IPTYPE

Enum IPTYPE, to define the type of IP obtained from the NICs.

Enumerator
IP4 

IP4.

IP6 

IP6.

IP4_LOCAL 

IP4_LOCAL.

IP6_LOCAL 

IP6_LOCAL.

Constructor & Destructor Documentation

◆ IPFinder()

IPFinder ( )

◆ ~IPFinder()

virtual ~IPFinder ( )
virtual

Member Function Documentation

◆ getAllIPAddress()

static RTPS_DllAPI bool getAllIPAddress ( LocatorList_t *  locators)
static

Get all IP Adresses in all interfaces.

Parameters
[out]locatorsList of locators to be populated with the addresses.

◆ getAllMACAddress()

static RTPS_DllAPI bool getAllMACAddress ( std::vector< info_MAC > *  macs)
static

Get all MAC Adresses of all interfaces.

Will return all unique MAC addresses for eadh of the interfaces returned by getAllIPAddress

Parameters
[out]macsList of MAC addresses.

◆ getIP4Address()

static RTPS_DllAPI bool getIP4Address ( LocatorList_t *  locators)
static

Get the IP4Adresses in all interfaces.

Parameters
[out]locatorsList of locators to be populated with the IP4 addresses.

◆ getIP6Address()

static RTPS_DllAPI bool getIP6Address ( LocatorList_t *  locators)
static

Get the IP6Adresses in all interfaces.

Parameters
[out]locatorsList of locators to be populated with the IP6 addresses.

◆ getIPs()

static RTPS_DllAPI bool getIPs ( std::vector< info_IP > *  vec_name,
bool  return_loopback = false 
)
static

◆ getIPv4Address()

static RTPS_DllAPI std::string getIPv4Address ( const std::string &  name)
static

◆ getIPv6Address()

static RTPS_DllAPI std::string getIPv6Address ( const std::string &  name)
static

◆ parseIP4()

static RTPS_DllAPI bool parseIP4 ( info_IP info)
static

Parses an IP4 string, populating a info_IP with its value.

Parameters
[out]infoinfo_IP to populate.

◆ parseIP6()

static RTPS_DllAPI bool parseIP6 ( info_IP info)
static

Parses an IP6 string, populating a info_IP with its value.

Parameters
[out]infoinfo_IP to populate.

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