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

Go to the source code of this file.

Macros

#define SEQ_LT(a, b)   ((int)((a)-(b)) < 0)
 
#define SEQ_LEQ(a, b)   ((int)((a)-(b)) <= 0)
 
#define SEQ_GT(a, b)   ((int)((a)-(b)) > 0)
 
#define SEQ_GEQ(a, b)   ((int)((a)-(b)) >= 0)
 
#define SEQ_MIN(a, b)   ((SEQ_LT(a, b)) ? (a) : (b))
 
#define SEQ_MAX(a, b)   ((SEQ_GT(a, b)) ? (a) : (b))
 
#define WIN_LT(a, b)   (ntohs(a) < ntohs(b))
 
#define WIN_LEQ(a, b)   (ntohs(a) <= ntohs(b))
 
#define WIN_GT(a, b)   (ntohs(a) > ntohs(b))
 
#define WIN_GEQ(a, b)   (ntohs(a) >= ntohs(b))
 
#define WIN_MIN(a, b)   ((WIN_LT(a, b)) ? (a) : (b))
 
#define WIN_MAX(a, b)   ((WIN_GT(a, b)) ? (a) : (b))
 
#define TSTMP_LT(a, b)   ((int)((a)-(b)) < 0)
 
#define TSTMP_GT(a, b)   ((int)((a)-(b)) > 0)
 
#define TSTMP_GEQ(a, b)   ((int)((a)-(b)) >= 0)
 
#define tcp_rcvseqinit(tp)    (tp)->rcv_adv = (tp)->rcv_nxt = (tp)->irs + 1
 
#define tcp_sendseqinit(tp)
 
#define TCP_TS_TO_TICKS(_t)   ((_t) * hz / 1000)
 
#define TCP_PAWS_IDLE   (24 * 24 * 60 * 60 * 1000)
 

Functions

static __inline uint32_t tcp_ts_getticks (void)
 

Macro Definition Documentation

◆ SEQ_GEQ

#define SEQ_GEQ (   a,
 
)    ((int)((a)-(b)) >= 0)

Definition at line 45 of file tcp_seq.h.

◆ SEQ_GT

#define SEQ_GT (   a,
 
)    ((int)((a)-(b)) > 0)

Definition at line 44 of file tcp_seq.h.

◆ SEQ_LEQ

#define SEQ_LEQ (   a,
 
)    ((int)((a)-(b)) <= 0)

Definition at line 43 of file tcp_seq.h.

◆ SEQ_LT

#define SEQ_LT (   a,
 
)    ((int)((a)-(b)) < 0)

Definition at line 42 of file tcp_seq.h.

◆ SEQ_MAX

#define SEQ_MAX (   a,
 
)    ((SEQ_GT(a, b)) ? (a) : (b))

Definition at line 48 of file tcp_seq.h.

◆ SEQ_MIN

#define SEQ_MIN (   a,
 
)    ((SEQ_LT(a, b)) ? (a) : (b))

Definition at line 47 of file tcp_seq.h.

◆ TCP_PAWS_IDLE

#define TCP_PAWS_IDLE   (24 * 24 * 60 * 60 * 1000)

Definition at line 82 of file tcp_seq.h.

◆ tcp_rcvseqinit

#define tcp_rcvseqinit (   tp)     (tp)->rcv_adv = (tp)->rcv_nxt = (tp)->irs + 1

Definition at line 68 of file tcp_seq.h.

◆ tcp_sendseqinit

#define tcp_sendseqinit (   tp)
Value:
(tp)->snd_una = (tp)->snd_nxt = (tp)->snd_max = (tp)->snd_up = \
(tp)->snd_recover = (tp)->iss

Definition at line 71 of file tcp_seq.h.

◆ TCP_TS_TO_TICKS

#define TCP_TS_TO_TICKS (   _t)    ((_t) * hz / 1000)

Definition at line 79 of file tcp_seq.h.

◆ TSTMP_GEQ

#define TSTMP_GEQ (   a,
 
)    ((int)((a)-(b)) >= 0)

Definition at line 61 of file tcp_seq.h.

◆ TSTMP_GT

#define TSTMP_GT (   a,
 
)    ((int)((a)-(b)) > 0)

Definition at line 60 of file tcp_seq.h.

◆ TSTMP_LT

#define TSTMP_LT (   a,
 
)    ((int)((a)-(b)) < 0)

Definition at line 59 of file tcp_seq.h.

◆ WIN_GEQ

#define WIN_GEQ (   a,
 
)    (ntohs(a) >= ntohs(b))

Definition at line 53 of file tcp_seq.h.

◆ WIN_GT

#define WIN_GT (   a,
 
)    (ntohs(a) > ntohs(b))

Definition at line 52 of file tcp_seq.h.

◆ WIN_LEQ

#define WIN_LEQ (   a,
 
)    (ntohs(a) <= ntohs(b))

Definition at line 51 of file tcp_seq.h.

◆ WIN_LT

#define WIN_LT (   a,
 
)    (ntohs(a) < ntohs(b))

Definition at line 50 of file tcp_seq.h.

◆ WIN_MAX

#define WIN_MAX (   a,
 
)    ((WIN_GT(a, b)) ? (a) : (b))

Definition at line 56 of file tcp_seq.h.

◆ WIN_MIN

#define WIN_MIN (   a,
 
)    ((WIN_LT(a, b)) ? (a) : (b))

Definition at line 55 of file tcp_seq.h.

Function Documentation

◆ tcp_ts_getticks()