summaryrefslogtreecommitdiffstats
path: root/include/xt.h
blob: 753511e635080274ee164816eb8ce4b87580b6ae (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
38
39
#ifndef _NFT_XT_H_
#define _NFT_XT_H_

struct netlink_linearize_ctx;
struct netlink_parse_ctx;
struct nftnl_expr;
struct rule_pp_ctx;
struct rule;

#ifdef HAVE_LIBXTABLES
void xt_stmt_xlate(const struct stmt *stmt);
void xt_stmt_release(const struct stmt *stmt);

void netlink_parse_target(struct netlink_parse_ctx *ctx,
			  const struct location *loc,
			  const struct nftnl_expr *nle);
void netlink_parse_match(struct netlink_parse_ctx *ctx,
			 const struct location *loc,
			 const struct nftnl_expr *nle);
void stmt_xt_postprocess(struct rule_pp_ctx *rctx, struct stmt *stmt,
			 struct rule *rule);
#else
static inline void xt_stmt_xlate(const struct stmt *stmt) {}
static inline void xt_stmt_release(const struct stmt *stmt) {}

#include <erec.h>

static inline void netlink_parse_target(struct netlink_parse_ctx *ctx,
					const struct location *loc,
					const struct nftnl_expr *nle) {}
static inline void netlink_parse_match(struct netlink_parse_ctx *ctx,
				       const struct location *loc,
				       const struct nftnl_expr *nle) {}
static inline void stmt_xt_postprocess(struct rule_pp_ctx *rctx,
				       struct stmt *stmt, struct rule *rule) {}

#endif

#endif /* _NFT_XT_H_ */