MCPcopy Create free account
hub / github.com/Windscribe/Desktop-App / isValidIpAddress

Function isValidIpAddress

src/helper/windows/network_validation.cpp:15–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13{
14
15bool isValidIpAddress(const std::wstring &ip)
16{
17 IN_ADDR addr4;
18 IN6_ADDR addr6;
19 return InetPtonW(AF_INET, ip.c_str(), &addr4) == 1
20 || InetPtonW(AF_INET6, ip.c_str(), &addr6) == 1;
21}
22
23bool isValidIpOrCidr(const std::wstring &value)
24{

Callers 4

firewallOnFunction · 0.70
addHostsFunction · 0.70
enableDnsLeaksProtectionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected