summaryrefslogtreecommitdiffstats
path: root/net/netfilter/nf_internals.h
blob: 832ae64179f0f2e2e5c51812551dfc4029f8cc0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _NF_INTERNALS_H
#define _NF_INTERNALS_H

#include <linux/list.h>
#include <linux/skbuff.h>
#include <linux/netdevice.h>

/* nf_conntrack_netlink.c: applied on tuple filters */
#define CTA_FILTER_F_CTA_IP_SRC			(1 << 0)
#define CTA_FILTER_F_CTA_IP_DST			(1 << 1)
#define CTA_FILTER_F_CTA_TUPLE_ZONE		(1 << 2)
#define CTA_FILTER_F_CTA_PROTO_NUM		(1 << 3)
#define CTA_FILTER_F_CTA_PROTO_SRC_PORT		(1 << 4)
#define CTA_FILTER_F_CTA_PROTO_DST_PORT		(1 << 5)
#define CTA_FILTER_F_CTA_PROTO_ICMP_TYPE	(1 << 6)
#define CTA_FILTER_F_CTA_PROTO_ICMP_CODE	(1 << 7)
#define CTA_FILTER_F_CTA_PROTO_ICMP_ID		(1 << 8)
#define CTA_FILTER_F_CTA_PROTO_ICMPV6_TYPE	(1 << 9)
#define CTA_FILTER_F_CTA_PROTO_ICMPV6_CODE	(1 << 10)
#define CTA_FILTER_F_CTA_PROTO_ICMPV6_ID	(1 << 11)
#define CTA_FILTER_F_MAX			(1 << 12)
#define CTA_FILTER_F_ALL			(CTA_FILTER_F_MAX-1)
#define CTA_FILTER_FLAG(ctattr) CTA_FILTER_F_ ## ctattr

/* nf_queue.c */
void nf_queue_nf_hook_drop(struct net *net);

/* nf_log.c */
int __init netfilter_log_init(void);

/* core.c */
void nf_hook_entries_delete_raw(struct nf_hook_entries __rcu **pp,
				const struct nf_hook_ops *reg);
int nf_hook_entries_insert_raw(struct nf_hook_entries __rcu **pp,
				const struct nf_hook_ops *reg);
#endif