Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*
0003  * INET     An implementation of the TCP/IP protocol suite for the LINUX
0004  *      operating system.  INET is implemented using the  BSD Socket
0005  *      interface as the means of communication with the user level.
0006  *
0007  *      Definitions for the TCP protocol sk_state field.
0008  */
0009 #ifndef _LINUX_TCP_STATES_H
0010 #define _LINUX_TCP_STATES_H
0011 
0012 enum {
0013     TCP_ESTABLISHED = 1,
0014     TCP_SYN_SENT,
0015     TCP_SYN_RECV,
0016     TCP_FIN_WAIT1,
0017     TCP_FIN_WAIT2,
0018     TCP_TIME_WAIT,
0019     TCP_CLOSE,
0020     TCP_CLOSE_WAIT,
0021     TCP_LAST_ACK,
0022     TCP_LISTEN,
0023     TCP_CLOSING,    /* Now a valid state */
0024     TCP_NEW_SYN_RECV,
0025 
0026     TCP_MAX_STATES  /* Leave at the end! */
0027 };
0028 
0029 #define TCP_STATE_MASK  0xF
0030 
0031 #define TCP_ACTION_FIN  (1 << TCP_CLOSE)
0032 
0033 enum {
0034     TCPF_ESTABLISHED = (1 << TCP_ESTABLISHED),
0035     TCPF_SYN_SENT    = (1 << TCP_SYN_SENT),
0036     TCPF_SYN_RECV    = (1 << TCP_SYN_RECV),
0037     TCPF_FIN_WAIT1   = (1 << TCP_FIN_WAIT1),
0038     TCPF_FIN_WAIT2   = (1 << TCP_FIN_WAIT2),
0039     TCPF_TIME_WAIT   = (1 << TCP_TIME_WAIT),
0040     TCPF_CLOSE   = (1 << TCP_CLOSE),
0041     TCPF_CLOSE_WAIT  = (1 << TCP_CLOSE_WAIT),
0042     TCPF_LAST_ACK    = (1 << TCP_LAST_ACK),
0043     TCPF_LISTEN  = (1 << TCP_LISTEN),
0044     TCPF_CLOSING     = (1 << TCP_CLOSING),
0045     TCPF_NEW_SYN_RECV = (1 << TCP_NEW_SYN_RECV),
0046 };
0047 
0048 #endif  /* _LINUX_TCP_STATES_H */