1 #ifndef _LIBNETFILTER_CONNTRACK_TCP_H_ 2 #define _LIBNETFILTER_CONNTRACK_TCP_H_ 3 4 #ifdef __cplusplus 5 extern "C" { 6 #endif 7 8 enum tcp_state { 9 TCP_CONNTRACK_NONE, 10 TCP_CONNTRACK_SYN_SENT, 11 TCP_CONNTRACK_SYN_RECV, 12 TCP_CONNTRACK_ESTABLISHED, 13 TCP_CONNTRACK_FIN_WAIT, 14 TCP_CONNTRACK_CLOSE_WAIT, 15 TCP_CONNTRACK_LAST_ACK, 16 TCP_CONNTRACK_TIME_WAIT, 17 TCP_CONNTRACK_CLOSE, 18 TCP_CONNTRACK_LISTEN, /* obsolete */ 19 #define TCP_CONNTRACK_SYN_SENT2 TCP_CONNTRACK_LISTEN 20 TCP_CONNTRACK_MAX, 21 TCP_CONNTRACK_IGNORE 22 }; 23 24 /* WARNING: do not use these flags in your new applications, they are obsolete 25 * and we keep them here to avoid breaking backward compatibility. */ 26 enum tcp_flags { 27 TCP_ORIG_SPORT_BIT = 0, 28 TCP_ORIG_SPORT = (1 << TCP_ORIG_SPORT_BIT), 29 30 TCP_ORIG_DPORT_BIT = 1, 31 TCP_ORIG_DPORT = (1 << TCP_ORIG_DPORT_BIT), 32 33 TCP_REPL_SPORT_BIT = 2, 34 TCP_REPL_SPORT = (1 << TCP_REPL_SPORT_BIT), 35 36 TCP_REPL_DPORT_BIT = 3, 37 TCP_REPL_DPORT = (1 << TCP_REPL_DPORT_BIT), 38 39 TCP_MASK_SPORT_BIT = 4, 40 TCP_MASK_SPORT = (1 << TCP_MASK_SPORT_BIT), 41 42 TCP_MASK_DPORT_BIT = 5, 43 TCP_MASK_DPORT = (1 << TCP_MASK_DPORT_BIT), 44 45 TCP_STATE_BIT = 6, 46 TCP_STATE = (1 << TCP_STATE_BIT), 47 48 TCP_EXPTUPLE_SPORT_BIT = 7, 49 TCP_EXPTUPLE_SPORT = (1 << TCP_EXPTUPLE_SPORT_BIT), 50 51 TCP_EXPTUPLE_DPORT_BIT = 8, 52 TCP_EXPTUPLE_DPORT = (1 << TCP_EXPTUPLE_DPORT_BIT) 53 }; 54 55 #ifdef __cplusplus 56 } 57 #endif 58 59 #endif 60