diff options
author | Pablo Neira <pablo@netfilter.org> | 2016-07-12 22:04:16 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-07-13 11:39:24 +0200 |
commit | b553eefe5ef1ac538fdf051df51481d19c9fbf4e (patch) | |
tree | 78348fd0ad85d88e1a8a5ca6695d0abecd263f25 /include | |
parent | e789b2be28f44e64d6e748b787c377ef9344f7c6 (diff) |
src: expose delinearize/linearize structures and stmt_error()
Needed by the follow up xt compatibility layer patch.
Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/erec.h | 12 | ||||
-rw-r--r-- | include/netlink.h | 14 |
2 files changed, 26 insertions, 0 deletions
diff --git a/include/erec.h b/include/erec.h index 25df1d0f..36e0efa4 100644 --- a/include/erec.h +++ b/include/erec.h @@ -61,4 +61,16 @@ static inline void erec_queue(struct error_record *erec, extern void erec_print(FILE *f, const struct error_record *erec); extern void erec_print_list(FILE *f, struct list_head *list); +struct eval_ctx; + +extern int __fmtstring(4, 5) __stmt_binary_error(struct eval_ctx *ctx, + const struct location *l1, + const struct location *l2, + const char *fmt, ...); + +#define stmt_error(ctx, s1, fmt, args...) \ + __stmt_binary_error(ctx, &(s1)->location, NULL, fmt, ## args) +#define stmt_binary_error(ctx, s1, s2, fmt, args...) \ + __stmt_binary_error(ctx, &(s1)->location, &(s2)->location, fmt, ## args) + #endif /* NFTABLES_EREC_H */ diff --git a/include/netlink.h b/include/netlink.h index 9f465601..76a9da44 100644 --- a/include/netlink.h +++ b/include/netlink.h @@ -12,6 +12,20 @@ #include <rule.h> +struct netlink_parse_ctx { + struct list_head *msgs; + struct table *table; + struct rule *rule; + struct stmt *stmt; + struct expr *registers[1 + NFT_REG32_15 - NFT_REG32_00 + 1]; +}; + +struct rule_pp_ctx { + struct proto_ctx pctx; + struct payload_dep_ctx pdctx; + struct stmt *stmt; +}; + extern const struct input_descriptor indesc_netlink; extern const struct location netlink_location; |