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

Function inet_aton

util/network/socket.cpp:53–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51#if defined(_win_)
52
53int inet_aton(const char* cp, struct in_addr* inp) {
54 sockaddr_in addr;
55 addr.sin_family = AF_INET;
56 int psz = sizeof(addr);
57 if (0 == WSAStringToAddress((char*)cp, AF_INET, nullptr, (LPSOCKADDR)&addr, &psz)) {
58 memcpy(inp, &addr.sin_addr, sizeof(in_addr));
59 return 1;
60 }
61 return 0;
62}
63
64 #if (_WIN32_WINNT < 0x0600)
65const char* inet_ntop(int af, const void* src, char* dst, socklen_t size) {

Callers 1

IpFromStringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected