Changeset View
Changeset View
Standalone View
Standalone View
head/sys/netinet/tcp_var.h
Show First 20 Lines • Show All 73 Lines • ▼ Show 20 Lines | struct sackhint { | ||||
int sacked_bytes; /* | int sacked_bytes; /* | ||||
* Total sacked bytes reported by the | * Total sacked bytes reported by the | ||||
* receiver via sack option | * receiver via sack option | ||||
*/ | */ | ||||
uint32_t _pad1[1]; /* TBD */ | uint32_t _pad1[1]; /* TBD */ | ||||
uint64_t _pad[1]; /* TBD */ | uint64_t _pad[1]; /* TBD */ | ||||
}; | }; | ||||
STAILQ_HEAD(tcp_log_stailq, tcp_log_mem); | |||||
/* | /* | ||||
* Tcp control block, one per tcp; fields: | * Tcp control block, one per tcp; fields: | ||||
* Organized for 16 byte cacheline efficiency. | * Organized for 16 byte cacheline efficiency. | ||||
*/ | */ | ||||
struct tcpcb { | struct tcpcb { | ||||
struct tsegqe_head t_segq; /* segment reassembly queue */ | struct tsegqe_head t_segq; /* segment reassembly queue */ | ||||
int t_segqlen; /* segment reassembly queue length */ | int t_segqlen; /* segment reassembly queue length */ | ||||
int t_dupacks; /* consecutive dup acks recd */ | int t_dupacks; /* consecutive dup acks recd */ | ||||
▲ Show 20 Lines • Show All 94 Lines • ▼ Show 20 Lines | /* SACK related state */ | ||||
u_int t_keepidle; /* time before keepalive probes begin */ | u_int t_keepidle; /* time before keepalive probes begin */ | ||||
u_int t_keepintvl; /* interval between keepalives */ | u_int t_keepintvl; /* interval between keepalives */ | ||||
u_int t_keepcnt; /* number of keepalives before close */ | u_int t_keepcnt; /* number of keepalives before close */ | ||||
u_int t_tsomax; /* TSO total burst length limit in bytes */ | u_int t_tsomax; /* TSO total burst length limit in bytes */ | ||||
u_int t_tsomaxsegcount; /* TSO maximum segment count */ | u_int t_tsomaxsegcount; /* TSO maximum segment count */ | ||||
u_int t_tsomaxsegsize; /* TSO maximum segment size in bytes */ | u_int t_tsomaxsegsize; /* TSO maximum segment size in bytes */ | ||||
u_int t_flags2; /* More tcpcb flags storage */ | u_int t_flags2; /* More tcpcb flags storage */ | ||||
int t_logstate; /* State of "black box" logging */ | |||||
struct tcp_log_stailq t_logs; /* Log buffer */ | |||||
int t_lognum; /* Number of log entries */ | |||||
uint32_t t_logsn; /* Log "serial number" */ | |||||
struct tcp_log_id_node *t_lin; | |||||
struct tcp_log_id_bucket *t_lib; | |||||
const char *t_output_caller; /* Function that called tcp_output */ | |||||
struct tcp_function_block *t_fb;/* TCP function call block */ | struct tcp_function_block *t_fb;/* TCP function call block */ | ||||
void *t_fb_ptr; /* Pointer to t_fb specific data */ | void *t_fb_ptr; /* Pointer to t_fb specific data */ | ||||
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 */ | ||||
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 */ | ||||
▲ Show 20 Lines • Show All 62 Lines • ▼ Show 20 Lines | struct tcp_function_block { | ||||
void (*tfb_tcp_timer_activate)(struct tcpcb *, | void (*tfb_tcp_timer_activate)(struct tcpcb *, | ||||
uint32_t, u_int); | uint32_t, u_int); | ||||
int (*tfb_tcp_timer_active)(struct tcpcb *, uint32_t); | int (*tfb_tcp_timer_active)(struct tcpcb *, uint32_t); | ||||
void (*tfb_tcp_timer_stop)(struct tcpcb *, uint32_t); | void (*tfb_tcp_timer_stop)(struct tcpcb *, uint32_t); | ||||
void (*tfb_tcp_rexmit_tmr)(struct tcpcb *); | void (*tfb_tcp_rexmit_tmr)(struct tcpcb *); | ||||
int (*tfb_tcp_handoff_ok)(struct tcpcb *); | int (*tfb_tcp_handoff_ok)(struct tcpcb *); | ||||
volatile uint32_t tfb_refcnt; | volatile uint32_t tfb_refcnt; | ||||
uint32_t tfb_flags; | uint32_t tfb_flags; | ||||
uint8_t tfb_id; | |||||
}; | }; | ||||
struct tcp_function { | struct tcp_function { | ||||
TAILQ_ENTRY(tcp_function) tf_next; | TAILQ_ENTRY(tcp_function) tf_next; | ||||
char tf_name[TCP_FUNCTION_NAME_LEN_MAX]; | char tf_name[TCP_FUNCTION_NAME_LEN_MAX]; | ||||
struct tcp_function_block *tf_fb; | struct tcp_function_block *tf_fb; | ||||
}; | }; | ||||
▲ Show 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | |||||
/* | /* | ||||
* Flags for the t_oobflags field. | * Flags for the t_oobflags field. | ||||
*/ | */ | ||||
#define TCPOOB_HAVEDATA 0x01 | #define TCPOOB_HAVEDATA 0x01 | ||||
#define TCPOOB_HADDATA 0x02 | #define TCPOOB_HADDATA 0x02 | ||||
/* | /* | ||||
* Flags for PLPMTU handling, t_flags2 | * Flags for the extended TCP flags field, t_flags2 | ||||
*/ | */ | ||||
#define TF2_PLPMTU_BLACKHOLE 0x00000001 /* Possible PLPMTUD Black Hole. */ | #define TF2_PLPMTU_BLACKHOLE 0x00000001 /* Possible PLPMTUD Black Hole. */ | ||||
#define TF2_PLPMTU_PMTUD 0x00000002 /* Allowed to attempt PLPMTUD. */ | #define TF2_PLPMTU_PMTUD 0x00000002 /* Allowed to attempt PLPMTUD. */ | ||||
#define TF2_PLPMTU_MAXSEGSNT 0x00000004 /* Last seg sent was full seg. */ | #define TF2_PLPMTU_MAXSEGSNT 0x00000004 /* Last seg sent was full seg. */ | ||||
#define TF2_LOG_AUTO 0x00000008 /* Session is auto-logging. */ | |||||
/* | /* | ||||
* Structure to hold TCP options that are only used during segment | * Structure to hold TCP options that are only used during segment | ||||
* processing (in tcp_input), but not held in the tcpcb. | * processing (in tcp_input), but not held in the tcpcb. | ||||
* It's basically used to reduce the number of parameters | * It's basically used to reduce the number of parameters | ||||
* to tcp_dooptions and tcp_addoptions. | * to tcp_dooptions and tcp_addoptions. | ||||
* The binary order of the to_flags is relevant for packing of the | * The binary order of the to_flags is relevant for packing of the | ||||
* options in tcp_addoptions. | * options in tcp_addoptions. | ||||
▲ Show 20 Lines • Show All 294 Lines • ▼ Show 20 Lines | |||||
* Evil hack: declare only if in_pcb.h and sys/socketvar.h have been | * Evil hack: declare only if in_pcb.h and sys/socketvar.h have been | ||||
* included. Not all of our clients do. | * included. Not all of our clients do. | ||||
*/ | */ | ||||
#if defined(_NETINET_IN_PCB_H_) && defined(_SYS_SOCKETVAR_H_) | #if defined(_NETINET_IN_PCB_H_) && defined(_SYS_SOCKETVAR_H_) | ||||
struct xtcpcb { | struct xtcpcb { | ||||
size_t xt_len; /* length of this structure */ | size_t xt_len; /* length of this structure */ | ||||
struct xinpcb xt_inp; | struct xinpcb xt_inp; | ||||
char xt_stack[TCP_FUNCTION_NAME_LEN_MAX]; /* (s) */ | char xt_stack[TCP_FUNCTION_NAME_LEN_MAX]; /* (s) */ | ||||
char xt_logid[TCP_LOG_ID_LEN]; /* (s) */ | |||||
int64_t spare64[8]; | int64_t spare64[8]; | ||||
int32_t t_state; /* (s,p) */ | int32_t t_state; /* (s,p) */ | ||||
uint32_t t_flags; /* (s,p) */ | uint32_t t_flags; /* (s,p) */ | ||||
int32_t t_sndzerowin; /* (s) */ | int32_t t_sndzerowin; /* (s) */ | ||||
int32_t t_sndrexmitpack; /* (s) */ | int32_t t_sndrexmitpack; /* (s) */ | ||||
int32_t t_rcvoopack; /* (s) */ | int32_t t_rcvoopack; /* (s) */ | ||||
int32_t t_rcvtime; /* (s) */ | int32_t t_rcvtime; /* (s) */ | ||||
int32_t tt_rexmt; /* (s) */ | int32_t tt_rexmt; /* (s) */ | ||||
int32_t tt_persist; /* (s) */ | int32_t tt_persist; /* (s) */ | ||||
int32_t tt_keep; /* (s) */ | int32_t tt_keep; /* (s) */ | ||||
int32_t tt_2msl; /* (s) */ | int32_t tt_2msl; /* (s) */ | ||||
int32_t tt_delack; /* (s) */ | int32_t tt_delack; /* (s) */ | ||||
int32_t t_logstate; /* (3) */ | |||||
int32_t spare32[32]; | int32_t spare32[32]; | ||||
} __aligned(8); | } __aligned(8); | ||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
void tcp_inptoxtp(const struct inpcb *, struct xtcpcb *); | void tcp_inptoxtp(const struct inpcb *, struct xtcpcb *); | ||||
#endif | #endif | ||||
#endif | #endif | ||||
/* | |||||
* TCP function name-to-id mapping exported to user-land via sysctl(3). | |||||
*/ | |||||
struct tcp_function_id { | |||||
uint8_t tfi_id; | |||||
char tfi_name[TCP_FUNCTION_NAME_LEN_MAX]; | |||||
}; | |||||
/* | /* | ||||
* Identifiers for TCP sysctl nodes | * Identifiers for TCP sysctl nodes | ||||
*/ | */ | ||||
#define TCPCTL_DO_RFC1323 1 /* use RFC-1323 extensions */ | #define TCPCTL_DO_RFC1323 1 /* use RFC-1323 extensions */ | ||||
#define TCPCTL_MSSDFLT 3 /* MSS default */ | #define TCPCTL_MSSDFLT 3 /* MSS default */ | ||||
#define TCPCTL_STATS 4 /* statistics */ | #define TCPCTL_STATS 4 /* statistics */ | ||||
#define TCPCTL_RTTDFLT 5 /* default RTT estimate */ | #define TCPCTL_RTTDFLT 5 /* default RTT estimate */ | ||||
▲ Show 20 Lines • Show All 230 Lines • Show Last 20 Lines |