MCPcopy Create free account
hub / github.com/RsyncProject/rsync / inet_ntop

Function inet_ntop

lib/inet_ntop.c:45–60  ·  view source on GitHub ↗

char * * isc_net_ntop(af, src, dst, size) * convert a network format address to presentation format. * return: * pointer to presentation format address (`dst'), or NULL (see errno). * author: * Paul Vixie, 1996. */

Source from the content-addressed store, hash-verified

43 * Paul Vixie, 1996.
44 */
45const char *
46inet_ntop(int af, const void *src, char *dst, size_t size)
47{
48 switch (af) {
49 case AF_INET:
50 return (inet_ntop4(src, dst, size));
51#ifdef AF_INET6
52 case AF_INET6:
53 return (inet_ntop6(src, dst, size));
54#endif
55 default:
56 errno = EAFNOSUPPORT;
57 return (NULL);
58 }
59 /* NOTREACHED */
60}
61
62/* const char *
63 * inet_ntop4(src, dst, size)

Callers 1

Calls 2

inet_ntop4Function · 0.85
inet_ntop6Function · 0.85

Tested by

no test coverage detected