MCPcopy Create free account
hub / github.com/catboost/catboost / Ip6FromString

Function Ip6FromString

util/draft/ip.h:55–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53}
54
55static inline TIp6 Ip6FromString(const char* ipStr) {
56 TIp6 res;
57
58 if (inet_pton(AF_INET6, ipStr, &res.Data) == 0) {
59 ythrow TSystemError() << "Failed to convert (" << ipStr << ") to ipv6 address";
60 }
61
62 return res;
63}
64
65static inline TMaybe<TIp6> TryParseIp6FromString(const char* ipStr) {
66 TIp6 res;

Callers 1

Ip4Or6FromStringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected