xref: /linux/include/uapi/linux/netfilter_bridge.h (revision 3eb66e91a25497065c5322b1268cbc3953642227)
16f52b16cSGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2607ca46eSDavid Howells #ifndef _UAPI__LINUX_BRIDGE_NETFILTER_H
3607ca46eSDavid Howells #define _UAPI__LINUX_BRIDGE_NETFILTER_H
4607ca46eSDavid Howells 
5607ca46eSDavid Howells /* bridge-specific defines for netfilter.
6607ca46eSDavid Howells  */
7607ca46eSDavid Howells 
81ffad83dSMikko Rapeli #include <linux/in.h>
9607ca46eSDavid Howells #include <linux/netfilter.h>
10607ca46eSDavid Howells #include <linux/if_ether.h>
11607ca46eSDavid Howells #include <linux/if_vlan.h>
12607ca46eSDavid Howells #include <linux/if_pppox.h>
13607ca46eSDavid Howells 
14*5a8de47bSJiri Slaby #ifndef __KERNEL__
15*5a8de47bSJiri Slaby #include <limits.h> /* for INT_MIN, INT_MAX */
16*5a8de47bSJiri Slaby #endif
17*5a8de47bSJiri Slaby 
18607ca46eSDavid Howells /* Bridge Hooks */
19607ca46eSDavid Howells /* After promisc drops, checksum checks. */
20607ca46eSDavid Howells #define NF_BR_PRE_ROUTING	0
21607ca46eSDavid Howells /* If the packet is destined for this box. */
22607ca46eSDavid Howells #define NF_BR_LOCAL_IN		1
23607ca46eSDavid Howells /* If the packet is destined for another interface. */
24607ca46eSDavid Howells #define NF_BR_FORWARD		2
25607ca46eSDavid Howells /* Packets coming from a local process. */
26607ca46eSDavid Howells #define NF_BR_LOCAL_OUT		3
27607ca46eSDavid Howells /* Packets about to hit the wire. */
28607ca46eSDavid Howells #define NF_BR_POST_ROUTING	4
29607ca46eSDavid Howells /* Not really a hook, but used for the ebtables broute table */
30607ca46eSDavid Howells #define NF_BR_BROUTING		5
31607ca46eSDavid Howells #define NF_BR_NUMHOOKS		6
32607ca46eSDavid Howells 
3394276fa8SMáté Eckl enum nf_br_hook_priorities {
3494276fa8SMáté Eckl 	NF_BR_PRI_FIRST = INT_MIN,
3594276fa8SMáté Eckl 	NF_BR_PRI_NAT_DST_BRIDGED = -300,
3694276fa8SMáté Eckl 	NF_BR_PRI_FILTER_BRIDGED = -200,
3794276fa8SMáté Eckl 	NF_BR_PRI_BRNF = 0,
3894276fa8SMáté Eckl 	NF_BR_PRI_NAT_DST_OTHER = 100,
3994276fa8SMáté Eckl 	NF_BR_PRI_FILTER_OTHER = 200,
4094276fa8SMáté Eckl 	NF_BR_PRI_NAT_SRC = 300,
4194276fa8SMáté Eckl 	NF_BR_PRI_LAST = INT_MAX,
4294276fa8SMáté Eckl };
4394276fa8SMáté Eckl 
44607ca46eSDavid Howells #endif /* _UAPI__LINUX_BRIDGE_NETFILTER_H */
45