FreeBSD kernel IPv4 code
tcp_log_buf.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  tcp_log_sockbuf
 
struct  tcp_log_verbose
 
struct  tcp_log_rack
 
struct  tcp_log_bbr
 
union  tcp_log_stackspecific
 
struct  tcp_log_buffer
 

Macros

#define TCP_LOG_REASON_LEN   32
 
#define TCP_LOG_TAG_LEN   32
 
#define TCP_LOG_BUF_VER   (9)
 
#define ALIGN_TCP_LOG   __aligned(8)
 
#define TCP_FUNC_LEN   32
 
#define TLB_FLAG_RXBUF   0x0001 /* Includes receive buffer info */
 
#define TLB_FLAG_TXBUF   0x0002 /* Includes send buffer info */
 
#define TLB_FLAG_HDR   0x0004 /* Includes a TCP header */
 
#define TLB_FLAG_VERBOSE   0x0008 /* Includes function/line numbers */
 
#define TLB_FLAG_STACKINFO   0x0010 /* Includes stack-specific info */
 
#define tlb_rack   tlb_stackinfo.u_rack
 
#define ERRNO_UNK   (-1)
 
#define TCP_LOG_BUF_DEFAULT_SESSION_LIMIT   5000
 
#define TCP_LOG_BUF_DEFAULT_GLOBAL_LIMIT   5000000
 
#define TCP_LOG_EVENT_VERBOSE(tp, th, rxbuf, txbuf, eventid, errornum, len, stackinfo, th_hostorder, tv)
 
#define TCP_LOG_EVENT(tp, th, rxbuf, txbuf, eventid, errornum, len, stackinfo, th_hostorder)
 
#define TCP_LOG_EVENTP(tp, th, rxbuf, txbuf, eventid, errornum, len, stackinfo, th_hostorder, tv)
 
#define tcp_log_verbose   (false)
 

Enumerations

enum  tcp_log_events {
  TCP_LOG_IN = 1 , TCP_LOG_OUT , TCP_LOG_RTO , TCP_LOG_SB_WAKE ,
  TCP_LOG_BAD_RETRAN , TCP_LOG_PRR , TCP_LOG_REORDER , TCP_LOG_HPTS ,
  BBR_LOG_BBRUPD , BBR_LOG_BBRSND , BBR_LOG_ACKCLEAR , BBR_LOG_INQUEUE ,
  BBR_LOG_TIMERSTAR , BBR_LOG_TIMERCANC , BBR_LOG_ENTREC , BBR_LOG_EXITREC ,
  BBR_LOG_CWND , BBR_LOG_BWSAMP , BBR_LOG_MSGSIZE , BBR_LOG_BBRRTT ,
  BBR_LOG_JUSTRET , BBR_LOG_STATE , BBR_LOG_PKT_EPOCH , BBR_LOG_PERSIST ,
  TCP_LOG_FLOWEND , BBR_LOG_RTO , BBR_LOG_DOSEG_DONE , BBR_LOG_EXIT_GAIN ,
  BBR_LOG_THRESH_CALC , TCP_LOG_MAPCHG , TCP_LOG_USERSEND , BBR_RSM_CLEARED ,
  BBR_LOG_STATE_TARGET , BBR_LOG_TIME_EPOCH , BBR_LOG_TO_PROCESS , BBR_LOG_BBRTSO ,
  BBR_LOG_HPTSDIAG , BBR_LOG_LOWGAIN , BBR_LOG_PROGRESS , TCP_LOG_SOCKET_OPT ,
  BBR_LOG_TIMERPREP , BBR_LOG_ENOBUF_JMP , BBR_LOG_HPTSI_CALC , BBR_LOG_RTT_SHRINKS ,
  BBR_LOG_BW_RED_EV , BBR_LOG_REDUCE , TCP_LOG_RTT , BBR_LOG_SETTINGS_CHG ,
  BBR_LOG_SRTT_GAIN_EVENT , TCP_LOG_REASS , TCP_HDWR_PACE_SIZE , BBR_LOG_HDWR_PACE ,
  BBR_LOG_TSTMP_VAL , TCP_LOG_CONNEND , TCP_LOG_LRO , TCP_SACK_FILTER_RES ,
  TCP_SAD_DETECTION , TCP_TIMELY_WORK , TCP_LOG_USER_EVENT , TCP_LOG_SENDFILE ,
  TCP_LOG_HTTP_T , TCP_LOG_ACCOUNTING , TCP_LOG_FSB , RACK_DSACK_HANDLING ,
  TCP_HYSTART , TCP_LOG_END
}
 
enum  tcp_log_states {
  TCP_LOG_STATE_CLEAR = -1 , TCP_LOG_STATE_OFF = 0 , TCP_LOG_STATE_TAIL =1 , TCP_LOG_STATE_HEAD =2 ,
  TCP_LOG_STATE_HEAD_AUTO =3 , TCP_LOG_STATE_CONTINUAL =4 , TCP_LOG_STATE_TAIL_AUTO =5
}
 

Functions

static struct tcp_log_buffertcp_log_event_ (struct tcpcb *tp, struct tcphdr *th, struct sockbuf *rxbuf, struct sockbuf *txbuf, uint8_t eventid, int errornum, uint32_t len, union tcp_log_stackspecific *stackinfo, int th_hostorder, const char *output_caller, const char *func, int line, const struct timeval *tv)
 

Variables

struct tcp_log_verbose ALIGN_TCP_LOG
 

Macro Definition Documentation

◆ ALIGN_TCP_LOG

struct tcp_log_buffer ALIGN_TCP_LOG   __aligned(8)

Definition at line 44 of file tcp_log_buf.h.

◆ ERRNO_UNK

#define ERRNO_UNK   (-1)

