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

Go to the source code of this file.

Macros

#define TCP_NSTATES   11
 
#define TCPS_CLOSED   0 /* closed */
 
#define TCPS_LISTEN   1 /* listening for connection */
 
#define TCPS_SYN_SENT   2 /* active, have sent syn */
 
#define TCPS_SYN_RECEIVED   3 /* have sent and received syn */
 
#define TCPS_ESTABLISHED   4 /* established */
 
#define TCPS_CLOSE_WAIT   5 /* rcvd fin, waiting for close */
 
#define TCPS_FIN_WAIT_1   6 /* have closed, sent fin */
 
#define TCPS_CLOSING   7 /* closed xchd FIN; await FIN ACK */
 
#define TCPS_LAST_ACK   8 /* had fin and close; await FIN ACK */
 
#define TCPS_FIN_WAIT_2   9 /* have closed, fin is acked */
 
#define TCPS_TIME_WAIT   10 /* in 2*msl quiet wait after close */
 
#define TCPS_HAVERCVDSYN(s)   ((s) >= TCPS_SYN_RECEIVED)
 
#define TCPS_HAVEESTABLISHED(s)   ((s) >= TCPS_ESTABLISHED)
 
#define TCPS_HAVERCVDFIN(s)    ((s) == TCPS_CLOSE_WAIT || ((s) >= TCPS_CLOSING && (s) != TCPS_FIN_WAIT_2))
 

Macro Definition Documentation

◆ TCP_NSTATES

#define TCP_NSTATES   11

Definition at line 45 of file tcp_fsm.h.

◆ TCPS_CLOSE_WAIT

#define TCPS_CLOSE_WAIT   5 /* rcvd fin, waiting for close */

Definition at line 53 of file tcp_fsm.h.

◆ TCPS_CLOSED

#define TCPS_CLOSED   0 /* closed */

Definition at line 47 of file tcp_fsm.h.

◆ TCPS_CLOSING

#define TCPS_CLOSING   7 /* closed xchd FIN; await FIN ACK */

Definition at line 56 of file tcp_fsm.h.

◆ TCPS_ESTABLISHED

#define TCPS_ESTABLISHED   4 /* established */

Definition at line 52 of file tcp_fsm.h.

◆ TCPS_FIN_WAIT_1

#define TCPS_FIN_WAIT_1   6 /* have closed, sent fin */

Definition at line 55 of file tcp_fsm.h.

◆ TCPS_FIN_WAIT_2

#define TCPS_FIN_WAIT_2   9 /* have closed, fin is acked */

Definition at line 59 of file tcp_fsm.h.

◆ TCPS_HAVEESTABLISHED

#define TCPS_HAVEESTABLISHED (   s)    ((s) >= TCPS_ESTABLISHED)

Definition at line 63 of file tcp_fsm.h.

◆ TCPS_HAVERCVDFIN

#define TCPS_HAVERCVDFIN (   s)     ((s) == TCPS_CLOSE_WAIT || ((s) >= TCPS_CLOSING && (s) != TCPS_FIN_WAIT_2))

Definition at line 64 of file tcp_fsm.h.

◆ TCPS_HAVERCVDSYN

#define TCPS_HAVERCVDSYN (   s)    ((s) >= TCPS_SYN_RECEIVED)

Definition at line 62 of file tcp_fsm.h.

◆ TCPS_LAST_ACK

#define TCPS_LAST_ACK   8 /* had fin and close; await FIN ACK */

Definition at line 57 of file tcp_fsm.h.

◆ TCPS_LISTEN

#define TCPS_LISTEN   1 /* listening for connection */

Definition at line 48 of file tcp_fsm.h.

◆ TCPS_SYN_RECEIVED

#define TCPS_SYN_RECEIVED   3 /* have sent and received syn */

Definition at line 50 of file tcp_fsm.h.

◆ TCPS_SYN_SENT

#define TCPS_SYN_SENT   2 /* active, have sent syn */

Definition at line 49 of file tcp_fsm.h.

◆ TCPS_TIME_WAIT

#define TCPS_TIME_WAIT   10 /* in 2*msl quiet wait after close */

Definition at line 60 of file tcp_fsm.h.