Loading...
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _NF_INTERNALS_H
3#define _NF_INTERNALS_H
4
5#include <linux/list.h>
6#include <linux/skbuff.h>
7#include <linux/netdevice.h>
8
9/* nf_conntrack_netlink.c: applied on tuple filters */
10#define CTA_FILTER_F_CTA_IP_SRC (1 << 0)
11#define CTA_FILTER_F_CTA_IP_DST (1 << 1)
12#define CTA_FILTER_F_CTA_TUPLE_ZONE (1 << 2)
13#define CTA_FILTER_F_CTA_PROTO_NUM (1 << 3)
14#define CTA_FILTER_F_CTA_PROTO_SRC_PORT (1 << 4)
15#define CTA_FILTER_F_CTA_PROTO_DST_PORT (1 << 5)
16#define CTA_FILTER_F_CTA_PROTO_ICMP_TYPE (1 << 6)
17#define CTA_FILTER_F_CTA_PROTO_ICMP_CODE (1 << 7)
18#define CTA_FILTER_F_CTA_PROTO_ICMP_ID (1 << 8)
19#define CTA_FILTER_F_CTA_PROTO_ICMPV6_TYPE (1 << 9)
20#define CTA_FILTER_F_CTA_PROTO_ICMPV6_CODE (1 << 10)
21#define CTA_FILTER_F_CTA_PROTO_ICMPV6_ID (1 << 11)
22#define CTA_FILTER_F_MAX (1 << 12)
23#define CTA_FILTER_F_ALL (CTA_FILTER_F_MAX-1)
24#define CTA_FILTER_FLAG(ctattr) CTA_FILTER_F_ ## ctattr
25
26/* nf_queue.c */
27void nf_queue_nf_hook_drop(struct net *net);
28
29/* nf_log.c */
30int __init netfilter_log_init(void);
31
32/* core.c */
33void nf_hook_entries_delete_raw(struct nf_hook_entries __rcu **pp,
34 const struct nf_hook_ops *reg);
35int nf_hook_entries_insert_raw(struct nf_hook_entries __rcu **pp,
36 const struct nf_hook_ops *reg);
37#endif
1#ifndef _NF_INTERNALS_H
2#define _NF_INTERNALS_H
3
4#include <linux/list.h>
5#include <linux/skbuff.h>
6#include <linux/netdevice.h>
7
8#ifdef CONFIG_NETFILTER_DEBUG
9#define NFDEBUG(format, args...) printk(KERN_DEBUG format , ## args)
10#else
11#define NFDEBUG(format, args...)
12#endif
13
14
15/* core.c */
16extern unsigned int nf_iterate(struct list_head *head,
17 struct sk_buff *skb,
18 unsigned int hook,
19 const struct net_device *indev,
20 const struct net_device *outdev,
21 struct list_head **i,
22 int (*okfn)(struct sk_buff *),
23 int hook_thresh);
24
25/* nf_queue.c */
26extern int nf_queue(struct sk_buff *skb,
27 struct list_head *elem,
28 u_int8_t pf, unsigned int hook,
29 struct net_device *indev,
30 struct net_device *outdev,
31 int (*okfn)(struct sk_buff *),
32 unsigned int queuenum);
33extern int __init netfilter_queue_init(void);
34
35/* nf_log.c */
36extern int __init netfilter_log_init(void);
37
38#endif