1 #ifndef __LINUX_NETFILTER_H
2 #define __LINUX_NETFILTER_H
4 #include <linux/types.h>
7 /* Responses from hook functions. */
14 #define NF_MAX_VERDICT NF_STOP
16 /* we overload the higher bits for encoding auxiliary data such as the queue
17 * number or errno values. Not nice, but better than additional function
19 #define NF_VERDICT_MASK 0x000000ff
21 /* extra verdict flags have mask 0x0000ff00 */
22 #define NF_VERDICT_FLAG_QUEUE_BYPASS 0x00008000
24 /* queue number (NF_QUEUE) or errno (NF_DROP) */
25 #define NF_VERDICT_QMASK 0xffff0000
26 #define NF_VERDICT_QBITS 16
28 #define NF_QUEUE_NR(x) ((((x) << 16) & NF_VERDICT_QMASK) | NF_QUEUE)
30 #define NF_DROP_ERR(x) (((-x) << 16) | NF_DROP)
32 /* only for userspace compatibility */
33 /* Generic cache responses from hook functions.
34 <= 0x2000 is used for protocol-flags. */
35 #define NFC_UNKNOWN 0x4000
36 #define NFC_ALTERED 0x8000
38 /* NF_VERDICT_BITS should be 8 now, but userspace might break if this changes */
39 #define NF_VERDICT_BITS 16
68 #endif /*__LINUX_NETFILTER_H*/