Home
last modified time | relevance | path

Searched refs:u (Results 1 – 25 of 64) sorted by relevance

123

/unit/src/
H A Dnxt_utf8.c36 if (u < 0x80) { in nxt_utf8_encode()
41 if (u < 0x0800) { in nxt_utf8_encode()
47 if (u < 0x10000) { in nxt_utf8_encode()
75 uint32_t u; in nxt_utf8_decode() local
79 if (u < 0x80) { in nxt_utf8_decode()
81 return u; in nxt_utf8_decode()
105 if (u >= 0xE0) { in nxt_utf8_decode2()
131 u &= 0x1F; in nxt_utf8_decode2()
156 u = (u << 6) | c; in nxt_utf8_decode2()
161 if (overlong < u && u < 0x110000) { in nxt_utf8_decode2()
[all …]
H A Dnxt_select_engine.c71 engine->u.select.nfds = -1; in nxt_select_create()
72 engine->u.select.update_nfds = 0; in nxt_select_create()
91 nxt_free(engine->u.select.events); in nxt_select_free()
145 engine->u.select.events[fd] = ev; in nxt_select_enable_read()
147 if (engine->u.select.nfds < fd) { in nxt_select_enable_read()
148 engine->u.select.nfds = fd; in nxt_select_enable_read()
172 engine->u.select.events[fd] = ev; in nxt_select_enable_write()
174 if (engine->u.select.nfds < fd) { in nxt_select_enable_write()
175 engine->u.select.nfds = fd; in nxt_select_enable_write()
308 engine->u.select.work_read_fd_set = engine->u.select.main_read_fd_set; in nxt_select_poll()
[all …]
H A Dnxt_epoll_engine.c237 engine->u.epoll.fd = -1; in nxt_epoll_create()
238 engine->u.epoll.mode = mode; in nxt_epoll_create()
341 fd = engine->u.epoll.fd; in nxt_epoll_free()
595 if (engine->u.epoll.nchanges >= engine->u.epoll.mchanges) { in nxt_epoll_change()
601 change = &engine->u.epoll.changes[engine->u.epoll.nchanges++]; in nxt_epoll_change()
616 engine->u.epoll.fd, engine->u.epoll.nchanges); in nxt_epoll_commit_changes()
645 engine->u.epoll.nchanges = 0; in nxt_epoll_commit_changes()
801 engine->u.epoll.fd, EPOLL_CTL_ADD, engine->u.epoll.eventfd.fd, in nxt_epoll_enable_post()
886 if (engine->u.epoll.error) { in nxt_epoll_poll()
895 nevents = epoll_wait(engine->u.epoll.fd, engine->u.epoll.events, in nxt_epoll_poll()
[all …]
H A Dnxt_pollset_engine.c95 engine->u.pollset.ps = -1; in nxt_pollset_create()
97 engine->u.pollset.mevents = mevents; in nxt_pollset_create()
124 if (engine->u.pollset.ps == -1) { in nxt_pollset_create()
146 ps = engine->u.pollset.ps; in nxt_pollset_free()
155 nxt_free(engine->u.pollset.events); in nxt_pollset_free()
365 if (engine->u.pollset.nchanges >= engine->u.pollset.mchanges) { in nxt_pollset_change()
371 change = &engine->u.pollset.changes[engine->u.pollset.nchanges++]; in nxt_pollset_change()
389 engine->u.pollset.ps, engine->u.pollset.nchanges); in nxt_pollset_commit_changes()
459 engine->u.pollset.nchanges = 0; in nxt_pollset_commit_changes()
526 ps = engine->u.pollset.ps; in nxt_pollset_write()
[all …]
H A Dnxt_devpoll_engine.c101 engine->u.devpoll.fd = -1; in nxt_devpoll_create()
103 engine->u.devpoll.mevents = mevents; in nxt_devpoll_create()
110 engine->u.devpoll.changes = changes; in nxt_devpoll_create()
130 if (engine->u.devpoll.fd == -1) { in nxt_devpoll_create()
152 fd = engine->u.devpoll.fd; in nxt_devpoll_free()
160 nxt_free(engine->u.devpoll.events); in nxt_devpoll_free()
380 if (engine->u.devpoll.nchanges >= engine->u.devpoll.mchanges) { in nxt_devpoll_change()
386 change = &engine->u.devpoll.changes[engine->u.devpoll.nchanges++]; in nxt_devpoll_change()
403 engine->u.devpoll.fd, engine->u.devpoll.nchanges); in nxt_devpoll_commit_changes()
474 engine->u.devpoll.nchanges = 0; in nxt_devpoll_commit_changes()
[all …]
H A Dnxt_eventport_engine.c94 engine->u.eventport.fd = -1; in nxt_eventport_create()
111 if (engine->u.eventport.fd == -1) { in nxt_eventport_create()
137 port = engine->u.eventport.fd; in nxt_eventport_free()
236 if (engine->u.eventport.nchanges >= engine->u.eventport.mchanges) { in nxt_eventport_enable_event()
242 change = &engine->u.eventport.changes[engine->u.eventport.nchanges++]; in nxt_eventport_enable_event()
284 if (engine->u.eventport.nchanges >= engine->u.eventport.mchanges) { in nxt_eventport_disable_event()
290 change = &engine->u.eventport.changes[engine->u.eventport.nchanges++]; in nxt_eventport_disable_event()
304 port = engine->u.eventport.fd; in nxt_eventport_commit_changes()
356 engine->u.eventport.nchanges = 0; in nxt_eventport_commit_changes()
440 port = engine->u.eventport.fd; in nxt_eventport_signal()
[all …]
H A Dnxt_poll_engine.c128 nxt_free(engine->u.poll.set); in nxt_poll_free()
308 if (engine->u.poll.nchanges >= engine->u.poll.mchanges) { in nxt_poll_change()
314 change = &engine->u.poll.changes[engine->u.poll.nchanges++]; in nxt_poll_change()
379 engine->u.poll.nchanges = 0; in nxt_poll_commit_changes()
396 if (engine->u.poll.nfds >= engine->u.poll.max_nfds) { in nxt_poll_set_add()
404 engine->u.poll.set = pfd; in nxt_poll_set_add()
417 pfd = &engine->u.poll.set[engine->u.poll.nfds++]; in nxt_poll_set_add()
482 engine->u.poll.nfds--; in nxt_poll_set_delete()
483 nfds = engine->u.poll.nfds; in nxt_poll_set_delete()
486 engine->u.poll.set[index] = engine->u.poll.set[nfds]; in nxt_poll_set_delete()
[all …]
H A Dnxt_listen_socket.c57 family = sa->u.sockaddr.sa_family; in nxt_listen_socket_create()
97 && sa->u.sockaddr_un.sun_path[0] != '\0') in nxt_listen_socket_create()
107 sa->u.sockaddr_un.sun_family = AF_UNIX; in nxt_listen_socket_create()
109 p = nxt_cpystr((u_char *) sa->u.sockaddr_un.sun_path, in nxt_listen_socket_create()
115 (void) unlink(sa->u.sockaddr_un.sun_path); in nxt_listen_socket_create()
130 name = (nxt_file_name_t *) sa->u.sockaddr_un.sun_path; in nxt_listen_socket_create()
157 ret = connect(ts, &orig_sa->u.sockaddr, orig_sa->socklen); in nxt_listen_socket_create()
179 tmp = (nxt_file_name_t *) sa->u.sockaddr_un.sun_path; in nxt_listen_socket_create()
199 name = (nxt_file_name_t *) sa->u.sockaddr_un.sun_path; in nxt_listen_socket_create()
257 switch (ls->sockaddr->u.sockaddr.sa_family) { in nxt_listen_socket_remote_size()
[all …]
H A Dnxt_sockaddr.c45 sa->u.sockaddr.sa_family = ls->sockaddr->u.sockaddr.sa_family; in nxt_sockaddr_cache_alloc()
242 switch (sa->u.sockaddr.sa_family) { in nxt_sockaddr_text()
255 port = sa->u.sockaddr_in.sin_port; in nxt_sockaddr_text()
274 port = sa->u.sockaddr_in6.sin6_port; in nxt_sockaddr_text()
330 switch (sa->u.sockaddr.sa_family) { in nxt_sockaddr_port_number()
335 port = sa->u.sockaddr_in6.sin6_port; in nxt_sockaddr_port_number()
348 port = sa->u.sockaddr_in.sin_port; in nxt_sockaddr_port_number()
367 if (sa1->u.sockaddr.sa_family != sa2->u.sockaddr.sa_family) { in nxt_sockaddr_cmp()
376 switch (sa1->u.sockaddr.sa_family) { in nxt_sockaddr_cmp()
381 if (sa1->u.sockaddr_in6.sin6_port != sa2->u.sockaddr_in6.sin6_port) { in nxt_sockaddr_cmp()
[all …]
H A Dnxt_kqueue_engine.c178 engine->u.kqueue.fd = -1; in nxt_kqueue_create()
181 engine->u.kqueue.pid = nxt_pid; in nxt_kqueue_create()
224 fd = engine->u.kqueue.fd; in nxt_kqueue_free()
304 end = &engine->u.kqueue.changes[engine->u.kqueue.nchanges]; in nxt_kqueue_close()
475 ret = kevent(engine->u.kqueue.fd, engine->u.kqueue.changes, nchanges, in nxt_kqueue_get_kevent()
488 return &engine->u.kqueue.changes[engine->u.kqueue.nchanges++]; in nxt_kqueue_get_kevent()
501 end = &engine->u.kqueue.changes[engine->u.kqueue.nchanges]; in nxt_kqueue_error()
690 engine->u.kqueue.fd, engine->u.kqueue.nchanges, timeout); in nxt_kqueue_poll()
693 engine->u.kqueue.changes, engine->u.kqueue.nchanges, in nxt_kqueue_poll()
694 engine->u.kqueue.events, engine->u.kqueue.mevents, tp); in nxt_kqueue_poll()
[all …]
H A Dnxt_upstream.c90 action->u.upstream_number = i; in nxt_upstream_find()
106 nxt_upstream_t *u, **up; in nxt_upstreams_joint_create() local
125 u = &upstreams->upstream[0]; in nxt_upstreams_joint_create()
128 up[i] = u[i].proto->joint_create(tmcf, &u[i]); in nxt_upstreams_joint_create()
144 nxt_upstream_t *u; in nxt_upstream_handler() local
146 u = r->conf->upstreams[action->u.upstream_number]; in nxt_upstream_handler()
148 nxt_debug(task, "upstream handler: \"%V\"", &u->name); in nxt_upstream_handler()
150 return nxt_upstream_proxy_handler(task, r, u); in nxt_upstream_handler()
H A Dnxt_conf.c63 } nxt_packed u; member
232 return value->u.boolean; in nxt_conf_get_boolean()
764 array = value->u.array; in nxt_conf_get_array_element()
783 array = value->u.array; in nxt_conf_get_array_element_or_itself()
803 array = value->u.array; in nxt_conf_array_qsort()
983 dst->u.string.start = nxt_mp_nget(mp, src->u.string.length); in nxt_conf_copy_value()
988 nxt_memcpy(dst->u.string.start, src->u.string.start, in nxt_conf_copy_value()
991 dst->u.string.length = src->u.string.length; in nxt_conf_copy_value()
1002 dst->u = src->u; in nxt_conf_copy_value()
2068 value->u.string.length = s - value->u.string.start; in nxt_conf_json_parse_string()
[all …]
H A Dnxt_http_parse.c881 rp->path.start = u; in nxt_http_parse_complex_target()
897 *u++ = ch; in nxt_http_parse_complex_target()
904 *u++ = ch; in nxt_http_parse_complex_target()
916 *u++ = ch; in nxt_http_parse_complex_target()
926 *u++ = ch; in nxt_http_parse_complex_target()
935 *u++ = ch; in nxt_http_parse_complex_target()
965 u--; in nxt_http_parse_complex_target()
976 u--; in nxt_http_parse_complex_target()
980 u--; in nxt_http_parse_complex_target()
1003 u -= 5; in nxt_http_parse_complex_target()
[all …]
H A Dnxt_http_source.c162 if (nxt_fast_path(hs->u.request.copy.len == 0)) { in nxt_http_source_request_create()
208 ret = nxt_http_status_parse(&hs->u.status_parse, &b->mem); in nxt_http_source_status_filter()
220 hs->header_in.status = hs->u.status_parse.code; in nxt_http_source_status_filter()
223 hs->u.status_parse.http_version, in nxt_http_source_status_filter()
224 hs->u.status_parse.code, in nxt_http_source_status_filter()
225 hs->u.status_parse.end - hs->u.status_parse.start, in nxt_http_source_status_filter()
226 hs->u.status_parse.start); in nxt_http_source_status_filter()
309 hs->u.header.parse.header_end in nxt_http_source_header_filter()
310 - hs->u.header.parse.header_name_start, in nxt_http_source_header_filter()
311 hs->u.header.parse.header_name_start); in nxt_http_source_header_filter()
[all …]
H A Dnxt_upstream_round_robin.c129 nxt_upstream_t *u; in nxt_upstream_round_robin_joint_create() local
134 u = nxt_mp_alloc(mp, sizeof(nxt_upstream_t)); in nxt_upstream_round_robin_joint_create()
135 if (nxt_slow_path(u == NULL)) { in nxt_upstream_round_robin_joint_create()
139 *u = *upstream; in nxt_upstream_round_robin_joint_create()
151 u->type.round_robin = urr; in nxt_upstream_round_robin_joint_create()
160 return u; in nxt_upstream_round_robin_joint_create()
H A Dnxt_fastcgi_source.c182 fs->u.header.mem_pool = fs->upstream->buffers.mem_pool; in nxt_fastcgi_source_handler()
353 &fs->u.request.name, &fs->u.request.value); in nxt_fastcgi_next_param()
358 fs->u.request.name.len); in nxt_fastcgi_next_param()
370 param->buf = fs->u.request.name.data; in nxt_fastcgi_next_param()
371 param->len = fs->u.request.name.len; in nxt_fastcgi_next_param()
376 param->buf = fs->u.request.value.data; in nxt_fastcgi_next_param()
377 param->len = fs->u.request.value.len; in nxt_fastcgi_next_param()
506 fs->u.header.parse.header_end in nxt_fastcgi_source_header_filter()
507 - fs->u.header.parse.header_name_start, in nxt_fastcgi_source_header_filter()
508 fs->u.header.parse.header_name_start); in nxt_fastcgi_source_header_filter()
[all …]
H A Dnxt_tstr.c26 } u; member
123 tstr->u.js = nxt_js_add_tpl(state->jcf, &tpl, strz); in nxt_tstr_compile()
124 if (nxt_slow_path(tstr->u.js == NULL)) { in nxt_tstr_compile()
136 tstr->u.var = nxt_var_compile(&tstr->str, state->pool, in nxt_tstr_compile()
138 if (nxt_slow_path(tstr->u.var == NULL)) { in nxt_tstr_compile()
257 ret = nxt_var_interpreter(task, &query->cache->var, tstr->u.var, val, in nxt_tstr_query()
267 ret = nxt_js_call(task, &query->cache->js, tstr->u.js, val, query->ctx); in nxt_tstr_query()
H A Dnxt_http_route.c70 } u; member
104 } u; member
792 rule->u.name.hash = hash; in nxt_http_route_rule_name_create()
793 rule->u.name.start = name->start; in nxt_http_route_rule_name_create()
945 pattern->u.pattern_slices = NULL; in nxt_http_route_pattern_create()
979 pattern->u.regex = re; in nxt_http_route_pattern_create()
1301 tstr = action->u.tstr; in nxt_http_pass_var()
1474 action->u.route = *route; in nxt_http_route_find()
1547 route = start->u.route; in nxt_http_route_handler()
1733 sin = &sa->u.sockaddr_in; in nxt_http_route_addr_pattern_match()
[all …]
H A Dnxt_main_process.c184 offsetof(nxt_common_app_conf_t, u.python.home),
190 offsetof(nxt_common_app_conf_t, u.python.path),
223 offsetof(nxt_common_app_conf_t, u.php.targets),
229 offsetof(nxt_common_app_conf_t, u.php.options),
269 offsetof(nxt_common_app_conf_t, u.ruby.hooks),
335 port = msg->u.new_port; in nxt_main_new_port_handler()
1121 if (sa->u.sockaddr.sa_family == AF_INET6) { in nxt_main_listening_socket()
1139 if (sa->u.sockaddr.sa_family == AF_UNIX) { in nxt_main_listening_socket()
1178 if (sa->u.sockaddr.sa_family == AF_UNIX in nxt_main_listening_socket()
1179 && sa->u.sockaddr_un.sun_path[0] != '\0') in nxt_main_listening_socket()
[all …]
H A Dnxt_conf_validation.c65 } u; member
602 .u.string = "method",
611 .u.string = "host",
624 .u.string = "uri"
629 .u.string = "query"
638 .u.string = "headers"
643 .u.string = "cookies"
698 .u.string = "chroot",
778 .u.string = "module",
828 .u.string = "root",
[all …]
H A Dnxt_socket_msg.h16 #define NXT_CRED_GETPID(u) (u->pid) argument
23 #define NXT_CRED_GETPID(u) (u->cmcred_pid) argument
H A Dnxt_conn.c145 switch (c->remote->u.sockaddr.sa_family) { in nxt_conn_local_addr()
150 size = offsetof(nxt_sockaddr_t, u) + socklen + length; in nxt_conn_local_addr()
157 size = offsetof(nxt_sockaddr_t, u) + socklen + length; in nxt_conn_local_addr()
169 ret = getsockname(c->socket.fd, &sa->u.sockaddr, &socklen); in nxt_conn_local_addr()
H A Dnxt_http_js.c34 .u.property = {
43 .u.property = {
52 .u.property = {
61 .u.object = {
71 .u.object = {
81 .u.object = {
H A Dnxt_http_proxy.c95 action->u.upstream = up; in nxt_http_proxy_init()
107 nxt_upstream_t *u; in nxt_http_proxy() local
109 u = action->u.upstream; in nxt_http_proxy()
111 nxt_debug(task, "http proxy: \"%V\"", &u->name); in nxt_http_proxy()
113 return nxt_upstream_proxy_handler(task, r, u); in nxt_http_proxy()
/unit/src/test/
H A Dnxt_utf8_test.c47 uint32_t u, d; in nxt_utf8_overlong() local
64 u = 0; in nxt_utf8_overlong()
66 u = (u << 8) + overlong[i]; in nxt_utf8_overlong()
87 uint32_t u, d; in nxt_utf8_test() local
97 for (u = 0; u < 0x110000; u++) { in nxt_utf8_test()
99 p = nxt_utf8_encode(utf8, u); in nxt_utf8_test()
110 if (u != d) { in nxt_utf8_test()
112 u, d); in nxt_utf8_test()
133 u = 0; in nxt_utf8_test()
135 u = (u << 8) + utf8[i]; in nxt_utf8_test()
[all …]

123