0001
0002 #ifndef _NFT_REJECT_H_
0003 #define _NFT_REJECT_H_
0004
0005 #include <linux/types.h>
0006 #include <net/netlink.h>
0007 #include <net/netfilter/nf_tables.h>
0008 #include <uapi/linux/netfilter/nf_tables.h>
0009
0010 struct nft_reject {
0011 enum nft_reject_types type:8;
0012 u8 icmp_code;
0013 };
0014
0015 extern const struct nla_policy nft_reject_policy[];
0016
0017 int nft_reject_validate(const struct nft_ctx *ctx,
0018 const struct nft_expr *expr,
0019 const struct nft_data **data);
0020
0021 int nft_reject_init(const struct nft_ctx *ctx,
0022 const struct nft_expr *expr,
0023 const struct nlattr * const tb[]);
0024
0025 int nft_reject_dump(struct sk_buff *skb, const struct nft_expr *expr);
0026
0027 int nft_reject_icmp_code(u8 code);
0028 int nft_reject_icmpv6_code(u8 code);
0029
0030 #endif