20#ifndef FASTDDS_UTILS__IPFINDER_HPP
21#define FASTDDS_UTILS__IPFINDER_HPP
26#include <fastdds/rtps/common/Locator.hpp>
27#include <fastdds/rtps/common/LocatorList.hpp>
28#include <fastdds/rtps/common/LocatorWithMask.hpp>
41#ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC
83 FASTDDS_EXPORTED_API
static bool getIPs(
84 std::vector<info_IP>* vec_name,
85 bool return_loopback =
false);
119 const std::string& name);
121 const std::string& name);
129 std::vector<info_MAC>* macs);
Class IPFinder, to determine the IP of the NICs.
Definition IPFinder.hpp:38
static FASTDDS_EXPORTED_API bool getIP4Address(LocatorList_t *locators)
Get the IP4Adresses in all interfaces.
static FASTDDS_EXPORTED_API bool parseIP6(info_IP &info)
Parses an IP6 string, populating a info_IP with its value.
struct eprosima::fastdds::rtps::IPFinder::info_MAC info_MAC
Structure info_MAC with information about a specific MAC obtained from a NIC.
static FASTDDS_EXPORTED_API bool parseIP4(info_IP &info)
Parses an IP4 string, populating a info_IP with its value.
static FASTDDS_EXPORTED_API bool getIP6Address(LocatorList_t *locators)
Get the IP6Adresses in all interfaces.
static FASTDDS_EXPORTED_API std::string getIPv4Address(const std::string &name)
IPTYPE
Enum IPTYPE, to define the type of IP obtained from the NICs.
Definition IPFinder.hpp:46
@ IP4_LOCAL
IP4_LOCAL.
Definition IPFinder.hpp:49
@ IP4
IP4.
Definition IPFinder.hpp:47
@ IP6_LOCAL
IP6_LOCAL.
Definition IPFinder.hpp:50
@ IP6
IP6.
Definition IPFinder.hpp:48
static FASTDDS_EXPORTED_API bool getAllIPAddress(LocatorList_t *locators)
Get all IP Adresses in all interfaces.
static FASTDDS_EXPORTED_API std::string getIPv6Address(const std::string &name)
struct eprosima::fastdds::rtps::IPFinder::info_IP info_IP
Structure info_IP with information about a specific IP obtained from a NIC.
static FASTDDS_EXPORTED_API bool getIPs(std::vector< info_IP > *vec_name, bool return_loopback=false)
static FASTDDS_EXPORTED_API bool getAllMACAddress(std::vector< info_MAC > *macs)
Get all MAC Adresses of all interfaces.
Class Locator_t, uniquely identifies a communication channel for a particular transport.
Definition Locator.hpp:71
Class LocatorList, a Locator vector that doesn't allow duplicates.
Definition LocatorList.hpp:97
A Locator with a mask that defines the number of significant bits of its address.
Definition LocatorWithMask.hpp:35
Structure info_IP with information about a specific IP obtained from a NIC.
Definition IPFinder.hpp:56
std::string dev
Definition IPFinder.hpp:59
fastdds::rtps::LocatorWithMask masked_locator
Definition IPFinder.hpp:61
std::string name
Definition IPFinder.hpp:58
IPTYPE type
Definition IPFinder.hpp:57
Locator_t locator
Definition IPFinder.hpp:60
Structure info_MAC with information about a specific MAC obtained from a NIC.
Definition IPFinder.hpp:68
bool operator==(const info_MAC &other)
Definition IPFinder.hpp:71
unsigned char address[6]
Definition IPFinder.hpp:69