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