Debian Codegraph @

src/include/uapi/linux/netfilter_ipv4.h

raw
1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2 /* IPv4-specific defines for netfilter.
3 * (C)1998 Rusty Russell -- This code is GPL.
4 */
5 #ifndef __LINUX_IP_NETFILTER_H
6 #define __LINUX_IP_NETFILTER_H
7
8
9 #include <linux/netfilter.h>
10 #include <linux/typelimits.h>
11
12 /* only for userspace compatibility */
13
14 /* IP Hooks */
15 /* After promisc drops, checksum checks. */
16 #define NF_IP_PRE_ROUTING 0
17 /* If the packet is destined for this box. */
18 #define NF_IP_LOCAL_IN 1
19 /* If the packet is destined for another interface. */
20 #define NF_IP_FORWARD 2
21 /* Packets coming from a local process. */
22 #define NF_IP_LOCAL_OUT 3
23 /* Packets about to hit the wire. */
24 #define NF_IP_POST_ROUTING 4
25 #define NF_IP_NUMHOOKS 5
26
27 enum nf_ip_hook_priorities {
28 NF_IP_PRI_FIRST = __KERNEL_INT_MIN,
29 NF_IP_PRI_RAW_BEFORE_DEFRAG = -450,
30 NF_IP_PRI_CONNTRACK_DEFRAG = -400,
31 NF_IP_PRI_RAW = -300,
32 NF_IP_PRI_SELINUX_FIRST = -225,
33 NF_IP_PRI_CONNTRACK = -200,
34 NF_IP_PRI_MANGLE = -150,
35 NF_IP_PRI_NAT_DST = -100,
36 NF_IP_PRI_FILTER = 0,
37 NF_IP_PRI_SECURITY = 50,
38 NF_IP_PRI_NAT_SRC = 100,
39 NF_IP_PRI_SELINUX_LAST = 225,
40 NF_IP_PRI_CONNTRACK_HELPER = 300,
41 NF_IP_PRI_CONNTRACK_CONFIRM = __KERNEL_INT_MAX,
42 NF_IP_PRI_LAST = __KERNEL_INT_MAX,
43 };
44
45 /* Arguments for setsockopt SOL_IP: */
46 /* 2.0 firewalling went from 64 through 71 (and +256, +512, etc). */
47 /* 2.2 firewalling (+ masq) went from 64 through 76 */
48 /* 2.4 firewalling went 64 through 67. */
49 #define SO_ORIGINAL_DST 80
50
51
52 #endif /* __LINUX_IP_NETFILTER_H */