1 # Copyright 2018 Netflix, Inc.
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 # from include/net/tcp_states.h:
17 tcpstate[1] = 'ESTABLISHED'
18 tcpstate[2] = 'SYN_SENT'
19 tcpstate[3] = 'SYN_RECV'
20 tcpstate[4] = 'FIN_WAIT1'
21 tcpstate[5] = 'FIN_WAIT2'
22 tcpstate[6] = 'TIME_WAIT'
24 tcpstate[8] = 'CLOSE_WAIT'
25 tcpstate[9] = 'LAST_ACK'
26 tcpstate[10] = 'LISTEN'
27 tcpstate[11] = 'CLOSING'
28 tcpstate[12] = 'NEW_SYN_RECV'
30 # from include/net/tcp.h:
42 if flags & TCPHDR_FIN:
44 if flags & TCPHDR_SYN:
46 if flags & TCPHDR_RST:
48 if flags & TCPHDR_PSH:
50 if flags & TCPHDR_ACK:
52 if flags & TCPHDR_URG:
54 if flags & TCPHDR_ECE:
56 if flags & TCPHDR_CWR: