xref: /linux/include/uapi/linux/netfilter_bridge.h (revision 8bf22c33e7a172fbc72464f4cc484d23a6b412ba)
1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2 #ifndef _UAPI__LINUX_BRIDGE_NETFILTER_H
3 #define _UAPI__LINUX_BRIDGE_NETFILTER_H
4 
5 /* bridge-specific defines for netfilter.
6  */
7 
8 #ifndef __KERNEL__
9 #include <netinet/if_ether.h>	/* for __UAPI_DEF_ETHHDR if defined */
10 #endif
11 
12 #include <linux/in.h>
13 #include <linux/netfilter.h>
14 #include <linux/if_ether.h>
15 #include <linux/if_vlan.h>
16 #include <linux/if_pppox.h>
17 #include <linux/typelimits.h>
18 
19 /* Bridge Hooks */
20 /* After promisc drops, checksum checks. */
21 #define NF_BR_PRE_ROUTING	0
22 /* If the packet is destined for this box. */
23 #define NF_BR_LOCAL_IN		1
24 /* If the packet is destined for another interface. */
25 #define NF_BR_FORWARD		2
26 /* Packets coming from a local process. */
27 #define NF_BR_LOCAL_OUT		3
28 /* Packets about to hit the wire. */
29 #define NF_BR_POST_ROUTING	4
30 /* Not really a hook, but used for the ebtables broute table */
31 #define NF_BR_BROUTING		5
32 #define NF_BR_NUMHOOKS		6
33 
34 enum nf_br_hook_priorities {
35 	NF_BR_PRI_FIRST = __KERNEL_INT_MIN,
36 	NF_BR_PRI_NAT_DST_BRIDGED = -300,
37 	NF_BR_PRI_FILTER_BRIDGED = -200,
38 	NF_BR_PRI_BRNF = 0,
39 	NF_BR_PRI_NAT_DST_OTHER = 100,
40 	NF_BR_PRI_FILTER_OTHER = 200,
41 	NF_BR_PRI_NAT_SRC = 300,
42 	NF_BR_PRI_LAST = __KERNEL_INT_MAX,
43 };
44 
45 #endif /* _UAPI__LINUX_BRIDGE_NETFILTER_H */
46