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