Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp.h
Show First 20 Lines • Show All 162 Lines • ▼ Show 20 Lines | |||||
*/ | */ | ||||
#define TCP_NODELAY 1 /* don't delay send to coalesce packets */ | #define TCP_NODELAY 1 /* don't delay send to coalesce packets */ | ||||
#if __BSD_VISIBLE | #if __BSD_VISIBLE | ||||
#define TCP_MAXSEG 2 /* set maximum segment size */ | #define TCP_MAXSEG 2 /* set maximum segment size */ | ||||
#define TCP_NOPUSH 4 /* don't push last block of write */ | #define TCP_NOPUSH 4 /* don't push last block of write */ | ||||
#define TCP_NOOPT 8 /* don't use TCP options */ | #define TCP_NOOPT 8 /* don't use TCP options */ | ||||
#define TCP_MD5SIG 16 /* use MD5 digests (RFC2385) */ | #define TCP_MD5SIG 16 /* use MD5 digests (RFC2385) */ | ||||
#define TCP_INFO 32 /* retrieve tcp_info structure */ | #define TCP_INFO 32 /* retrieve tcp_info structure */ | ||||
#define TCP_STATS 33 /* retrieve stats blob structure */ | |||||
#define TCP_LOG 34 /* configure event logging for connection */ | #define TCP_LOG 34 /* configure event logging for connection */ | ||||
#define TCP_LOGBUF 35 /* retrieve event log for connection */ | #define TCP_LOGBUF 35 /* retrieve event log for connection */ | ||||
#define TCP_LOGID 36 /* configure log ID to correlate connections */ | #define TCP_LOGID 36 /* configure log ID to correlate connections */ | ||||
#define TCP_LOGDUMP 37 /* dump connection log events to device */ | #define TCP_LOGDUMP 37 /* dump connection log events to device */ | ||||
#define TCP_LOGDUMPID 38 /* dump events from connections with same ID to | #define TCP_LOGDUMPID 38 /* dump events from connections with same ID to | ||||
device */ | device */ | ||||
#define TCP_TXTLS_ENABLE 39 /* TLS framing and encryption for transmit */ | #define TCP_TXTLS_ENABLE 39 /* TLS framing and encryption for transmit */ | ||||
#define TCP_TXTLS_MODE 40 /* Transmit TLS mode */ | #define TCP_TXTLS_MODE 40 /* Transmit TLS mode */ | ||||
▲ Show 20 Lines • Show All 149 Lines • ▼ Show 20 Lines | struct tcp_info { | ||||
u_int32_t tcpi_snd_nxt; /* Next egress seqno */ | u_int32_t tcpi_snd_nxt; /* Next egress seqno */ | ||||
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. */ | ||||
thj: tcpsyninfo looks to be 16 bytes to me, shouldn't this update to
__tcpi_pad[10] | |||||
Not Done Inline Actionsindeed, tcpi_pad[] is a u_int32_t (so 4 bytes), so dropping it from 26 to 22 accounts for the 16 bytes. Unless I am missing something. allanjude: indeed, tcpi_pad[] is a u_int32_t (so 4 bytes), so dropping it from 26 to 22 accounts for the… | |||||
Not Done Inline ActionsAh okay, I missed that. thj: Ah okay, I missed that. | |||||
Done Inline ActionsBut __tcpi_pad[] is u_int32_t, not a char? trasz: But __tcpi_pad[] is u_int32_t, not a char?
| |||||
Not Done Inline ActionsIs it possible to make the ABI requirement explicit? static_assert(sizeof(struct(tcp_info)) == xxx, "ABI constraint") This would prevent unwanted mistakes by later changes done by other people. donner: Is it possible to make the ABI requirement explicit?
static_assert(sizeof(struct(tcp_info))… | |||||
Done Inline ActionsThe current version of the patch doesn't modify that code, but it's not a bad idea. I've spun it off to a separate review: https://reviews.freebsd.org/D22267. trasz: The current version of the patch doesn't modify that code, but it's not a bad idea. I've spun… | |||||
}; | }; | ||||
/* | /* | ||||
* If this structure is provided when setting the TCP_FASTOPEN socket | * If this structure is provided when setting the TCP_FASTOPEN socket | ||||
* option, and the enable member is non-zero, a subsequent connect will use | * option, and the enable member is non-zero, a subsequent connect will use | ||||
* pre-shared key (PSK) mode using the provided key. | * pre-shared key (PSK) mode using the provided key. | ||||
*/ | */ | ||||
struct tcp_fastopen { | struct tcp_fastopen { | ||||
Show All 13 Lines | |||||
#define TCP_TLS_MODE_SW 1 | #define TCP_TLS_MODE_SW 1 | ||||
#define TCP_TLS_MODE_IFNET 2 | #define TCP_TLS_MODE_IFNET 2 | ||||
#define TCP_TLS_MODE_TOE 3 | #define TCP_TLS_MODE_TOE 3 | ||||
/* | /* | ||||
* TCP Control message types | * TCP Control message types | ||||
*/ | */ | ||||
#define TLS_SET_RECORD_TYPE 1 | #define TLS_SET_RECORD_TYPE 1 | ||||
/* | |||||
* TCP specific variables of interest for tp->t_stats stats(9) accounting. | |||||
*/ | |||||
#define VOI_TCP_TXPB 0 /* Transmit payload bytes */ | |||||
#define VOI_TCP_RETXPB 1 /* Retransmit payload bytes */ | |||||
#define VOI_TCP_FRWIN 2 /* Foreign receive window */ | |||||
#define VOI_TCP_LCWIN 3 /* Local congesiton window */ | |||||
#define VOI_TCP_RTT 4 /* Round trip time */ | |||||
#define VOI_TCP_CSIG 5 /* Congestion signal */ | |||||
#define VOI_TCP_GPUT 6 /* Goodput */ | |||||
#define VOI_TCP_CALCFRWINDIFF 7 /* Congestion avoidance LCWIN - FRWIN */ | |||||
#define VOI_TCP_GPUT_ND 8 /* Goodput normalised delta */ | |||||
#define VOI_TCP_ACKLEN 9 /* Average ACKed bytes per ACK */ | |||||
#endif /* !_NETINET_TCP_H_ */ | #endif /* !_NETINET_TCP_H_ */ |
tcpsyninfo looks to be 16 bytes to me, shouldn't this update to
__tcpi_pad[10]