Merge tag 'imx-fixes-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo...
[deliverable/linux.git] / include / net / netfilter / nf_tables_core.h
CommitLineData
96518518
PM
1#ifndef _NET_NF_TABLES_CORE_H
2#define _NET_NF_TABLES_CORE_H
3
5eccdfaa
JP
4int nf_tables_core_module_init(void);
5void nf_tables_core_module_exit(void);
96518518 6
5eccdfaa
JP
7int nft_immediate_module_init(void);
8void nft_immediate_module_exit(void);
96518518 9
cb7dbfd0
PM
10struct nft_cmp_fast_expr {
11 u32 data;
12 enum nft_registers sreg:8;
13 u8 len;
14};
15
b855d416
PM
16/* Calculate the mask for the nft_cmp_fast expression. On big endian the
17 * mask needs to include the *upper* bytes when interpreting that data as
18 * something smaller than the full u32, therefore a cpu_to_le32 is done.
19 */
20static inline u32 nft_cmp_fast_mask(unsigned int len)
21{
22 return cpu_to_le32(~0U >> (FIELD_SIZEOF(struct nft_cmp_fast_expr,
23 data) * BITS_PER_BYTE - len));
24}
25
cb7dbfd0
PM
26extern const struct nft_expr_ops nft_cmp_fast_ops;
27
5eccdfaa
JP
28int nft_cmp_module_init(void);
29void nft_cmp_module_exit(void);
96518518 30
5eccdfaa
JP
31int nft_lookup_module_init(void);
32void nft_lookup_module_exit(void);
96518518 33
22fe54d5
PM
34int nft_dynset_module_init(void);
35void nft_dynset_module_exit(void);
36
5eccdfaa
JP
37int nft_bitwise_module_init(void);
38void nft_bitwise_module_exit(void);
96518518 39
5eccdfaa
JP
40int nft_byteorder_module_init(void);
41void nft_byteorder_module_exit(void);
96518518 42
c29b72e0
PM
43struct nft_payload {
44 enum nft_payload_bases base:8;
45 u8 offset;
46 u8 len;
47 enum nft_registers dreg:8;
48};
49
7ec3f7b4
PM
50struct nft_payload_set {
51 enum nft_payload_bases base:8;
52 u8 offset;
53 u8 len;
54 enum nft_registers sreg:8;
55 u8 csum_type;
56 u8 csum_offset;
57};
58
c29b72e0 59extern const struct nft_expr_ops nft_payload_fast_ops;
e639f7ab 60extern struct static_key_false nft_trace_enabled;
c29b72e0 61
5eccdfaa
JP
62int nft_payload_module_init(void);
63void nft_payload_module_exit(void);
96518518
PM
64
65#endif /* _NET_NF_TABLES_CORE_H */
This page took 0.175035 seconds and 5 git commands to generate.