Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
0002 #ifndef __LINUX_DECNET_NETFILTER_H
0003 #define __LINUX_DECNET_NETFILTER_H
0004 
0005 /* DECnet-specific defines for netfilter. 
0006  * This file (C) Steve Whitehouse 1999 derived from the
0007  * ipv4 netfilter header file which is
0008  * (C)1998 Rusty Russell -- This code is GPL.
0009  */
0010 
0011 #include <linux/netfilter.h>
0012 
0013 /* only for userspace compatibility */
0014 #ifndef __KERNEL__
0015 
0016 #include <limits.h> /* for INT_MIN, INT_MAX */
0017 
0018 /* kernel define is in netfilter_defs.h */
0019 #define NF_DN_NUMHOOKS      7
0020 #endif /* ! __KERNEL__ */
0021 
0022 /* DECnet Hooks */
0023 /* After promisc drops, checksum checks. */
0024 #define NF_DN_PRE_ROUTING   0
0025 /* If the packet is destined for this box. */
0026 #define NF_DN_LOCAL_IN      1
0027 /* If the packet is destined for another interface. */
0028 #define NF_DN_FORWARD       2
0029 /* Packets coming from a local process. */
0030 #define NF_DN_LOCAL_OUT     3
0031 /* Packets about to hit the wire. */
0032 #define NF_DN_POST_ROUTING  4
0033 /* Input Hello Packets */
0034 #define NF_DN_HELLO     5
0035 /* Input Routing Packets */
0036 #define NF_DN_ROUTE     6
0037 
0038 enum nf_dn_hook_priorities {
0039     NF_DN_PRI_FIRST = INT_MIN,
0040     NF_DN_PRI_CONNTRACK = -200,
0041     NF_DN_PRI_MANGLE = -150,
0042     NF_DN_PRI_NAT_DST = -100,
0043     NF_DN_PRI_FILTER = 0,
0044     NF_DN_PRI_NAT_SRC = 100,
0045     NF_DN_PRI_DNRTMSG = 200,
0046     NF_DN_PRI_LAST = INT_MAX,
0047 };
0048 
0049 struct nf_dn_rtmsg {
0050     int nfdn_ifindex;
0051 };
0052 
0053 #define NFDN_RTMSG(r) ((unsigned char *)(r) + NLMSG_ALIGN(sizeof(struct nf_dn_rtmsg)))
0054 
0055 #ifndef __KERNEL__
0056 /* backwards compatibility for userspace */
0057 #define DNRMG_L1_GROUP 0x01
0058 #define DNRMG_L2_GROUP 0x02
0059 #endif
0060 
0061 enum {
0062     DNRNG_NLGRP_NONE,
0063 #define DNRNG_NLGRP_NONE    DNRNG_NLGRP_NONE
0064     DNRNG_NLGRP_L1,
0065 #define DNRNG_NLGRP_L1      DNRNG_NLGRP_L1
0066     DNRNG_NLGRP_L2,
0067 #define DNRNG_NLGRP_L2      DNRNG_NLGRP_L2
0068     __DNRNG_NLGRP_MAX
0069 };
0070 #define DNRNG_NLGRP_MAX (__DNRNG_NLGRP_MAX - 1)
0071 
0072 #endif /*__LINUX_DECNET_NETFILTER_H*/