Mercurial > hg > nginx-quic
view src/core/ngx_inet.c @ 52:9f2728644651
nginx-0.0.1-2003-01-24-19:09:40 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 24 Jan 2003 16:09:40 +0000 |
parents | 53cb81681040 |
children | a499e0d1f16e |
line wrap: on
line source
#include <ngx_config.h> #include <ngx_string.h> #include <ngx_inet.h> size_t ngx_inet_ntop(int family, char *addr, char *text, size_t len) { if (family != AF_INET) return 0; return ngx_snprintf(text, len > INET_ADDRSTRLEN ? INET_ADDRSTRLEN : len, "%u.%u.%u.%u", (unsigned char) addr[0], (unsigned char) addr[1], (unsigned char) addr[2], (unsigned char) addr[3]); }