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

Function inet_ntop

util/network/socket.cpp:65–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63
64 #if (_WIN32_WINNT < 0x0600)
65const char* inet_ntop(int af, const void* src, char* dst, socklen_t size) {
66 if (af != AF_INET) {
67 errno = EINVAL;
68 return 0;
69 }
70 const ui8* ia = (ui8*)src;
71 if (snprintf(dst, size, "%u.%u.%u.%u", ia[0], ia[1], ia[2], ia[3]) >= (int)size) {
72 errno = ENOSPC;
73 return 0;
74 }
75 return dst;
76}
77
78struct evpair {
79 int event;

Callers 4

GetIpMethod · 0.85
IpToStringFunction · 0.85
PrintAddrFunction · 0.85
Ip6ToStringFunction · 0.85

Calls 1

snprintfFunction · 0.50

Tested by

no test coverage detected