Definition at line 257 of file tcp_log_buf.h.

◆ TCP_FUNC_LEN

#define TCP_FUNC_LEN   32

Definition at line 57 of file tcp_log_buf.h.

◆ TCP_LOG_BUF_DEFAULT_GLOBAL_LIMIT

#define TCP_LOG_BUF_DEFAULT_GLOBAL_LIMIT   5000000

Definition at line 299 of file tcp_log_buf.h.

◆ TCP_LOG_BUF_DEFAULT_SESSION_LIMIT

#define TCP_LOG_BUF_DEFAULT_SESSION_LIMIT   5000

Definition at line 298 of file tcp_log_buf.h.

◆ TCP_LOG_BUF_VER

#define TCP_LOG_BUF_VER   (9)

Definition at line 35 of file tcp_log_buf.h.

◆ TCP_LOG_EVENT

#define TCP_LOG_EVENT (   tp,
  th,
  rxbuf,
  txbuf,
  eventid,
  errornum,
  len,
  stackinfo,
  th_hostorder 
)
Value:
do { \
TCP_LOG_EVENT_VERBOSE(tp, th, rxbuf, txbuf, \
eventid, errornum, len, stackinfo, \
th_hostorder, NULL); \
else if (tp->t_logstate != TCP_LOG_STATE_OFF) \
tcp_log_event_(tp, th, rxbuf, txbuf, eventid, \
errornum, len, stackinfo, th_hostorder, \
NULL, NULL, 0, NULL); \
} while (0)
@ TCP_LOG_STATE_OFF
Definition: tcp_log_buf.h:244

Definition at line 334 of file tcp_log_buf.h.

◆ TCP_LOG_EVENT_VERBOSE

#define TCP_LOG_EVENT_VERBOSE (   tp,
  th,
  rxbuf,
  txbuf,
  eventid,
  errornum,
  len,
  stackinfo,
  th_hostorder,
  tv 
)
Value:
do { \
if (tp->t_logstate != TCP_LOG_STATE_OFF) \
tcp_log_event_(tp, th, rxbuf, txbuf, eventid, \
errornum, len, stackinfo, th_hostorder, \
tp->t_output_caller, __func__, __LINE__, tv);\
} while (0)

Definition at line 305 of file tcp_log_buf.h.

◆ TCP_LOG_EVENTP

#define TCP_LOG_EVENTP (   tp,
  th,
  rxbuf,
  txbuf,
  eventid,
  errornum,
  len,
  stackinfo,
  th_hostorder,
  tv 
)
Value:
do { \
if (tp->t_logstate != TCP_LOG_STATE_OFF) \
tcp_log_event_(tp, th, rxbuf, txbuf, eventid, \
errornum, len, stackinfo, th_hostorder, \
NULL, NULL, 0, tv); \
} while (0)

Definition at line 346 of file tcp_log_buf.h.

◆ TCP_LOG_REASON_LEN

#define TCP_LOG_REASON_LEN   32

Definition at line 33 of file tcp_log_buf.h.

◆ TCP_LOG_TAG_LEN

#define TCP_LOG_TAG_LEN   32

Definition at line 34 of file tcp_log_buf.h.

◆ tcp_log_verbose

#define tcp_log_verbose   (false)

Definition at line 375 of file tcp_log_buf.h.

◆ TLB_FLAG_HDR

#define TLB_FLAG_HDR   0x0004 /* Includes a TCP header */

Definition at line 122 of file tcp_log_buf.h.

◆ TLB_FLAG_RXBUF

#define TLB_FLAG_RXBUF   0x0001 /* Includes receive buffer info */

Definition at line 120 of file tcp_log_buf.h.

◆ TLB_FLAG_STACKINFO

#define TLB_FLAG_STACKINFO   0x0010 /* Includes stack-specific info */

Definition at line 124 of file tcp_log_buf.h.

◆ TLB_FLAG_TXBUF

#define TLB_FLAG_TXBUF   0x0002 /* Includes send buffer info */

Definition at line 121 of file tcp_log_buf.h.

◆ TLB_FLAG_VERBOSE

#define TLB_FLAG_VERBOSE   0x0008 /* Includes function/line numbers */

Definition at line 123 of file tcp_log_buf.h.

◆ tlb_rack

#define tlb_rack   tlb_stackinfo.u_rack

Definition at line 162 of file tcp_log_buf.h.

Enumeration Type Documentation

◆ tcp_log_events

Enumerator
TC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_FSB 
RACK_DSACK_HANDLING 
TCP_HYSTART 
TCP_LOG_END 

Definition at line 173 of file tcp_log_buf.h.

◆ tcp_log_states

Enumerator
TCP_LOG_STATE_CLEAR 
TCP_LOG_STATE_OFF 
TCP_LOG_STATE_TAIL 
TCP_LOG_STATE_HEAD 
TCP_LOG_STATE_HEAD_AUTO 
TCP_LOG_STATE_CONTINUAL 
TCP_LOG_STATE_TAIL_AUTO 

Definition at line 242 of file tcp_log_buf.h.

Function Documentation

◆ tcp_log_event_()

static struct tcp_log_buffer * tcp_log_event_ ( struct tcpcb tp,
struct tcphdr *  th,
struct sockbuf *  rxbuf,
struct sockbuf *  txbuf,
uint8_t  eventid,
int  errornum,
uint32_t  len,
union tcp_log_stackspecific stackinfo,
int  th_hostorder,
const char *  output_caller,
const char *  func,
int  line,
const struct timeval *  tv 
)
inlinestatic

Definition at line 378 of file tcp_log_buf.h.

Variable Documentation

◆ ALIGN_TCP_LOG

struct tcp_log_buffer ALIGN_TCP_LOG