Mercurial > hg > nginx
annotate src/os/win32/ngx_process.h @ 8971:1e2f4e9c8195 quic
QUIC: reworked migration handling.
The quic connection now holds active, backup and probe paths instead
of sockets. The number of migration paths is now limited and cannot
be inflated by a bad client or an attacker.
The client id is now associated with path rather than socket. This allows
to simplify processing of output and connection ids handling.
New migration abandons any previously started migrations. This allows to
free consumed client ids and request new for use in future migrations and
make progress in case when connection id limit is hit during migration.
A path now can be revalidated without losing its state.
The patch also fixes various issues with NAT rebinding case handling:
- paths are now validated (previously, there was no validation
and paths were left in limited state)
- attempt to reuse id on different path is now again verified
(this was broken in 40445fc7c403)
- former path is now validated in case of apparent migration
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Wed, 19 Jan 2022 22:39:24 +0300 |
parents | 8b84d60ef13d |
children |
rev | line source |
---|---|
441
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
374
diff
changeset
|
1 |
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
374
diff
changeset
|
2 /* |
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
441
diff
changeset
|
3 * Copyright (C) Igor Sysoev |
4412 | 4 * Copyright (C) Nginx, Inc. |
441
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
374
diff
changeset
|
5 */ |
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
374
diff
changeset
|
6 |
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
374
diff
changeset
|
7 |
36
c14d7232b11f
nginx-0.0.1-2002-12-23-09:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
8 #ifndef _NGX_PROCESS_H_INCLUDED_ |
c14d7232b11f
nginx-0.0.1-2002-12-23-09:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
9 #define _NGX_PROCESS_H_INCLUDED_ |
c14d7232b11f
nginx-0.0.1-2002-12-23-09:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
10 |
c14d7232b11f
nginx-0.0.1-2002-12-23-09:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
11 |
2725 | 12 typedef DWORD ngx_pid_t; |
13 #define NGX_INVALID_PID 0 | |
543 | 14 |
278
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
36
diff
changeset
|
15 |
2725 | 16 #define ngx_getpid GetCurrentProcessId |
7162
8b84d60ef13d
Fixed "changing binary" when reaper is not init.
Ruslan Ermilov <ru@nginx.com>
parents:
6402
diff
changeset
|
17 #define ngx_getppid() 0 |
2725 | 18 #define ngx_log_pid ngx_pid |
19 | |
20 | |
21 #define NGX_PROCESS_SYNC_NAME \ | |
22 (sizeof("ngx_cache_manager_mutex_") + NGX_INT32_LEN) | |
278
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
36
diff
changeset
|
23 |
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
36
diff
changeset
|
24 |
6402
7296b38f6416
Core: added support for more than 64 CPUs in worker_cpu_affinity.
Vladimir Homutov <vl@nginx.com>
parents:
4412
diff
changeset
|
25 typedef uint64_t ngx_cpuset_t; |
7296b38f6416
Core: added support for more than 64 CPUs in worker_cpu_affinity.
Vladimir Homutov <vl@nginx.com>
parents:
4412
diff
changeset
|
26 |
7296b38f6416
Core: added support for more than 64 CPUs in worker_cpu_affinity.
Vladimir Homutov <vl@nginx.com>
parents:
4412
diff
changeset
|
27 |
278
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
36
diff
changeset
|
28 typedef struct { |
2725 | 29 HANDLE handle; |
30 ngx_pid_t pid; | |
31 char *name; | |
32 | |
33 HANDLE term; | |
34 HANDLE quit; | |
35 HANDLE reopen; | |
36 | |
37 u_char term_event[NGX_PROCESS_SYNC_NAME]; | |
38 u_char quit_event[NGX_PROCESS_SYNC_NAME]; | |
39 u_char reopen_event[NGX_PROCESS_SYNC_NAME]; | |
40 | |
3016
d82993af1da0
introduce NGX_PROCESS_JUST_SPAWN and change field name accordingly
Igor Sysoev <igor@sysoev.ru>
parents:
2745
diff
changeset
|
41 unsigned just_spawn:1; |
2725 | 42 unsigned exiting:1; |
43 } ngx_process_t; | |
44 | |
45 | |
46 typedef struct { | |
47 char *path; | |
48 char *name; | |
2745
1983932b8075
pass command lines options to workers
Igor Sysoev <igor@sysoev.ru>
parents:
2725
diff
changeset
|
49 char *args; |
2725 | 50 char *const *argv; |
51 char *const *envp; | |
52 HANDLE child; | |
278
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
36
diff
changeset
|
53 } ngx_exec_ctx_t; |
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
36
diff
changeset
|
54 |
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
36
diff
changeset
|
55 |
2725 | 56 ngx_pid_t ngx_spawn_process(ngx_cycle_t *cycle, char *name, ngx_int_t respawn); |
279
b79f021a644a
nginx-0.0.2-2004-03-04-19:34:23 import
Igor Sysoev <igor@sysoev.ru>
parents:
278
diff
changeset
|
57 ngx_pid_t ngx_execute(ngx_cycle_t *cycle, ngx_exec_ctx_t *ctx); |
278
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
36
diff
changeset
|
58 |
461 | 59 #define ngx_debug_point() |
3852
3f04918aefe5
use SwitchToThread() instead of Sleep(0), because the later
Igor Sysoev <igor@sysoev.ru>
parents:
3358
diff
changeset
|
60 #define ngx_sched_yield() SwitchToThread() |
2725 | 61 |
62 | |
63 #define NGX_MAX_PROCESSES (MAXIMUM_WAIT_OBJECTS - 4) | |
64 | |
65 #define NGX_PROCESS_RESPAWN -2 | |
66 #define NGX_PROCESS_JUST_RESPAWN -3 | |
373
018569a8f09c
nginx-0.0.7-2004-06-30-19:30:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
279
diff
changeset
|
67 |
018569a8f09c
nginx-0.0.7-2004-06-30-19:30:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
279
diff
changeset
|
68 |
2725 | 69 extern int ngx_argc; |
70 extern char **ngx_argv; | |
71 extern char **ngx_os_argv; | |
278
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
36
diff
changeset
|
72 |
2725 | 73 extern ngx_int_t ngx_last_process; |
74 extern ngx_process_t ngx_processes[NGX_MAX_PROCESSES]; | |
75 | |
76 extern ngx_pid_t ngx_pid; | |
7162
8b84d60ef13d
Fixed "changing binary" when reaper is not init.
Ruslan Ermilov <ru@nginx.com>
parents:
6402
diff
changeset
|
77 extern ngx_pid_t ngx_parent; |
36
c14d7232b11f
nginx-0.0.1-2002-12-23-09:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
78 |
c14d7232b11f
nginx-0.0.1-2002-12-23-09:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
79 |
c14d7232b11f
nginx-0.0.1-2002-12-23-09:29:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
80 #endif /* _NGX_PROCESS_H_INCLUDED_ */ |