aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/tcp_var.h
diff options
context:
space:
mode:
authorRandall Stewart <rrs@FreeBSD.org>2020-04-27 16:30:29 +0000
committerRandall Stewart <rrs@FreeBSD.org>2020-04-27 16:30:29 +0000
commite570d231f48957dcf0757b7b716330f3bd64e362 (patch)
tree656f9afb5ab7ad2d281532fd69fb85579c1746a8 /sys/netinet/tcp_var.h
parentbea2668321d9897e36e8327162e693bda6cec308 (diff)
downloadsrc-e570d231f48957dcf0757b7b716330f3bd64e362.tar.gz
src-e570d231f48957dcf0757b7b716330f3bd64e362.zip
This change does a small prepratory step in getting the
latest rack and bbr in from the NF repo. When those come in the OOB data handling will be fixed where Skyzaller crashes. Differential Revision: https://reviews.freebsd.org/D24575
Notes
Notes: svn path=/head/; revision=360385
Diffstat (limited to 'sys/netinet/tcp_var.h')
-rw-r--r--sys/netinet/tcp_var.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h
index 10b1b6586dfd..261ed3f56122 100644
--- a/sys/netinet/tcp_var.h
+++ b/sys/netinet/tcp_var.h
@@ -43,6 +43,41 @@
#include <sys/mbuf.h>
#endif
+#define TCP_END_BYTE_INFO 8 /* Bytes that makeup the "end information array" */
+/* Types of ending byte info */
+#define TCP_EI_EMPTY_SLOT 0
+#define TCP_EI_STATUS_CLIENT_FIN 0x1
+#define TCP_EI_STATUS_CLIENT_RST 0x2
+#define TCP_EI_STATUS_SERVER_FIN 0x3
+#define TCP_EI_STATUS_SERVER_RST 0x4
+#define TCP_EI_STATUS_RETRAN 0x5
+#define TCP_EI_STATUS_PROGRESS 0x6
+#define TCP_EI_STATUS_PERSIST_MAX 0x7
+#define TCP_EI_STATUS_KEEP_MAX 0x8
+#define TCP_EI_STATUS_DATA_A_CLOSE 0x9
+#define TCP_EI_STATUS_RST_IN_FRONT 0xa
+#define TCP_EI_STATUS_2MSL 0xb
+#define TCP_EI_STATUS_MAX_VALUE 0xb
+
+/************************************************/
+/* Status bits we track to assure no duplicates,
+ * the bits here are not used by the code but
+ * for human representation. To check a bit we
+ * take and shift over by 1 minus the value (1-8).
+ */
+/************************************************/
+#define TCP_EI_BITS_CLIENT_FIN 0x001
+#define TCP_EI_BITS_CLIENT_RST 0x002
+#define TCP_EI_BITS_SERVER_FIN 0x004
+#define TCP_EI_BITS_SERVER_RST 0x008
+#define TCP_EI_BITS_RETRAN 0x010
+#define TCP_EI_BITS_PROGRESS 0x020
+#define TCP_EI_BITS_PRESIST_MAX 0x040
+#define TCP_EI_BITS_KEEP_MAX 0x080
+#define TCP_EI_BITS_DATA_A_CLO 0x100
+#define TCP_EI_BITS_RST_IN_FR 0x200 /* a front state reset */
+#define TCP_EI_BITS_2MS_TIMER 0x400 /* 2 MSL timer expired */
+
#if defined(_KERNEL) || defined(_WANT_TCPCB)
/* TCP segment queue entry */
struct tseg_qent {
@@ -219,11 +254,16 @@ struct tcpcb {
tcp_seq gput_ack; /* Inbound measurement ack */
int32_t t_stats_gput_prev; /* XXXLAS: Prev gput measurement */
uint8_t t_tfo_client_cookie_len; /* TCP Fast Open client cookie length */
+ uint32_t t_end_info_status; /* Status flag of end info */
unsigned int *t_tfo_pending; /* TCP Fast Open server pending counter */
union {
uint8_t client[TCP_FASTOPEN_MAX_COOKIE_LEN];
uint64_t server;
} t_tfo_cookie; /* TCP Fast Open cookie to send */
+ union {
+ uint8_t t_end_info_bytes[TCP_END_BYTE_INFO];
+ uint64_t t_end_info;
+ };
#ifdef TCPPCAP
struct mbufq t_inpkts; /* List of saved input packets. */
struct mbufq t_outpkts; /* List of saved output packets. */
@@ -1010,6 +1050,7 @@ struct mbuf *
int32_t seglimit, int32_t segsize, struct sockbuf *sb, bool hw_tls);
int tcp_stats_init(void);
+void tcp_log_end_status(struct tcpcb *tp, uint8_t status);
static inline void
tcp_fields_to_host(struct tcphdr *th)