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

Function TryParseIp6FromString

util/draft/ip.h:65–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65static inline TMaybe<TIp6> TryParseIp6FromString(const char* ipStr) {
66 TIp6 res;
67
68 if (inet_pton(AF_INET6, ipStr, &res.Data) == 0) {
69 return Nothing();
70 }
71
72 return res;
73}
74
75static inline char* Ip6ToString(const TIp6& ip, char* buf, size_t len) {
76 if (!inet_ntop(AF_INET6, (void*)&ip.Data, buf, (socklen_t)len)) {

Callers 1

IsValidIPv6Function · 0.85

Calls 1

NothingFunction · 0.85

Tested by

no test coverage detected