| 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 | #include <linux/in.h> |
| 9 | #include <linux/netfilter.h> |
| 10 | #include <linux/if_ether.h> |
| 11 | #include <linux/if_vlan.h> |
| 12 | #include <linux/if_pppox.h> |
| 13 | |
| 14 | #ifndef __KERNEL__ |
| 15 | #include <limits.h> /* for INT_MIN, INT_MAX */ |
| 16 | #endif |
| 17 | |
| 18 | /* Bridge Hooks */ |
| 19 | /* After promisc drops, checksum checks. */ |
| 20 | #define NF_BR_PRE_ROUTING 0 |
| 21 | /* If the packet is destined for this box. */ |
| 22 | #define NF_BR_LOCAL_IN 1 |
| 23 | /* If the packet is destined for another interface. */ |
| 24 | #define NF_BR_FORWARD 2 |
| 25 | /* Packets coming from a local process. */ |
| 26 | #define NF_BR_LOCAL_OUT 3 |
| 27 | /* Packets about to hit the wire. */ |
| 28 | #define NF_BR_POST_ROUTING 4 |
| 29 | /* Not really a hook, but used for the ebtables broute table */ |
| 30 | #define NF_BR_BROUTING 5 |
| 31 | #define NF_BR_NUMHOOKS 6 |
| 32 | |
| 33 | enum nf_br_hook_priorities { |
| 34 | NF_BR_PRI_FIRST = INT_MIN, |
| 35 | NF_BR_PRI_NAT_DST_BRIDGED = -300, |
| 36 | NF_BR_PRI_FILTER_BRIDGED = -200, |
| 37 | NF_BR_PRI_BRNF = 0, |
| 38 | NF_BR_PRI_NAT_DST_OTHER = 100, |
| 39 | NF_BR_PRI_FILTER_OTHER = 200, |
| 40 | NF_BR_PRI_NAT_SRC = 300, |
| 41 | NF_BR_PRI_LAST = INT_MAX, |
| 42 | }; |
| 43 | |
| 44 | #endif /* _UAPI__LINUX_BRIDGE_NETFILTER_H */ |
| 45 | |