]> git.kaiwu.me - nginx.git/commitdiff
QUIC: ngx_quic_module.
authorVladimir Homutov <vl@nginx.com>
Fri, 25 Dec 2020 11:18:51 +0000 (14:18 +0300)
committerVladimir Homutov <vl@nginx.com>
Fri, 25 Dec 2020 11:18:51 +0000 (14:18 +0300)
auto/modules
src/event/quic/ngx_event_quic.c

index 82a887eb1411e737ec2cbbc86ccc2a75c8d39408..299e245eff864266217e2985f35d95fff233f718 100644 (file)
@@ -1325,16 +1325,24 @@ if [ $USE_OPENSSL = YES ]; then
     ngx_module_link=YES
     ngx_module_order=
 
-    if [ $USE_OPENSSL_QUIC = YES ]; then
-        ngx_module_deps="$ngx_module_deps \
-                         src/event/quic/ngx_event_quic.h \
-                         src/event/quic/ngx_event_quic_transport.h \
-                         src/event/quic/ngx_event_quic_protection.h"
-        ngx_module_srcs="$ngx_module_srcs \
-                         src/event/quic/ngx_event_quic.c \
-                         src/event/quic/ngx_event_quic_transport.c \
-                         src/event/quic/ngx_event_quic_protection.c"
-    fi
+    . auto/module
+fi
+
+
+if [ $USE_OPENSSL$USE_OPENSSL_QUIC = YESYES ]; then
+    ngx_module_type=CORE
+    ngx_module_name=ngx_quic_module
+    ngx_module_incs=
+    ngx_module_deps="src/event/quic/ngx_event_quic.h \
+                     src/event/quic/ngx_event_quic_transport.h \
+                     src/event/quic/ngx_event_quic_protection.h"
+    ngx_module_srcs="src/event/quic/ngx_event_quic.c \
+                     src/event/quic/ngx_event_quic_transport.c \
+                     src/event/quic/ngx_event_quic_protection.c"
+
+    ngx_module_libs=
+    ngx_module_link=YES
+    ngx_module_order=
 
     . auto/module
 fi
index 73cde84d5ad4a3c886bd90ec211ab716e5777580..9047f25a34d1bf4d20906165d0464311f0829aa0 100644 (file)
@@ -385,6 +385,29 @@ static ngx_chain_t *ngx_quic_split_bufs(ngx_connection_t *c, ngx_chain_t *in,
     size_t len);
 
 
+static ngx_core_module_t  ngx_quic_module_ctx = {
+    ngx_string("quic"),
+    NULL,
+    NULL
+};
+
+
+ngx_module_t  ngx_quic_module = {
+    NGX_MODULE_V1,
+    &ngx_quic_module_ctx,                  /* module context */
+    NULL,                                  /* module directives */
+    NGX_CORE_MODULE,                       /* module type */
+    NULL,                                  /* init master */
+    NULL,                                  /* init module */
+    NULL,                                  /* init process */
+    NULL,                                  /* init thread */
+    NULL,                                  /* exit thread */
+    NULL,                                  /* exit process */
+    NULL,                                  /* exit master */
+    NGX_MODULE_V1_PADDING
+};
+
+
 static SSL_QUIC_METHOD quic_method = {
 #if BORINGSSL_API_VERSION >= 10
     ngx_quic_set_read_secret,