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

Function IpToString

util/network/ip.h:31–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29}
30
31static inline char* IpToString(TIpHost ip, char* buf, size_t len) {
32 if (!inet_ntop(AF_INET, (void*)&ip, buf, (socklen_t)len)) {
33 ythrow TSystemError() << "Failed to get ip address string";
34 }
35
36 return buf;
37}
38
39static inline TString IpToString(TIpHost ip) {
40 char buf[INET_ADDRSTRLEN];

Callers 4

TestIpToStringMethod · 0.85
ToStringMethod · 0.85
PrintAddrFunction · 0.85
Ip4Or6ToStringFunction · 0.85

Calls 1

inet_ntopFunction · 0.85

Tested by 1

TestIpToStringMethod · 0.68