31 #ifndef HOMEGEARNET_H_ 32 #define HOMEGEARNET_H_ 34 #include "../Exception.h" 62 std::array<uint8_t, 16> destinationAddress{};
63 uint8_t sourceNetmask = 0;
64 std::array<uint8_t, 16> sourceAddress{};
65 uint8_t destinationNetmask = 0;
66 std::array<uint8_t, 16> gateway{};
85 static bool isIp(
const std::string& ipAddress);
93 static std::string getMyIpAddress(
const std::string& interfaceName =
"");
101 static std::string getMyIp6Address(std::string interfaceName =
"");
109 static std::string resolveHostname(std::string& hostname);
116 static RouteInfoList getRoutes();
118 static std::vector<uint8_t> getMacAddress(
bool allowLocallyAdministered,
const std::string &interface =
"");
120 static int32_t readNlSocket(int32_t sockFd, std::vector<char>& buffer, uint32_t messageIndex, uint32_t pid);
std::string interfaceName
Definition: Net.h:67
Exception class for the HTTP client.
Definition: Net.h:47
Definition: BaseLib.cpp:34
Class with network related helper functions.
Definition: Net.h:56
std::vector< std::shared_ptr< RouteInfo > > RouteInfoList
Definition: Net.h:70
Base class for all exceptions defined in Homegear.
Definition: Exception.h:41
NetException(std::string message)
Definition: Net.h:50