GNU Linux-libre 4.14.265-gnu1
[releases.git] / include / net / netfilter / nft_reject.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _NFT_REJECT_H_
3 #define _NFT_REJECT_H_
4
5 struct nft_reject {
6         enum nft_reject_types   type:8;
7         u8                      icmp_code;
8 };
9
10 extern const struct nla_policy nft_reject_policy[];
11
12 int nft_reject_validate(const struct nft_ctx *ctx,
13                         const struct nft_expr *expr,
14                         const struct nft_data **data);
15
16 int nft_reject_init(const struct nft_ctx *ctx,
17                     const struct nft_expr *expr,
18                     const struct nlattr * const tb[]);
19
20 int nft_reject_dump(struct sk_buff *skb, const struct nft_expr *expr);
21
22 int nft_reject_icmp_code(u8 code);
23 int nft_reject_icmpv6_code(u8 code);
24
25 #endif