Changeset View
Changeset View
Standalone View
Standalone View
head/sys/netinet/tcp.h
Show First 20 Lines • Show All 95 Lines • ▼ Show 20 Lines | |||||
#define TCPOLEN_SACK 8 /* 2*sizeof(tcp_seq) */ | #define TCPOLEN_SACK 8 /* 2*sizeof(tcp_seq) */ | ||||
#define TCPOPT_TIMESTAMP 8 | #define TCPOPT_TIMESTAMP 8 | ||||
#define TCPOLEN_TIMESTAMP 10 | #define TCPOLEN_TIMESTAMP 10 | ||||
#define TCPOLEN_TSTAMP_APPA (TCPOLEN_TIMESTAMP+2) /* appendix A */ | #define TCPOLEN_TSTAMP_APPA (TCPOLEN_TIMESTAMP+2) /* appendix A */ | ||||
#define TCPOPT_SIGNATURE 19 /* Keyed MD5: RFC 2385 */ | #define TCPOPT_SIGNATURE 19 /* Keyed MD5: RFC 2385 */ | ||||
#define TCPOLEN_SIGNATURE 18 | #define TCPOLEN_SIGNATURE 18 | ||||
#define TCPOPT_FAST_OPEN 34 | #define TCPOPT_FAST_OPEN 34 | ||||
#define TCPOLEN_FAST_OPEN_EMPTY 2 | #define TCPOLEN_FAST_OPEN_EMPTY 2 | ||||
#define TCPOLEN_FAST_OPEN_MIN 6 | |||||
#define TCPOLEN_FAST_OPEN_MAX 18 | |||||
/* Miscellaneous constants */ | /* Miscellaneous constants */ | ||||
#define MAX_SACK_BLKS 6 /* Max # SACK blocks stored at receiver side */ | #define MAX_SACK_BLKS 6 /* Max # SACK blocks stored at receiver side */ | ||||
#define TCP_MAX_SACK 4 /* MAX # SACKs sent in any segment */ | #define TCP_MAX_SACK 4 /* MAX # SACKs sent in any segment */ | ||||
/* | /* | ||||
* The default maximum segment size (MSS) to be used for new TCP connections | * The default maximum segment size (MSS) to be used for new TCP connections | ||||
Show All 33 Lines | |||||
#define TCP_MAX_WINSHIFT 14 /* maximum window shift */ | #define TCP_MAX_WINSHIFT 14 /* maximum window shift */ | ||||
#define TCP_MAXBURST 4 /* maximum segments in a burst */ | #define TCP_MAXBURST 4 /* maximum segments in a burst */ | ||||
#define TCP_MAXHLEN (0xf<<2) /* max length of header in bytes */ | #define TCP_MAXHLEN (0xf<<2) /* max length of header in bytes */ | ||||
#define TCP_MAXOLEN (TCP_MAXHLEN - sizeof(struct tcphdr)) | #define TCP_MAXOLEN (TCP_MAXHLEN - sizeof(struct tcphdr)) | ||||
/* max space left for options */ | /* max space left for options */ | ||||
#define TCP_FASTOPEN_MIN_COOKIE_LEN 4 /* Per RFC7413 */ | |||||
#define TCP_FASTOPEN_MAX_COOKIE_LEN 16 /* Per RFC7413 */ | |||||
#define TCP_FASTOPEN_PSK_LEN 16 /* Same as TCP_FASTOPEN_KEY_LEN */ | |||||
#endif /* __BSD_VISIBLE */ | #endif /* __BSD_VISIBLE */ | ||||
/* | /* | ||||
* User-settable options (used with setsockopt). These are discrete | * User-settable options (used with setsockopt). These are discrete | ||||
* values and are not masked together. Some values appear to be | * values and are not masked together. Some values appear to be | ||||
* bitmasks for historical reasons. | * bitmasks for historical reasons. | ||||
*/ | */ | ||||
#define TCP_NODELAY 1 /* don't delay send to coalesce packets */ | #define TCP_NODELAY 1 /* don't delay send to coalesce packets */ | ||||
▲ Show 20 Lines • Show All 83 Lines • ▼ Show 20 Lines | struct tcp_info { | ||||
u_int32_t tcpi_rcv_nxt; /* Next ingress seqno */ | u_int32_t tcpi_rcv_nxt; /* Next ingress seqno */ | ||||
u_int32_t tcpi_toe_tid; /* HWTID for TOE endpoints */ | u_int32_t tcpi_toe_tid; /* HWTID for TOE endpoints */ | ||||
u_int32_t tcpi_snd_rexmitpack; /* Retransmitted packets */ | u_int32_t tcpi_snd_rexmitpack; /* Retransmitted packets */ | ||||
u_int32_t tcpi_rcv_ooopack; /* Out-of-order packets */ | u_int32_t tcpi_rcv_ooopack; /* Out-of-order packets */ | ||||
u_int32_t tcpi_snd_zerowin; /* Zero-sized windows sent */ | u_int32_t tcpi_snd_zerowin; /* Zero-sized windows sent */ | ||||
/* Padding to grow without breaking ABI. */ | /* Padding to grow without breaking ABI. */ | ||||
u_int32_t __tcpi_pad[26]; /* Padding. */ | u_int32_t __tcpi_pad[26]; /* Padding. */ | ||||
}; | |||||
/* | |||||
* If this structure is provided when setting the TCP_FASTOPEN socket | |||||
* option, and the enable member is non-zero, a subsequent connect will use | |||||
* pre-shared key (PSK) mode using the provided key. | |||||
*/ | |||||
struct tcp_fastopen { | |||||
int enable; | |||||
uint8_t psk[TCP_FASTOPEN_PSK_LEN]; | |||||
}; | }; | ||||
#endif | #endif | ||||
#define TCP_FUNCTION_NAME_LEN_MAX 32 | #define TCP_FUNCTION_NAME_LEN_MAX 32 | ||||
struct tcp_function_set { | struct tcp_function_set { | ||||
char function_set_name[TCP_FUNCTION_NAME_LEN_MAX]; | char function_set_name[TCP_FUNCTION_NAME_LEN_MAX]; | ||||
uint32_t pcbcnt; | uint32_t pcbcnt; | ||||
}; | }; | ||||
#endif /* !_NETINET_TCP_H_ */ | #endif /* !_NETINET_TCP_H_ */ |