Changeset View
Changeset View
Standalone View
Standalone View
tcp_var.h
Context not available. | |||||
#include <sys/mbuf.h> | #include <sys/mbuf.h> | ||||
#endif | #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) | #if defined(_KERNEL) || defined(_WANT_TCPCB) | ||||
/* TCP segment queue entry */ | /* TCP segment queue entry */ | ||||
struct tseg_qent { | struct tseg_qent { | ||||
Context not available. | |||||
tcp_seq gput_ack; /* Inbound measurement ack */ | tcp_seq gput_ack; /* Inbound measurement ack */ | ||||
int32_t t_stats_gput_prev; /* XXXLAS: Prev gput measurement */ | int32_t t_stats_gput_prev; /* XXXLAS: Prev gput measurement */ | ||||
uint8_t t_tfo_client_cookie_len; /* TCP Fast Open client cookie length */ | 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 */ | unsigned int *t_tfo_pending; /* TCP Fast Open server pending counter */ | ||||
union { | union { | ||||
uint8_t client[TCP_FASTOPEN_MAX_COOKIE_LEN]; | uint8_t client[TCP_FASTOPEN_MAX_COOKIE_LEN]; | ||||
uint64_t server; | uint64_t server; | ||||
} t_tfo_cookie; /* TCP Fast Open cookie to send */ | } 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 | #ifdef TCPPCAP | ||||
struct mbufq t_inpkts; /* List of saved input packets. */ | struct mbufq t_inpkts; /* List of saved input packets. */ | ||||
struct mbufq t_outpkts; /* List of saved output packets. */ | struct mbufq t_outpkts; /* List of saved output packets. */ | ||||
Context not available. | |||||
int32_t seglimit, int32_t segsize, struct sockbuf *sb, bool hw_tls); | int32_t seglimit, int32_t segsize, struct sockbuf *sb, bool hw_tls); | ||||
int tcp_stats_init(void); | int tcp_stats_init(void); | ||||
void tcp_log_end_status(struct tcpcb *tp, uint8_t status); | |||||
static inline void | static inline void | ||||
tcp_fields_to_host(struct tcphdr *th) | tcp_fields_to_host(struct tcphdr *th) | ||||
Context not available. |