MCPcopy Create free account
hub / github.com/OpenHD/OpenHD / is_valid_ip

Method is_valid_ip

OpenHD/ohd_common/src/openhd_util.cpp:108–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106}
107
108bool OHDUtil::is_valid_ip(const std::string& ip) {
109 unsigned char buf[sizeof(struct in6_addr)];
110 auto result = inet_pton(AF_INET, ip.c_str(), buf);
111 return result == 1;
112}
113
114std::string OHDUtil::string_in_between(const std::string& start,
115 const std::string& end,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected