1 #ifndef _NF_CONNTRACK_TUPLE_COMMON_H 2 #define _NF_CONNTRACK_TUPLE_COMMON_H 3 4 #include <linux/types.h> 5 #include <linux/netfilter.h> 6 7 enum ip_conntrack_dir { 8 IP_CT_DIR_ORIGINAL, 9 IP_CT_DIR_REPLY, 10 IP_CT_DIR_MAX 11 }; 12 13 /* The protocol-specific manipulable parts of the tuple: always in 14 * network order 15 */ 16 union nf_conntrack_man_proto { 17 /* Add other protocols here. */ 18 __be16 all; 19 20 struct { 21 __be16 port; 22 } tcp; 23 struct { 24 __be16 port; 25 } udp; 26 struct { 27 __be16 id; 28 } icmp; 29 struct { 30 __be16 port; 31 } dccp; 32 struct { 33 __be16 port; 34 } sctp; 35 struct { 36 __be16 key; /* GRE key is 32bit, PPtP only uses 16bit */ 37 } gre; 38 }; 39 40 #define CTINFO2DIR(ctinfo) ((ctinfo) >= IP_CT_IS_REPLY ? IP_CT_DIR_REPLY : IP_CT_DIR_ORIGINAL) 41 42 #endif /* _NF_CONNTRACK_TUPLE_COMMON_H */ 43