summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/erec.c17
-rw-r--r--src/evaluate.c22
-rw-r--r--src/netlink_delinearize.c14
3 files changed, 17 insertions, 36 deletions
diff --git a/src/erec.c b/src/erec.c
index d5142307..0a1e6c74 100644
--- a/src/erec.c
+++ b/src/erec.c
@@ -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;
+}
diff --git a/src/evaluate.c b/src/evaluate.c
index f24e5f3e..27deb15f 100644
--- a/src/evaluate.c
+++ b/src/evaluate.c
@@ -37,28 +37,6 @@ static const char *byteorder_names[] = {
[BYTEORDER_BIG_ENDIAN] = "big endian",
};
-static 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;
-
-}
-
-#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)
#define chain_error(ctx, s1, fmt, args...) \
__stmt_binary_error(ctx, &(s1)->location, NULL, fmt, ## args)
#define monitor_error(ctx, s1, fmt, args...) \
diff --git a/src/netlink_delinearize.c b/src/netlink_delinearize.c
index 77356998..fffbe266 100644
--- a/src/netlink_delinearize.c
+++ b/src/netlink_delinearize.c
@@ -27,14 +27,6 @@
#include <sys/socket.h>
#include <libnftnl/udata.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];
-};
-
static int netlink_parse_expr(const struct nftnl_expr *nle,
struct netlink_parse_ctx *ctx);
@@ -1047,12 +1039,6 @@ struct stmt *netlink_parse_set_expr(const struct set *set,
return pctx->stmt;
}
-struct rule_pp_ctx {
- struct proto_ctx pctx;
- struct payload_dep_ctx pdctx;
- struct stmt *stmt;
-};
-
static void expr_postprocess(struct rule_pp_ctx *ctx, struct expr **exprp);
static void integer_type_postprocess(struct expr *expr)