Home
last modified time | relevance | path

Searched refs:addr (Results 1 – 25 of 25) sorted by path

/unit/go/
H A Dunit.go141 func ListenAndServe(addr string, handler http.Handler) error {
153 return http.ListenAndServe(addr, handler)
/unit/src/
H A Dnxt_http_request.c469 nxt_str_t addr; in nxt_http_request_client_ip_sockaddr() local
472 addr.start = start; in nxt_http_request_client_ip_sockaddr()
473 addr.length = len; in nxt_http_request_client_ip_sockaddr()
475 sa = nxt_sockaddr_parse_optport(r->mem_pool, &addr); in nxt_http_request_client_ip_sockaddr()
H A Dnxt_http_route.c1743 match = (nxt_memcmp(&sin->sin_addr, &p->addr.v4.start, in nxt_http_route_addr_pattern_match()
1749 match = (nxt_memcmp(&sin->sin_addr, &p->addr.v4.start, in nxt_http_route_addr_pattern_match()
1751 && nxt_memcmp(&sin->sin_addr, &p->addr.v4.end, in nxt_http_route_addr_pattern_match()
1756 match = ((sin->sin_addr.s_addr & p->addr.v4.end) in nxt_http_route_addr_pattern_match()
1757 == p->addr.v4.start); in nxt_http_route_addr_pattern_match()
1789 match = (nxt_memcmp(&sin6->sin6_addr, &p->addr.v6.start, in nxt_http_route_addr_pattern_match()
1795 match = (nxt_memcmp(&sin6->sin6_addr, &p->addr.v6.start, in nxt_http_route_addr_pattern_match()
1797 && nxt_memcmp(&sin6->sin6_addr, &p->addr.v6.end, in nxt_http_route_addr_pattern_match()
1804 & p->addr.v6.end.s6_addr[i]) in nxt_http_route_addr_pattern_match()
1805 == p->addr.v6.start.s6_addr[i]); in nxt_http_route_addr_pattern_match()
H A Dnxt_http_route_addr.c34 if (addr.length > 0 && addr.start[0] == '!') { in nxt_http_route_addr_pattern_parse()
60 if (addr.start[0] == '*' && addr.start[1] == ':') { in nxt_http_route_addr_pattern_parse()
82 end = addr.start + addr.length; in nxt_http_route_addr_pattern_parse()
89 addr.length = port.start - addr.start; in nxt_http_route_addr_pattern_parse()
108 len = addr.start + addr.length - delim - 1; in nxt_http_route_addr_pattern_parse()
137 addr.length = delim - addr.start; in nxt_http_route_addr_pattern_parse()
204 delim = nxt_memchr(addr.start, ':', addr.length); in nxt_http_route_addr_pattern_parse()
208 addr.length = delim - addr.start; in nxt_http_route_addr_pattern_parse()
213 delim = nxt_memchr(addr.start, '-', addr.length); in nxt_http_route_addr_pattern_parse()
237 delim = nxt_memchr(addr.start, '/', addr.length); in nxt_http_route_addr_pattern_parse()
[all …]
H A Dnxt_http_route_addr.h67 } addr; member
H A Dnxt_mem_map.c11 nxt_mem_mmap(void *addr, size_t len, nxt_uint_t protection, nxt_uint_t flags, in nxt_mem_mmap() argument
16 p = mmap(addr, len, protection, flags, fd, offset); in nxt_mem_mmap()
20 addr, len, protection, flags, fd, offset, p); in nxt_mem_mmap()
24 addr, len, protection, flags, fd, offset, nxt_errno); in nxt_mem_mmap()
32 nxt_mem_munmap(void *addr, size_t len) in nxt_mem_munmap() argument
34 if (nxt_fast_path(munmap(addr, len) == 0)) { in nxt_mem_munmap()
35 nxt_thread_log_debug("munmap(%p, %uz)", addr, len); in nxt_mem_munmap()
38 nxt_thread_log_alert("munmap(%p, %uz) failed %E", addr, len, nxt_errno); in nxt_mem_munmap()
H A Dnxt_mem_map.h49 #define nxt_mem_map(addr, ctx, len, protection, flags, fd, offset) \ argument
50 nxt_mem_mmap(addr, len, protection, flags, fd, offset)
53 #define nxt_mem_unmap(addr, ctx, len) \ argument
54 nxt_mem_munmap(addr, len)
57 NXT_EXPORT void *nxt_mem_mmap(void *addr, size_t len, nxt_uint_t protection,
59 NXT_EXPORT void nxt_mem_munmap(void *addr, size_t len);
H A Dnxt_mem_zone.c94 #define nxt_mem_zone_addr_page(zone, addr) \ argument
95 &zone->pages[((u_char *) addr - zone->start) >> zone->page_size_shift]
H A Dnxt_sockaddr.c455 if (addr[i] == 0 && addr[i + 1] == 0) { in nxt_inet6_ntop()
484 if ((zero_groups == 5 && addr[10] == 0xFF && addr[11] == 0xFF) in nxt_inet6_ntop()
488 || (zero_groups == 7 && addr[14] != 0 && addr[15] != 1)) in nxt_inet6_ntop()
514 addr[12], addr[13], addr[14], addr[15]); in nxt_inet6_ntop()
556 } else if (addr->start[0] == '[' || nxt_inet6_probe(addr)) { in nxt_sockaddr_parse_optport()
665 end = addr->start + addr->length; in nxt_sockaddr_inet6_parse()
725 p = nxt_memchr(addr->start, ':', addr->length); in nxt_sockaddr_inet_parse()
748 length = (addr->start + addr->length) - p; in nxt_sockaddr_inet_parse()
783 addr = 0; in nxt_inet_addr()
802 addr = (addr << 8) + octet; in nxt_inet_addr()
[all …]
H A Dnxt_sockaddr.h82 NXT_EXPORT nxt_sockaddr_t *nxt_sockaddr_parse(nxt_mp_t *mp, nxt_str_t *addr);
84 nxt_str_t *addr);
90 NXT_EXPORT nxt_bool_t nxt_inet6_probe(nxt_str_t *addr);
H A Dnxt_stream_module.c38 up->addr = rt->upstream; in nxt_stream_connection_init()
41 nxt_str_set(&up->addr, "127.0.0.1:8080"); in nxt_stream_connection_init()
H A Dnxt_test_build.c48 accept4(int sockfd, struct sockaddr *addr, socklen_t *addrlen, int flags) in accept4() argument
H A Dnxt_test_build.h91 int accept4(int sockfd, struct sockaddr *addr, socklen_t *addrlen, int flags);
/unit/src/python/
H A Dnxt_python_asgi.c742 nxt_str_t addr; in nxt_py_asgi_create_address() local
745 addr.length = len; in nxt_py_asgi_create_address()
746 addr.start = nxt_unit_sptr_get(sptr); in nxt_py_asgi_create_address()
749 if (!nxt_str_start(&addr, "unix:", prefix_len)) { in nxt_py_asgi_create_address()
759 addr.start += prefix_len; in nxt_py_asgi_create_address()
760 addr.length -= prefix_len; in nxt_py_asgi_create_address()
762 v = PyString_FromStringAndSize((const char *) addr.start, addr.length); in nxt_py_asgi_create_address()
/unit/test/
H A Dconftest.py522 addr=sock,
533 http.get(url='/certificates', sock_type='unix', addr=sock)['body']
543 addr=sock,
H A Dtest_access_log.py118 addr = option.temp_dir + '/sock'
121 {"unix:" + addr: {"pass": "applications/empty"}}, 'listeners'
124 self.get(sock_type='unix', addr=addr)
H A Dtest_client_ip.py35 (addr, port) = address[sock_type]
39 addr=addr,
H A Dtest_configuration.py10 def try_addr(self, addr): argument
13 "listeners": {addr: {"pass": "routes"}},
H A Dtest_proxy.py348 addr = temp_dir + '/sock'
353 "unix:" + addr: {'application': 'mirror'},
359 [{"action": {"proxy": 'http://unix:' + addr}}], 'routes'
H A Dtest_routing.py1723 addr = temp_dir + '/sock'
1728 "unix:" + addr: {"pass": "routes"},
1735 self.get(sock_type='unix', addr=addr)['status'] == 200
1740 self.get(sock_type='unix', addr=addr)['status'] == 200
1745 assert self.get(sock_type='unix', addr=addr)['status'] == 200, 'unix'
H A Dtest_settings.py170 def req(addr, data_len): argument
172 sock.connect(addr)
204 addr = temp_dir + '/sock'
207 {"unix:" + addr: {'application': 'body_generate'}}, 'listeners'
212 data = req(addr, data_len)
218 data = req(addr, data_len)
H A Dtest_static.py395 addr=temp_dir + '/control.unit.sock',
/unit/test/unit/check/
H A Dchroot.py15 addr=option.temp_dir + '/control.unit.sock',
H A Disolation.py136 addr=option.temp_dir + '/control.unit.sock',
/unit/test/unit/
H A Dhttp.py28 addr = '::1' if sock_type == 'ipv6' else '127.0.0.1'
30 addr = kwargs['addr']
51 connect_args = addr if sock_type == 'unix' else (addr, port)