comparison src/http/ngx_http_core_module.h @ 6559:adf25b8d0431

Introduced the ngx_sockaddr_t type. It's properly aligned and can hold any supported sockaddr.
author Ruslan Ermilov <ru@nginx.com>
date Mon, 23 May 2016 16:37:20 +0300
parents 6f8254ae61b8
children c90cf79d0e1d
comparison
equal deleted inserted replaced
6558:68854ce64ec7 6559:adf25b8d0431
56 typedef struct ngx_http_location_tree_node_s ngx_http_location_tree_node_t; 56 typedef struct ngx_http_location_tree_node_s ngx_http_location_tree_node_t;
57 typedef struct ngx_http_core_loc_conf_s ngx_http_core_loc_conf_t; 57 typedef struct ngx_http_core_loc_conf_s ngx_http_core_loc_conf_t;
58 58
59 59
60 typedef struct { 60 typedef struct {
61 union { 61 ngx_sockaddr_t u;
62 struct sockaddr sockaddr;
63 struct sockaddr_in sockaddr_in;
64 #if (NGX_HAVE_INET6)
65 struct sockaddr_in6 sockaddr_in6;
66 #endif
67 #if (NGX_HAVE_UNIX_DOMAIN)
68 struct sockaddr_un sockaddr_un;
69 #endif
70 } u;
71
72 socklen_t socklen; 62 socklen_t socklen;
73 63
74 unsigned set:1; 64 unsigned set:1;
75 unsigned default_server:1; 65 unsigned default_server:1;
76 unsigned bind:1; 66 unsigned bind:1;