36 #ifndef RC_DEVICE_NET_UTILS_H 37 #define RC_DEVICE_NET_UTILS_H 50 uint32_t
ipToUInt(
const std::string& ip);
60 bool isIPInRange(
const std::string& ip,
const std::string& network,
const std::string& mask);
74 bool getThisHostsIP(std::string& this_hosts_ip,
const std::string& other_hosts_ip,
75 const std::string& network_interface =
"");
85 #endif // RC_DEVICE_NET_UTILS_H bool getThisHostsIP(string &this_hosts_ip, const string &other_hosts_ip, const string &network_interface)
bool isValidIPAddress(const std::string &ip)
Checks if given string is a valid IP address.
uint32_t ipToUInt(const std::string &ip)
Converts a string-represented ip into uint (e.g.
bool isIPInRange(const std::string &ip, const std::string &network, const std::string &mask)
Checks if a given ip is in range of a network defined by ip/subnet taken from: https://www.stev.org/post/ccheckanipaddressisinaipmask.