xref: /linux/include/uapi/linux/netfilter_ipv6.h (revision 607ca46e97a1b6594b29647d98a32d545c24bdff)
1*607ca46eSDavid Howells /* IPv6-specific defines for netfilter.
2*607ca46eSDavid Howells  * (C)1998 Rusty Russell -- This code is GPL.
3*607ca46eSDavid Howells  * (C)1999 David Jeffery
4*607ca46eSDavid Howells  *   this header was blatantly ripped from netfilter_ipv4.h
5*607ca46eSDavid Howells  *   it's amazing what adding a bunch of 6s can do =8^)
6*607ca46eSDavid Howells  */
7*607ca46eSDavid Howells #ifndef _UAPI__LINUX_IP6_NETFILTER_H
8*607ca46eSDavid Howells #define _UAPI__LINUX_IP6_NETFILTER_H
9*607ca46eSDavid Howells 
10*607ca46eSDavid Howells 
11*607ca46eSDavid Howells #include <linux/netfilter.h>
12*607ca46eSDavid Howells 
13*607ca46eSDavid Howells /* only for userspace compatibility */
14*607ca46eSDavid Howells #ifndef __KERNEL__
15*607ca46eSDavid Howells 
16*607ca46eSDavid Howells #include <limits.h> /* for INT_MIN, INT_MAX */
17*607ca46eSDavid Howells 
18*607ca46eSDavid Howells /* IP Cache bits. */
19*607ca46eSDavid Howells /* Src IP address. */
20*607ca46eSDavid Howells #define NFC_IP6_SRC              0x0001
21*607ca46eSDavid Howells /* Dest IP address. */
22*607ca46eSDavid Howells #define NFC_IP6_DST              0x0002
23*607ca46eSDavid Howells /* Input device. */
24*607ca46eSDavid Howells #define NFC_IP6_IF_IN            0x0004
25*607ca46eSDavid Howells /* Output device. */
26*607ca46eSDavid Howells #define NFC_IP6_IF_OUT           0x0008
27*607ca46eSDavid Howells /* TOS. */
28*607ca46eSDavid Howells #define NFC_IP6_TOS              0x0010
29*607ca46eSDavid Howells /* Protocol. */
30*607ca46eSDavid Howells #define NFC_IP6_PROTO            0x0020
31*607ca46eSDavid Howells /* IP options. */
32*607ca46eSDavid Howells #define NFC_IP6_OPTIONS          0x0040
33*607ca46eSDavid Howells /* Frag & flags. */
34*607ca46eSDavid Howells #define NFC_IP6_FRAG             0x0080
35*607ca46eSDavid Howells 
36*607ca46eSDavid Howells 
37*607ca46eSDavid Howells /* Per-protocol information: only matters if proto match. */
38*607ca46eSDavid Howells /* TCP flags. */
39*607ca46eSDavid Howells #define NFC_IP6_TCPFLAGS         0x0100
40*607ca46eSDavid Howells /* Source port. */
41*607ca46eSDavid Howells #define NFC_IP6_SRC_PT           0x0200
42*607ca46eSDavid Howells /* Dest port. */
43*607ca46eSDavid Howells #define NFC_IP6_DST_PT           0x0400
44*607ca46eSDavid Howells /* Something else about the proto */
45*607ca46eSDavid Howells #define NFC_IP6_PROTO_UNKNOWN    0x2000
46*607ca46eSDavid Howells 
47*607ca46eSDavid Howells /* IP6 Hooks */
48*607ca46eSDavid Howells /* After promisc drops, checksum checks. */
49*607ca46eSDavid Howells #define NF_IP6_PRE_ROUTING	0
50*607ca46eSDavid Howells /* If the packet is destined for this box. */
51*607ca46eSDavid Howells #define NF_IP6_LOCAL_IN		1
52*607ca46eSDavid Howells /* If the packet is destined for another interface. */
53*607ca46eSDavid Howells #define NF_IP6_FORWARD		2
54*607ca46eSDavid Howells /* Packets coming from a local process. */
55*607ca46eSDavid Howells #define NF_IP6_LOCAL_OUT		3
56*607ca46eSDavid Howells /* Packets about to hit the wire. */
57*607ca46eSDavid Howells #define NF_IP6_POST_ROUTING	4
58*607ca46eSDavid Howells #define NF_IP6_NUMHOOKS		5
59*607ca46eSDavid Howells #endif /* ! __KERNEL__ */
60*607ca46eSDavid Howells 
61*607ca46eSDavid Howells 
62*607ca46eSDavid Howells enum nf_ip6_hook_priorities {
63*607ca46eSDavid Howells 	NF_IP6_PRI_FIRST = INT_MIN,
64*607ca46eSDavid Howells 	NF_IP6_PRI_CONNTRACK_DEFRAG = -400,
65*607ca46eSDavid Howells 	NF_IP6_PRI_RAW = -300,
66*607ca46eSDavid Howells 	NF_IP6_PRI_SELINUX_FIRST = -225,
67*607ca46eSDavid Howells 	NF_IP6_PRI_CONNTRACK = -200,
68*607ca46eSDavid Howells 	NF_IP6_PRI_MANGLE = -150,
69*607ca46eSDavid Howells 	NF_IP6_PRI_NAT_DST = -100,
70*607ca46eSDavid Howells 	NF_IP6_PRI_FILTER = 0,
71*607ca46eSDavid Howells 	NF_IP6_PRI_SECURITY = 50,
72*607ca46eSDavid Howells 	NF_IP6_PRI_NAT_SRC = 100,
73*607ca46eSDavid Howells 	NF_IP6_PRI_SELINUX_LAST = 225,
74*607ca46eSDavid Howells 	NF_IP6_PRI_CONNTRACK_HELPER = 300,
75*607ca46eSDavid Howells 	NF_IP6_PRI_LAST = INT_MAX,
76*607ca46eSDavid Howells };
77*607ca46eSDavid Howells 
78*607ca46eSDavid Howells 
79*607ca46eSDavid Howells #endif /* _UAPI__LINUX_IP6_NETFILTER_H */
80