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 /src/erec.c | |
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 'src/erec.c')
-rw-r--r-- | src/erec.c | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -176,3 +176,20 @@ void erec_print_list(FILE *f, struct list_head *list) erec_destroy(erec); } } + +int __fmtstring(4, 5) __stmt_binary_error(struct eval_ctx *ctx, + const struct location *l1, + const struct location *l2, + const char *fmt, ...) +{ + struct error_record *erec; + va_list ap; + + va_start(ap, fmt); + erec = erec_vcreate(EREC_ERROR, l1, fmt, ap); + if (l2 != NULL) + erec_add_location(erec, l2); + va_end(ap); + erec_queue(erec, ctx->msgs); + return -1; +} |