]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/blame - include/uapi/linux/netfilter/nf_conntrack_tuple_common.h
Merge remote-tracking branches 'asoc/topic/ac97', 'asoc/topic/ac97-mfd', 'asoc/topic...
[mirror_ubuntu-focal-kernel.git] / include / uapi / linux / netfilter / nf_conntrack_tuple_common.h
CommitLineData
6f52b16c 1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
9fb9cbb1
YK
2#ifndef _NF_CONNTRACK_TUPLE_COMMON_H
3#define _NF_CONNTRACK_TUPLE_COMMON_H
4
1ffad83d 5#include <linux/types.h>
3fefeb88 6#ifndef __KERNEL__
1ffad83d 7#include <linux/netfilter.h>
3fefeb88
DC
8#endif
9#include <linux/netfilter/nf_conntrack_common.h> /* IP_CT_IS_REPLY */
1ffad83d 10
63e690ca 11enum ip_conntrack_dir {
9fb9cbb1
YK
12 IP_CT_DIR_ORIGINAL,
13 IP_CT_DIR_REPLY,
14 IP_CT_DIR_MAX
15};
16
cbc9f2f4
PM
17/* The protocol-specific manipulable parts of the tuple: always in
18 * network order
19 */
20union nf_conntrack_man_proto {
21 /* Add other protocols here. */
22 __be16 all;
23
24 struct {
25 __be16 port;
26 } tcp;
27 struct {
28 __be16 port;
29 } udp;
30 struct {
31 __be16 id;
32 } icmp;
33 struct {
34 __be16 port;
35 } dccp;
36 struct {
37 __be16 port;
38 } sctp;
39 struct {
40 __be16 key; /* GRE key is 32bit, PPtP only uses 16bit */
41 } gre;
42};
43
9fb9cbb1
YK
44#define CTINFO2DIR(ctinfo) ((ctinfo) >= IP_CT_IS_REPLY ? IP_CT_DIR_REPLY : IP_CT_DIR_ORIGINAL)
45
46#endif /* _NF_CONNTRACK_TUPLE_COMMON_H */