summaryrefslogtreecommitdiff
path: root/src/quic_entry.h
diff options
context:
space:
mode:
author李佳 <[email protected]>2024-07-10 06:58:33 +0000
committerlijia <[email protected]>2024-07-11 11:23:10 +0800
commit4782225f29b6f80ee023297d0a0726c6c798e3d7 (patch)
tree35e385984c8312daf1de3f479af5523928626f54 /src/quic_entry.h
Initial commitv1.0.1
Diffstat (limited to 'src/quic_entry.h')
-rw-r--r--src/quic_entry.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/src/quic_entry.h b/src/quic_entry.h
new file mode 100644
index 0000000..478b2d9
--- /dev/null
+++ b/src/quic_entry.h
@@ -0,0 +1,58 @@
+#pragma once
+
+#include "quic_decoder.h"
+#include <bits/types/struct_iovec.h>
+typedef struct iovec qstring;
+
+#ifndef MIN
+#define MIN(a, b) (((a) < (b)) ? (a) : (b))
+#endif
+
+#define FALSE 0x00
+#define TRUE 0x01
+#define MAYBE 0x02
+
+#define QUIC_VERSION_STRING_MAX_SIZE (32)
+
+#define SUPPORT_QUIC_PORT_NUM 128
+
+#define QUIC_HALF_CLOSE 0x01
+#define QUIC_WHOLE_CLOSE 0x02
+#define QUIC_DATA 0x03
+#define QUIC_KEY 1
+#define QUIC_RETURN_NORM 0x60
+#define QUIC_RETURN_UNNORM 0x61
+#define QUIC_RETURN_RESET_BUFFER 0x62
+#define QUIC_RETURN_DROPME 0x63
+#define MAX_REGION_NUM 15
+#define REGION_NAME_LEN 32
+
+struct quic_param
+{
+ struct stellar *st;
+ int quic_plugid;
+ int level;
+ int quic_port_num;
+ int decrypted_switch;
+ // int max_parse_pkt_num;
+ int max_chlo_size;
+ // int context_bridge_id;
+ int exdata_id;
+ int udp_topic_id; //as subscriber
+ int quic_topic_id; //as publisher
+ unsigned short quic_port_list[SUPPORT_QUIC_PORT_NUM]; //network order
+ char quic_conf_regionname[MAX_REGION_NUM][REGION_NAME_LEN];
+ char log_path[128];
+ void *logger;
+};
+
+enum quic_mes_type{
+ VER_NEGO = 0, //vertion negotiation packet
+ PUB_RST, //public reset packet
+ FRAME, //frame packet
+ FEC, //FEC packet
+ Initial, //iquic
+ Retey, //iquic
+ Handshake, //iquic
+ MSG_UNKNOWN = 255
+};