1 /* SPDX-License-Identifier: GPL-2.0 */ 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* Copyright (c) 2023 Meta Platforms, Inc. and 2 /* Copyright (c) 2023 Meta Platforms, Inc. and affiliates. */ 3 3 4 /* Define states of a socket to tracking messa 4 /* Define states of a socket to tracking messages sending to and from the 5 * socket. 5 * socket. 6 * 6 * 7 * These states are based on rfc9293 with some 7 * These states are based on rfc9293 with some modifications to support 8 * tracking of messages sent out from a socket 8 * tracking of messages sent out from a socket. For example, when a SYN is 9 * received, a new socket is transiting to the 9 * received, a new socket is transiting to the SYN_RECV state defined in 10 * rfc9293. But, we put it in SYN_RECV_SENDING 10 * rfc9293. But, we put it in SYN_RECV_SENDING_SYN_ACK state and when 11 * SYN-ACK is sent out, it moves to SYN_RECV s 11 * SYN-ACK is sent out, it moves to SYN_RECV state. With this modification, 12 * we can track the message sent out from a so 12 * we can track the message sent out from a socket. 13 */ 13 */ 14 14 15 #ifndef __CGROUP_TCP_SKB_H__ 15 #ifndef __CGROUP_TCP_SKB_H__ 16 #define __CGROUP_TCP_SKB_H__ 16 #define __CGROUP_TCP_SKB_H__ 17 17 18 enum { 18 enum { 19 INIT, 19 INIT, 20 CLOSED, 20 CLOSED, 21 SYN_SENT, 21 SYN_SENT, 22 SYN_RECV_SENDING_SYN_ACK, 22 SYN_RECV_SENDING_SYN_ACK, 23 SYN_RECV, 23 SYN_RECV, 24 ESTABLISHED, 24 ESTABLISHED, 25 FIN_WAIT1, 25 FIN_WAIT1, 26 FIN_WAIT2, 26 FIN_WAIT2, 27 CLOSE_WAIT_SENDING_ACK, 27 CLOSE_WAIT_SENDING_ACK, 28 CLOSE_WAIT, 28 CLOSE_WAIT, 29 CLOSING, 29 CLOSING, 30 LAST_ACK, 30 LAST_ACK, 31 TIME_WAIT_SENDING_ACK, 31 TIME_WAIT_SENDING_ACK, 32 TIME_WAIT, 32 TIME_WAIT, 33 }; 33 }; 34 34 35 #endif /* __CGROUP_TCP_SKB_H__ */ 35 #endif /* __CGROUP_TCP_SKB_H__ */ 36 36
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.