comparison src/core/ngx_inet.h @ 2197:74477ea8074f

*) remove zero termination in ngx_inet_ntop() and ngx_sock_ntop() *) use ngx_snprintf() in ngx_inet_ntop() and ngx_sock_ntop() as they are called just once per connection *) NGX_INET_ADDRSTRLEN
author Igor Sysoev <igor@sysoev.ru>
date Thu, 21 Aug 2008 18:47:23 +0000
parents 8075179cae21
children 5975975eedc0
comparison
equal deleted inserted replaced
2196:fab3fa7339ff 2197:74477ea8074f
8 #define _NGX_INET_H_INCLUDED_ 8 #define _NGX_INET_H_INCLUDED_
9 9
10 10
11 #include <ngx_config.h> 11 #include <ngx_config.h>
12 #include <ngx_core.h> 12 #include <ngx_core.h>
13
14
15 #define NGX_INET_ADDRSTRLEN (sizeof("255.255.255.255") - 1)
13 16
14 17
15 typedef struct { 18 typedef struct {
16 in_addr_t addr; 19 in_addr_t addr;
17 in_addr_t mask; 20 in_addr_t mask;