GNU Linux-libre 4.19.286-gnu1
[releases.git] / include / uapi / linux / netfilter_decnet.h
1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2 #ifndef __LINUX_DECNET_NETFILTER_H
3 #define __LINUX_DECNET_NETFILTER_H
4
5 /* DECnet-specific defines for netfilter. 
6  * This file (C) Steve Whitehouse 1999 derived from the
7  * ipv4 netfilter header file which is
8  * (C)1998 Rusty Russell -- This code is GPL.
9  */
10
11 #include <linux/netfilter.h>
12
13 /* only for userspace compatibility */
14 #ifndef __KERNEL__
15
16 #include <limits.h> /* for INT_MIN, INT_MAX */
17
18 /* IP Cache bits. */
19 /* Src IP address. */
20 #define NFC_DN_SRC              0x0001
21 /* Dest IP address. */
22 #define NFC_DN_DST              0x0002
23 /* Input device. */
24 #define NFC_DN_IF_IN            0x0004
25 /* Output device. */
26 #define NFC_DN_IF_OUT           0x0008
27
28 /* kernel define is in netfilter_defs.h */
29 #define NF_DN_NUMHOOKS          7
30 #endif /* ! __KERNEL__ */
31
32 /* DECnet Hooks */
33 /* After promisc drops, checksum checks. */
34 #define NF_DN_PRE_ROUTING       0
35 /* If the packet is destined for this box. */
36 #define NF_DN_LOCAL_IN          1
37 /* If the packet is destined for another interface. */
38 #define NF_DN_FORWARD           2
39 /* Packets coming from a local process. */
40 #define NF_DN_LOCAL_OUT         3
41 /* Packets about to hit the wire. */
42 #define NF_DN_POST_ROUTING      4
43 /* Input Hello Packets */
44 #define NF_DN_HELLO             5
45 /* Input Routing Packets */
46 #define NF_DN_ROUTE             6
47
48 enum nf_dn_hook_priorities {
49         NF_DN_PRI_FIRST = INT_MIN,
50         NF_DN_PRI_CONNTRACK = -200,
51         NF_DN_PRI_MANGLE = -150,
52         NF_DN_PRI_NAT_DST = -100,
53         NF_DN_PRI_FILTER = 0,
54         NF_DN_PRI_NAT_SRC = 100,
55         NF_DN_PRI_DNRTMSG = 200,
56         NF_DN_PRI_LAST = INT_MAX,
57 };
58
59 struct nf_dn_rtmsg {
60         int nfdn_ifindex;
61 };
62
63 #define NFDN_RTMSG(r) ((unsigned char *)(r) + NLMSG_ALIGN(sizeof(struct nf_dn_rtmsg)))
64
65 #ifndef __KERNEL__
66 /* backwards compatibility for userspace */
67 #define DNRMG_L1_GROUP 0x01
68 #define DNRMG_L2_GROUP 0x02
69 #endif
70
71 enum {
72         DNRNG_NLGRP_NONE,
73 #define DNRNG_NLGRP_NONE        DNRNG_NLGRP_NONE
74         DNRNG_NLGRP_L1,
75 #define DNRNG_NLGRP_L1          DNRNG_NLGRP_L1
76         DNRNG_NLGRP_L2,
77 #define DNRNG_NLGRP_L2          DNRNG_NLGRP_L2
78         __DNRNG_NLGRP_MAX
79 };
80 #define DNRNG_NLGRP_MAX (__DNRNG_NLGRP_MAX - 1)
81
82 #endif /*__LINUX_DECNET_NETFILTER_H*/