ls 417 core/nginx.c ngx_listening_t *ls; ls 448 core/nginx.c ls = ngx_array_push(&cycle->listening); ls 449 core/nginx.c if (ls == NULL) { ls 453 core/nginx.c ngx_memzero(ls, sizeof(ngx_listening_t)); ls 455 core/nginx.c ls->fd = (ngx_socket_t) s; ls 573 core/nginx.c ngx_listening_t *ls; ls 593 core/nginx.c ls = cycle->listening.elts; ls 595 core/nginx.c p = ngx_sprintf(p, "%ud;", ls[i].fd); ls 22 core/ngx_connection.c ngx_listening_t *ls; ls 26 core/ngx_connection.c ls = ngx_array_push(&cf->cycle->listening); ls 27 core/ngx_connection.c if (ls == NULL) { ls 31 core/ngx_connection.c ngx_memzero(ls, sizeof(ngx_listening_t)); ls 40 core/ngx_connection.c ls->sockaddr = sa; ls 41 core/ngx_connection.c ls->socklen = socklen; ls 44 core/ngx_connection.c ls->addr_text.len = len; ls 46 core/ngx_connection.c switch (ls->sockaddr->sa_family) { ls 49 core/ngx_connection.c ls->addr_text_max_len = NGX_INET6_ADDRSTRLEN; ls 54 core/ngx_connection.c ls->addr_text_max_len = NGX_UNIX_ADDRSTRLEN; ls 59 core/ngx_connection.c ls->addr_text_max_len = NGX_INET_ADDRSTRLEN; ls 62 core/ngx_connection.c ls->addr_text_max_len = NGX_SOCKADDR_STRLEN; ls 66 core/ngx_connection.c ls->addr_text.data = ngx_pnalloc(cf->pool, len); ls 67 core/ngx_connection.c if (ls->addr_text.data == NULL) { ls 71 core/ngx_connection.c ngx_memcpy(ls->addr_text.data, text, len); ls 73 core/ngx_connection.c ls->fd = (ngx_socket_t) -1; ls 74 core/ngx_connection.c ls->type = SOCK_STREAM; ls 76 core/ngx_connection.c ls->backlog = NGX_LISTEN_BACKLOG; ls 77 core/ngx_connection.c ls->rcvbuf = -1; ls 78 core/ngx_connection.c ls->sndbuf = -1; ls 81 core/ngx_connection.c ls->setfib = -1; ls 84 core/ngx_connection.c return ls; ls 93 core/ngx_connection.c ngx_listening_t *ls; ls 103 core/ngx_connection.c ls = cycle->listening.elts; ls 106 core/ngx_connection.c ls[i].sockaddr = ngx_palloc(cycle->pool, NGX_SOCKADDRLEN); ls 107 core/ngx_connection.c if (ls[i].sockaddr == NULL) { ls 111 core/ngx_connection.c ls[i].socklen = NGX_SOCKADDRLEN; ls 112 core/ngx_connection.c if (getsockname(ls[i].fd, ls[i].sockaddr, &ls[i].socklen) == -1) { ls 115 core/ngx_connection.c "socket #%d failed", ls[i].fd); ls 116 core/ngx_connection.c ls[i].ignore = 1; ls 120 core/ngx_connection.c switch (ls[i].sockaddr->sa_family) { ls 124 core/ngx_connection.c ls[i].addr_text_max_len = NGX_INET6_ADDRSTRLEN; ls 131 core/ngx_connection.c ls[i].addr_text_max_len = NGX_UNIX_ADDRSTRLEN; ls 137 core/ngx_connection.c ls[i].addr_text_max_len = NGX_INET_ADDRSTRLEN; ls 144 core/ngx_connection.c "an unsupported protocol family", ls[i].fd); ls 145 core/ngx_connection.c ls[i].ignore = 1; ls 149 core/ngx_connection.c ls[i].addr_text.data = ngx_pnalloc(cycle->pool, len); ls 150 core/ngx_connection.c if (ls[i].addr_text.data == NULL) { ls 154 core/ngx_connection.c len = ngx_sock_ntop(ls[i].sockaddr, ls[i].addr_text.data, len, 1); ls 159 core/ngx_connection.c ls[i].addr_text.len = len; ls 161 core/ngx_connection.c ls[i].backlog = NGX_LISTEN_BACKLOG; ls 165 core/ngx_connection.c if (getsockopt(ls[i].fd, SOL_SOCKET, SO_RCVBUF, (void *) &ls[i].rcvbuf, ls 171 core/ngx_connection.c &ls[i].addr_text); ls 173 core/ngx_connection.c ls[i].rcvbuf = -1; ls 178 core/ngx_connection.c if (getsockopt(ls[i].fd, SOL_SOCKET, SO_SNDBUF, (void *) &ls[i].sndbuf, ls 184 core/ngx_connection.c &ls[i].addr_text); ls 186 core/ngx_connection.c ls[i].sndbuf = -1; ls 194 core/ngx_connection.c if (getsockopt(ls[i].setfib, SOL_SOCKET, SO_SETFIB, ls 195 core/ngx_connection.c (void *) &ls[i].setfib, &olen) ls 200 core/ngx_connection.c &ls[i].addr_text); ls 202 core/ngx_connection.c ls[i].setfib = -1; ls 213 core/ngx_connection.c if (getsockopt(ls[i].fd, SOL_SOCKET, SO_ACCEPTFILTER, &af, &olen) ls 224 core/ngx_connection.c &ls[i].addr_text); ls 232 core/ngx_connection.c ls[i].accept_filter = ngx_palloc(cycle->pool, 16); ls 233 core/ngx_connection.c if (ls[i].accept_filter == NULL) { ls 237 core/ngx_connection.c (void) ngx_cpystrn((u_char *) ls[i].accept_filter, ls 246 core/ngx_connection.c if (getsockopt(ls[i].fd, IPPROTO_TCP, TCP_DEFER_ACCEPT, &timeout, &olen) ls 251 core/ngx_connection.c &ls[i].addr_text); ls 259 core/ngx_connection.c ls[i].deferred_accept = 1; ls 275 core/ngx_connection.c ngx_listening_t *ls; ls 291 core/ngx_connection.c ls = cycle->listening.elts; ls 294 core/ngx_connection.c if (ls[i].ignore) { ls 298 core/ngx_connection.c if (ls[i].fd != -1) { ls 302 core/ngx_connection.c if (ls[i].inherited) { ls 311 core/ngx_connection.c s = ngx_socket(ls[i].sockaddr->sa_family, ls[i].type, 0); ls 315 core/ngx_connection.c ngx_socket_n " %V failed", &ls[i].addr_text); ls 325 core/ngx_connection.c &ls[i].addr_text); ls 330 core/ngx_connection.c &ls[i].addr_text); ls 338 core/ngx_connection.c if (ls[i].sockaddr->sa_family == AF_INET6 && ls[i].ipv6only) { ls 341 core/ngx_connection.c ipv6only = (ls[i].ipv6only == 1); ls 349 core/ngx_connection.c &ls[i].addr_text); ls 359 core/ngx_connection.c &ls[i].addr_text); ls 364 core/ngx_connection.c &ls[i].addr_text); ls 372 core/ngx_connection.c "bind() %V #%d ", &ls[i].addr_text, s); ls 374 core/ngx_connection.c if (bind(s, ls[i].sockaddr, ls[i].socklen) == -1) { ls 382 core/ngx_connection.c "bind() to %V failed", &ls[i].addr_text); ls 387 core/ngx_connection.c &ls[i].addr_text); ls 401 core/ngx_connection.c if (ls[i].sockaddr->sa_family == AF_UNIX) { ls 405 core/ngx_connection.c name = ls[i].addr_text.data + sizeof("unix:") - 1; ls 422 core/ngx_connection.c if (listen(s, ls[i].backlog) == -1) { ls 425 core/ngx_connection.c &ls[i].addr_text, ls[i].backlog); ls 430 core/ngx_connection.c &ls[i].addr_text); ls 436 core/ngx_connection.c ls[i].listen = 1; ls 438 core/ngx_connection.c ls[i].fd = s; ls 466 core/ngx_connection.c ngx_listening_t *ls; ls 475 core/ngx_connection.c ls = cycle->listening.elts; ls 478 core/ngx_connection.c ls[i].log = *ls[i].logp; ls 480 core/ngx_connection.c if (ls[i].rcvbuf != -1) { ls 481 core/ngx_connection.c if (setsockopt(ls[i].fd, SOL_SOCKET, SO_RCVBUF, ls 482 core/ngx_connection.c (const void *) &ls[i].rcvbuf, sizeof(int)) ls 487 core/ngx_connection.c ls[i].rcvbuf, &ls[i].addr_text); ls 491 core/ngx_connection.c if (ls[i].sndbuf != -1) { ls 492 core/ngx_connection.c if (setsockopt(ls[i].fd, SOL_SOCKET, SO_SNDBUF, ls 493 core/ngx_connection.c (const void *) &ls[i].sndbuf, sizeof(int)) ls 498 core/ngx_connection.c ls[i].sndbuf, &ls[i].addr_text); ls 503 core/ngx_connection.c if (ls[i].setfib != -1) { ls 504 core/ngx_connection.c if (setsockopt(ls[i].fd, SOL_SOCKET, SO_SETFIB, ls 505 core/ngx_connection.c (const void *) &ls[i].setfib, sizeof(int)) ls 510 core/ngx_connection.c ls[i].setfib, &ls[i].addr_text); ls 519 core/ngx_connection.c if (setsockopt(ls[i].fd, IPPROTO_TCP, TCP_NODELAY, ls 525 core/ngx_connection.c &ls[i].addr_text); ls 530 core/ngx_connection.c if (ls[i].listen) { ls 534 core/ngx_connection.c if (listen(ls[i].fd, ls[i].backlog) == -1) { ls 537 core/ngx_connection.c &ls[i].addr_text, ls[i].backlog); ls 550 core/ngx_connection.c if (ls[i].delete_deferred) { ls 551 core/ngx_connection.c if (setsockopt(ls[i].fd, SOL_SOCKET, SO_ACCEPTFILTER, NULL, 0) ls 557 core/ngx_connection.c &ls[i].addr_text); ls 559 core/ngx_connection.c if (ls[i].accept_filter) { ls 563 core/ngx_connection.c ls[i].accept_filter, &ls[i].addr_text); ls 569 core/ngx_connection.c ls[i].deferred_accept = 0; ls 572 core/ngx_connection.c if (ls[i].add_deferred) { ls 575 core/ngx_connection.c (u_char *) ls[i].accept_filter, 16); ls 577 core/ngx_connection.c if (setsockopt(ls[i].fd, SOL_SOCKET, SO_ACCEPTFILTER, ls 584 core/ngx_connection.c ls[i].accept_filter, &ls[i].addr_text); ls 588 core/ngx_connection.c ls[i].deferred_accept = 1; ls 595 core/ngx_connection.c if (ls[i].add_deferred || ls[i].delete_deferred) { ls 597 core/ngx_connection.c if (ls[i].add_deferred) { ls 598 core/ngx_connection.c timeout = (int) (ls[i].post_accept_timeout / 1000); ls 604 core/ngx_connection.c if (setsockopt(ls[i].fd, IPPROTO_TCP, TCP_DEFER_ACCEPT, ls 611 core/ngx_connection.c timeout, &ls[i].addr_text); ls 617 core/ngx_connection.c if (ls[i].add_deferred) { ls 618 core/ngx_connection.c ls[i].deferred_accept = 1; ls 634 core/ngx_connection.c ngx_listening_t *ls; ls 644 core/ngx_connection.c ls = cycle->listening.elts; ls 647 core/ngx_connection.c c = ls[i].connection; ls 675 core/ngx_connection.c "close listening %V #%d ", &ls[i].addr_text, ls[i].fd); ls 677 core/ngx_connection.c if (ngx_close_socket(ls[i].fd) == -1) { ls 679 core/ngx_connection.c ngx_close_socket_n " %V failed", &ls[i].addr_text); ls 684 core/ngx_connection.c if (ls[i].sockaddr->sa_family == AF_UNIX ls 688 core/ngx_connection.c u_char *name = ls[i].addr_text.data + sizeof("unix:") - 1; ls 698 core/ngx_connection.c ls[i].fd = (ngx_socket_t) -1; ls 55 core/ngx_cycle.c ngx_listening_t *ls, *nls; ls 492 core/ngx_cycle.c ls = old_cycle->listening.elts; ls 494 core/ngx_cycle.c ls[i].remain = 0; ls 501 core/ngx_cycle.c if (ls[i].ignore) { ls 505 core/ngx_cycle.c if (ngx_cmp_sockaddr(nls[n].sockaddr, ls[i].sockaddr) == NGX_OK) ls 507 core/ngx_cycle.c nls[n].fd = ls[i].fd; ls 508 core/ngx_cycle.c nls[n].previous = &ls[i]; ls 509 core/ngx_cycle.c ls[i].remain = 1; ls 511 core/ngx_cycle.c if (ls[n].backlog != nls[i].backlog) { ls 521 core/ngx_cycle.c nls[n].deferred_accept = ls[i].deferred_accept; ls 523 core/ngx_cycle.c if (ls[i].accept_filter && nls[n].accept_filter) { ls 524 core/ngx_cycle.c if (ngx_strcmp(ls[i].accept_filter, ls 532 core/ngx_cycle.c } else if (ls[i].accept_filter) { ls 542 core/ngx_cycle.c if (ls[n].deferred_accept && !nls[n].deferred_accept) { ls 545 core/ngx_cycle.c } else if (ls[i].deferred_accept != nls[n].deferred_accept) ls 560 core/ngx_cycle.c ls = cycle->listening.elts; ls 562 core/ngx_cycle.c ls[i].open = 1; ls 564 core/ngx_cycle.c if (ls[i].accept_filter) { ls 565 core/ngx_cycle.c ls[i].add_deferred = 1; ls 569 core/ngx_cycle.c if (ls[i].deferred_accept) { ls 570 core/ngx_cycle.c ls[i].add_deferred = 1; ls 661 core/ngx_cycle.c ls = old_cycle->listening.elts; ls 664 core/ngx_cycle.c if (ls[i].remain || ls[i].fd == -1) { ls 668 core/ngx_cycle.c if (ngx_close_socket(ls[i].fd) == -1) { ls 671 core/ngx_cycle.c &ls[i].addr_text); ls 676 core/ngx_cycle.c if (ls[i].sockaddr->sa_family == AF_UNIX) { ls 679 core/ngx_cycle.c name = ls[i].addr_text.data + sizeof("unix:") - 1; ls 826 core/ngx_cycle.c ls = cycle->listening.elts; ls 828 core/ngx_cycle.c if (ls[i].fd == -1 || !ls[i].open) { ls 832 core/ngx_cycle.c if (ngx_close_socket(ls[i].fd) == -1) { ls 835 core/ngx_cycle.c &ls[i].addr_text); ls 578 event/ngx_event.c ngx_listening_t *ls; ls 735 event/ngx_event.c ls = cycle->listening.elts; ls 738 event/ngx_event.c c = ngx_get_connection(ls[i].fd, cycle->log); ls 744 event/ngx_event.c c->log = &ls[i].log; ls 746 event/ngx_event.c c->listening = &ls[i]; ls 747 event/ngx_event.c ls[i].connection = c; ls 755 event/ngx_event.c rev->deferred_accept = ls[i].deferred_accept; ls 759 event/ngx_event.c if (ls[i].previous) { ls 766 event/ngx_event.c old = ls[i].previous->connection; ls 793 event/ngx_event.c ls[i].log.handler = ngx_acceptex_log_error; ls 796 event/ngx_event.c if (ngx_event_post_acceptex(&ls[i], iocpcf->post_acceptex) ls 551 event/ngx_event.h ngx_int_t ngx_event_post_acceptex(ngx_listening_t *ls, ngx_uint_t n); ls 25 event/ngx_event_accept.c ngx_listening_t *ls; ls 43 event/ngx_event_accept.c ls = lc->listening; ls 47 event/ngx_event_accept.c "accept on %V, ready: %d", &ls->addr_text, ev->available); ls 124 event/ngx_event_accept.c c->pool = ngx_create_pool(ls->pool_size, ev->log); ls 167 event/ngx_event_accept.c *log = ls->log; ls 178 event/ngx_event_accept.c c->listening = ls; ls 179 event/ngx_event_accept.c c->local_sockaddr = ls->sockaddr; ls 236 event/ngx_event_accept.c if (ls->addr_ntop) { ls 237 event/ngx_event_accept.c c->addr_text.data = ngx_pnalloc(c->pool, ls->addr_text_max_len); ls 244 event/ngx_event_accept.c ls->addr_text_max_len, 0); ls 283 event/ngx_event_accept.c ls->handler(c); ls 338 event/ngx_event_accept.c ngx_listening_t *ls; ls 341 event/ngx_event_accept.c ls = cycle->listening.elts; ls 344 event/ngx_event_accept.c c = ls[i].connection; ls 367 event/ngx_event_accept.c ngx_listening_t *ls; ls 370 event/ngx_event_accept.c ls = cycle->listening.elts; ls 373 event/ngx_event_accept.c c = ls[i].connection; ls 1647 http/ngx_http.c ngx_listening_t *ls; ls 1678 http/ngx_http.c ls = ngx_http_add_listening(cf, &addr[i]); ls 1679 http/ngx_http.c if (ls == NULL) { ls 1688 http/ngx_http.c ls->servers = hport; ls 1698 http/ngx_http.c switch (ls->sockaddr->sa_family) { ls 1725 http/ngx_http.c ngx_listening_t *ls; ls 1729 http/ngx_http.c ls = ngx_create_listening(cf, &addr->opt.u.sockaddr, addr->opt.socklen); ls 1730 http/ngx_http.c if (ls == NULL) { ls 1734 http/ngx_http.c ls->addr_ntop = 1; ls 1736 http/ngx_http.c ls->handler = ngx_http_init_connection; ls 1739 http/ngx_http.c ls->pool_size = cscf->connection_pool_size; ls 1740 http/ngx_http.c ls->post_accept_timeout = cscf->client_header_timeout; ls 1744 http/ngx_http.c ls->logp = clcf->error_log; ls 1745 http/ngx_http.c ls->log.data = &ls->addr_text; ls 1746 http/ngx_http.c ls->log.handler = ngx_accept_log_error; ls 1754 http/ngx_http.c ls->post_accept_buffer_size = cscf->client_header_buffer_size; ls 1759 http/ngx_http.c ls->backlog = addr->opt.backlog; ls 1760 http/ngx_http.c ls->rcvbuf = addr->opt.rcvbuf; ls 1761 http/ngx_http.c ls->sndbuf = addr->opt.sndbuf; ls 1764 http/ngx_http.c ls->accept_filter = addr->opt.accept_filter; ls 1768 http/ngx_http.c ls->deferred_accept = addr->opt.deferred_accept; ls 1772 http/ngx_http.c ls->ipv6only = addr->opt.ipv6only; ls 1776 http/ngx_http.c ls->setfib = addr->opt.setfib; ls 1779 http/ngx_http.c return ls; ls 326 mail/ngx_mail.c ngx_listening_t *ls; ls 362 mail/ngx_mail.c ls = ngx_create_listening(cf, addr[i].sockaddr, addr[i].socklen); ls 363 mail/ngx_mail.c if (ls == NULL) { ls 367 mail/ngx_mail.c ls->addr_ntop = 1; ls 368 mail/ngx_mail.c ls->handler = ngx_mail_init_connection; ls 369 mail/ngx_mail.c ls->pool_size = 256; ls 372 mail/ngx_mail.c ls->logp = &cf->cycle->new_log; ls 373 mail/ngx_mail.c ls->log.data = &ls->addr_text; ls 374 mail/ngx_mail.c ls->log.handler = ngx_accept_log_error; ls 377 mail/ngx_mail.c ls->ipv6only = addr[i].ipv6only; ls 385 mail/ngx_mail.c ls->servers = mport; ls 395 mail/ngx_mail.c switch (ls->sockaddr->sa_family) { ls 288 mail/ngx_mail_core_module.c ngx_mail_listen_t *ls; ls 315 mail/ngx_mail_core_module.c ls = cmcf->listen.elts; ls 319 mail/ngx_mail_core_module.c sa = (struct sockaddr *) ls[i].sockaddr; ls 344 mail/ngx_mail_core_module.c if (ngx_memcmp(ls[i].sockaddr + off, u.sockaddr + off, len) != 0) { ls 357 mail/ngx_mail_core_module.c ls = ngx_array_push(&cmcf->listen); ls 358 mail/ngx_mail_core_module.c if (ls == NULL) { ls 362 mail/ngx_mail_core_module.c ngx_memzero(ls, sizeof(ngx_mail_listen_t)); ls 364 mail/ngx_mail_core_module.c ngx_memcpy(ls->sockaddr, u.sockaddr, u.socklen); ls 366 mail/ngx_mail_core_module.c ls->socklen = u.socklen; ls 367 mail/ngx_mail_core_module.c ls->wildcard = u.wildcard; ls 368 mail/ngx_mail_core_module.c ls->ctx = cf->ctx; ls 392 mail/ngx_mail_core_module.c ls->bind = 1; ls 401 mail/ngx_mail_core_module.c sa = (struct sockaddr *) ls->sockaddr; ls 406 mail/ngx_mail_core_module.c ls->ipv6only = 1; ls 409 mail/ngx_mail_core_module.c ls->ipv6only = 2; ls 418 mail/ngx_mail_core_module.c ls->bind = 1; ls 439 mail/ngx_mail_core_module.c ls->ssl = 1; ls 94 os/unix/ngx_process_cycle.c ngx_listening_t *ls; ls 213 os/unix/ngx_process_cycle.c ls = cycle->listening.elts; ls 215 os/unix/ngx_process_cycle.c if (ngx_close_socket(ls[n].fd) == -1) { ls 218 os/unix/ngx_process_cycle.c &ls[n].addr_text); ls 837 os/unix/ngx_process_cycle.c ngx_listening_t *ls; ls 955 os/unix/ngx_process_cycle.c ls = cycle->listening.elts; ls 957 os/unix/ngx_process_cycle.c ls[i].previous = NULL;