Home
last modified time | relevance | path

Searched refs:sockaddr (Results 1 – 25 of 30) sorted by relevance

12

/unit/src/
H A Dnxt_listen_socket.c48 sa = ls->sockaddr; in nxt_listen_socket_create()
57 family = sa->u.sockaddr.sa_family; in nxt_listen_socket_create()
157 ret = connect(ts, &orig_sa->u.sockaddr, orig_sa->socklen); in nxt_listen_socket_create()
231 log.ctx = ls->sockaddr; in nxt_listen_socket_update()
257 switch (ls->sockaddr->u.sockaddr.sa_family) { in nxt_listen_socket_remote_size()
309 switch (ls->sockaddr->u.sockaddr.sa_family) { in nxt_listen_socket_pool_min_size()
320 if (IN6_IS_ADDR_UNSPECIFIED(&ls->sockaddr->u.sockaddr_in6.sin6_addr)) { in nxt_listen_socket_pool_min_size()
352 if (ls->sockaddr->u.sockaddr_in.sin_addr.s_addr == INADDR_ANY) { in nxt_listen_socket_pool_min_size()
H A Dnxt_stream_module.c65 up->sockaddr->type = SOCK_STREAM; in nxt_stream_connection_peer()
68 (size_t) up->sockaddr->length, in nxt_stream_connection_peer()
69 nxt_sockaddr_start(up->sockaddr)); in nxt_stream_connection_peer()
89 p->peer->remote = up->sockaddr; in nxt_stream_connection_peer()
H A Dnxt_sockaddr.h49 struct sockaddr sockaddr; member
78 struct sockaddr *sockaddr, socklen_t socklen, size_t address_length)
H A Dnxt_sockaddr.c43 sa->type = ls->sockaddr->type; in nxt_sockaddr_cache_alloc()
49 sa->u.sockaddr.sa_family = ls->sockaddr->u.sockaddr.sa_family; in nxt_sockaddr_cache_alloc()
95 nxt_sockaddr_create(nxt_mp_t *mp, struct sockaddr *sockaddr, socklen_t length, in nxt_sockaddr_create() argument
136 } else if (sockaddr->sa_family == AF_UNIX && sockaddr->sa_data[0] == '\0') { in nxt_sockaddr_create()
154 nxt_memcpy(&sa->u.sockaddr, sockaddr, copy); in nxt_sockaddr_create()
193 nxt_sockaddr_buf_t sockaddr; in nxt_getsockname() local
246 switch (sa->u.sockaddr.sa_family) { in nxt_sockaddr_text()
334 switch (sa->u.sockaddr.sa_family) { in nxt_sockaddr_port_number()
371 if (sa1->u.sockaddr.sa_family != sa2->u.sockaddr.sa_family) { in nxt_sockaddr_cmp()
380 switch (sa1->u.sockaddr.sa_family) { in nxt_sockaddr_cmp()
[all …]
H A Dnxt_upstream_round_robin.c14 nxt_sockaddr_t *sockaddr; member
104 urr->server[i].sockaddr = sa; in nxt_upstream_round_robin_create()
200 us->sockaddr = best->sockaddr; in nxt_upstream_round_robin_server_get()
H A Dnxt_socket.c58 if (sa->u.sockaddr.sa_family == AF_UNIX) { in nxt_socket_defer_accept()
180 if (nxt_fast_path(bind(s, &sa->u.sockaddr, sa->socklen) == 0)) { in nxt_socket_bind()
201 if (connect(s, &sa->u.sockaddr, sa->socklen) == 0) { in nxt_socket_connect()
H A Dnxt_listen_socket.h19 nxt_sockaddr_t *sockaddr; member
H A Dnxt_runtime.c198 if (nxt_slow_path(ls->sockaddr == NULL)) { in nxt_runtime_inherited_listen_sockets()
207 ls->sockaddr->type = (uint16_t) type; in nxt_runtime_inherited_listen_sockets()
266 ls->sockaddr = nxt_getsockname(task, rt->mem_pool, s); in nxt_runtime_systemd_listen_sockets()
267 if (nxt_slow_path(ls->sockaddr == NULL)) { in nxt_runtime_systemd_listen_sockets()
271 ls->sockaddr->type = SOCK_STREAM; in nxt_runtime_systemd_listen_sockets()
571 if (sa->u.sockaddr.sa_family == AF_UNIX) { in nxt_runtime_exit()
1129 ls->sockaddr = nxt_sockaddr_create(mp, &sa->u.sockaddr, sa->socklen, in nxt_runtime_listen_socket_add()
1131 if (ls->sockaddr == NULL) { in nxt_runtime_listen_socket_add()
1135 ls->sockaddr->type = sa->type; in nxt_runtime_listen_socket_add()
1137 nxt_sockaddr_text(ls->sockaddr); in nxt_runtime_listen_socket_add()
[all …]
H A Dnxt_upstream.h60 nxt_sockaddr_t *sockaddr; member
H A Dnxt_conn.c145 switch (c->remote->u.sockaddr.sa_family) { in nxt_conn_local_addr()
169 ret = getsockname(c->socket.fd, &sa->u.sockaddr, &socklen); in nxt_conn_local_addr()
H A Dnxt_http_proxy.c13 nxt_sockaddr_t *sockaddr; member
91 proxy->sockaddr = sa; in nxt_http_proxy_init()
159 us->sockaddr = proxy->sockaddr; in nxt_http_proxy_server_get()
H A Dnxt_test_build.c48 accept4(int sockfd, struct sockaddr *addr, socklen_t *addrlen, int flags) in accept4()
H A Dnxt_socket.h80 struct sockaddr buf;
H A Dnxt_job_resolve.c104 switch (sa->u.sockaddr.sa_family) { in nxt_job_resolve()
H A Dnxt_conn_accept.c141 struct sockaddr *sa; in nxt_conn_io_accept()
150 sa = &c->remote->u.sockaddr; in nxt_conn_io_accept()
H A Dnxt_test_build.h91 int accept4(int sockfd, struct sockaddr *addr, socklen_t *addrlen, int flags);
H A Dnxt_conn_connect.c85 family = c->remote->u.sockaddr.sa_family; in nxt_conn_socket()
H A Dnxt_router.h173 nxt_sockaddr_t *sockaddr; member
H A Dnxt_main_process.c1103 s = socket(sa->u.sockaddr.sa_family, sa->type, 0); in nxt_main_listening_socket()
1110 if (err == EAFNOSUPPORT && sa->u.sockaddr.sa_family == AF_INET6) { in nxt_main_listening_socket()
1133 if (sa->u.sockaddr.sa_family == AF_INET6) { in nxt_main_listening_socket()
1146 if (bind(s, &sa->u.sockaddr, sa->socklen) != 0) { in nxt_main_listening_socket()
1151 if (sa->u.sockaddr.sa_family == AF_UNIX) { in nxt_main_listening_socket()
1190 if (sa->u.sockaddr.sa_family == AF_UNIX) { in nxt_main_listening_socket()
H A Dnxt_conn.h197 if ((c)->remote->u.sockaddr.sa_family != AF_UNIX) { \
H A Dnxt_stream_source.c63 c->remote = us->peer->sockaddr; in nxt_stream_source_connect()
H A Dnxt_http.h356 nxt_http_route_addr_rule_t *addr_rule, nxt_sockaddr_t *sockaddr);
H A Dnxt_router.c2502 ls->sockaddr = nxt_pointer_to(ls, sizeof(nxt_listen_socket_t)); in nxt_router_socket_conf()
2503 nxt_memcpy(ls->sockaddr, sa, size); in nxt_router_socket_conf()
2513 switch (sa->u.sockaddr.sa_family) { in nxt_router_socket_conf()
2531 skcf->sockaddr = nxt_mp_zget(tmcf->router_conf->mem_pool, size); in nxt_router_socket_conf()
2532 if (nxt_slow_path(skcf->sockaddr == NULL)) { in nxt_router_socket_conf()
2536 nxt_memcpy(skcf->sockaddr, sa, size); in nxt_router_socket_conf()
2559 if (nxt_sockaddr_cmp(skcf->listen->sockaddr, sa)) { in nxt_router_listen_socket_find()
2597 size = nxt_sockaddr_size(skcf->listen->sockaddr); in nxt_router_listen_socket_rpc_create()
2606 b->mem.free = nxt_cpymem(b->mem.free, skcf->listen->sockaddr, size); in nxt_router_listen_socket_rpc_create()
2653 nxt_socket_defer_accept(task, s, rpc->socket_conf->listen->sockaddr); in nxt_router_listen_socket_ready()
[all …]
H A Dnxt_kqueue_engine.c934 struct sockaddr *sa; in nxt_kqueue_conn_io_accept()
946 sa = &c->remote->u.sockaddr; in nxt_kqueue_conn_io_accept()
/unit/auto/
H A Dsockets31 nxt_feature="sockaddr.sa_len"
40 struct sockaddr sa;
49 nxt_feature="struct sockaddr size"
58 printf(\"%d\", (int) sizeof(struct sockaddr));

12