Home
last modified time | relevance | path

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

12

/unit/src/
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()
96 delim = memchr(addr.start, '-', addr.length); in nxt_http_route_addr_pattern_parse()
137 addr.length = delim - addr.start; in nxt_http_route_addr_pattern_parse()
204 delim = 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 = memchr(addr.start, '-', addr.length); in nxt_http_route_addr_pattern_parse()
237 delim = memchr(addr.start, '/', addr.length); in nxt_http_route_addr_pattern_parse()
[all …]
H A Dnxt_sockaddr.c455 if (addr[i] == 0 && addr[i + 1] == 0) { 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()
553 if (addr->length > 6 && memcmp(addr->start, "unix:", 5) == 0) { in nxt_sockaddr_parse_optport()
556 } else if (addr->start[0] == '[' || nxt_inet6_probe(addr)) { in nxt_sockaddr_parse_optport()
666 end = addr->start + addr->length; in nxt_sockaddr_inet6_parse()
726 p = memchr(addr->start, ':', addr->length); in nxt_sockaddr_inet_parse()
749 length = (addr->start + addr->length) - p; in nxt_sockaddr_inet_parse()
784 addr = 0; in nxt_inet_addr()
803 addr = (addr << 8) + octet; in nxt_inet_addr()
[all …]
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_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_http_route_addr.h67 } addr; member
H A Dnxt_test_build.c48 accept4(int sockfd, struct sockaddr *addr, socklen_t *addrlen, int flags) in accept4() argument
H A Dnxt_http_route.c1747 match = (memcmp(&sin->sin_addr, &p->addr.v4.start, in nxt_http_route_addr_pattern_match()
1753 match = (memcmp(&sin->sin_addr, &p->addr.v4.start, in nxt_http_route_addr_pattern_match()
1755 && memcmp(&sin->sin_addr, &p->addr.v4.end, in nxt_http_route_addr_pattern_match()
1760 match = ((sin->sin_addr.s_addr & p->addr.v4.end) in nxt_http_route_addr_pattern_match()
1761 == p->addr.v4.start); in nxt_http_route_addr_pattern_match()
1793 match = (memcmp(&sin6->sin6_addr, &p->addr.v6.start, in nxt_http_route_addr_pattern_match()
1799 match = (memcmp(&sin6->sin6_addr, &p->addr.v6.start, in nxt_http_route_addr_pattern_match()
1801 && memcmp(&sin6->sin6_addr, &p->addr.v6.end, in nxt_http_route_addr_pattern_match()
1808 & p->addr.v6.end.s6_addr[i]) in nxt_http_route_addr_pattern_match()
1809 == p->addr.v6.start.s6_addr[i]); in nxt_http_route_addr_pattern_match()
/unit/test/
H A Dtest_unix_abstract.py12 addr = '\0sock'
23 "unix:@" + addr[1:]: {"pass": "routes"},
36 self.get(sock_type='unix', addr=addr)['status'] == 200
41 self.get(sock_type='unix', addr=addr)['status'] == 200
46 assert self.get(sock_type='unix', addr=addr)['status'] == 200, 'unix'
55 (addr, port) = address[sock_type]
59 addr=addr,
H A Dtest_asgi_application_unix_abstract.py17 addr = '\0sock'
19 {"unix:@" + addr[1:]: {"pass": "applications/empty"}},
23 assert self.get(sock_type='unix', addr=addr)['status'] == 200
H A Dtest_client_ip.py35 (addr, port) = address[sock_type]
39 addr=addr,
H A Dtest_settings.py168 def req(addr, data_len): argument
170 sock.connect(addr)
202 addr = temp_dir + '/sock'
205 {"unix:" + addr: {'application': 'body_generate'}}, 'listeners'
210 data = req(addr, data_len)
216 data = req(addr, data_len)
H A Dtest_access_log.py109 addr = option.temp_dir + '/sock'
112 {"unix:" + addr: {"pass": "applications/empty"}}, 'listeners'
115 self.get(sock_type='unix', addr=addr)
H A Dtest_asgi_application.py66 addr = temp_dir + '/sock'
68 {"unix:" + addr: {"pass": "applications/empty"}}, 'listeners'
71 assert self.get(sock_type='unix', addr=addr)['status'] == 200
H A Dtest_configuration.py11 def try_addr(self, addr): argument
14 "listeners": {addr: {"pass": "routes"}},
H A Dtest_proxy.py339 addr = temp_dir + '/sock'
344 "unix:" + addr: {'application': 'mirror'},
350 [{"action": {"proxy": 'http://unix:' + addr}}], 'routes'
H A Dtest_php_application.py630 addr = temp_dir + '/sock'
636 "unix:" + addr: {"pass": "applications/php-path"},
658 addr=addr,
H A Dtest_routing.py1737 addr = temp_dir + '/sock'
1742 "unix:" + addr: {"pass": "routes"},
1749 self.get(sock_type='unix', addr=addr)['status'] == 200
1754 self.get(sock_type='unix', addr=addr)['status'] == 200
1759 assert self.get(sock_type='unix', addr=addr)['status'] == 200, 'unix'
/unit/test/unit/check/
H A Dunix_abstract.py15 addr=option.temp_dir + '/control.unit.sock',
H A Dchroot.py15 addr=option.temp_dir + '/control.unit.sock',
H A Disolation.py136 addr=option.temp_dir + '/control.unit.sock',
/unit/go/
H A Dunit.go141 func ListenAndServe(addr string, handler http.Handler) error {
153 return http.ListenAndServe(addr, handler)
/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)
/unit/src/python/
H A Dnxt_python_asgi.c744 nxt_str_t addr; in nxt_py_asgi_create_address() local
746 addr.length = len; in nxt_py_asgi_create_address()
747 addr.start = nxt_unit_sptr_get(sptr); in nxt_py_asgi_create_address()
750 if (nxt_str_start(&addr, "unix:", prefix_len)) { in nxt_py_asgi_create_address()
757 addr.start += prefix_len; in nxt_py_asgi_create_address()
758 addr.length -= prefix_len; in nxt_py_asgi_create_address()
760 v = PyString_FromStringAndSize((const char *) addr.start, addr.length); in nxt_py_asgi_create_address()

12