Signed-off-by: Patrick McHardy <[email protected]>
---
include/netlink.h | 10 +++++-----
include/nftables.h | 2 +-
src/netlink.c | 10 +++++-----
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/include/netlink.h b/include/netlink.h
index 8444742..80b7c60 100644
--- a/include/netlink.h
+++ b/include/netlink.h
@@ -149,11 +149,11 @@ extern int netlink_delete_setelems(struct netlink_ctx
*ctx, const struct handle
extern int netlink_get_setelems(struct netlink_ctx *ctx, const struct handle
*h,
const struct location *loc, struct set *set);
-extern void netlink_dump_table(struct nftnl_table *nlt);
-extern void netlink_dump_chain(struct nftnl_chain *nlc);
-extern void netlink_dump_rule(struct nftnl_rule *nlr);
-extern void netlink_dump_expr(struct nftnl_expr *nle);
-extern void netlink_dump_set(struct nftnl_set *nls);
+extern void netlink_dump_table(const struct nftnl_table *nlt);
+extern void netlink_dump_chain(const struct nftnl_chain *nlc);
+extern void netlink_dump_rule(const struct nftnl_rule *nlr);
+extern void netlink_dump_expr(const struct nftnl_expr *nle);
+extern void netlink_dump_set(const struct nftnl_set *nls);
extern int netlink_batch_send(struct list_head *err_list);
diff --git a/include/nftables.h b/include/nftables.h
index cf19de8..d3f471b 100644
--- a/include/nftables.h
+++ b/include/nftables.h
@@ -52,7 +52,7 @@ struct location {
unsigned int last_column;
};
struct {
- void *nle;
+ const void *nle;
};
};
};
diff --git a/src/netlink.c b/src/netlink.c
index 6e88ddb..13fb82f 100644
--- a/src/netlink.c
+++ b/src/netlink.c
@@ -429,7 +429,7 @@ int netlink_del_rule_batch(struct netlink_ctx *ctx, const
struct handle *h,
return err;
}
-void netlink_dump_rule(struct nftnl_rule *nlr)
+void netlink_dump_rule(const struct nftnl_rule *nlr)
{
#ifdef DEBUG
char buf[4096];
@@ -442,7 +442,7 @@ void netlink_dump_rule(struct nftnl_rule *nlr)
#endif
}
-void netlink_dump_expr(struct nftnl_expr *nle)
+void netlink_dump_expr(const struct nftnl_expr *nle)
{
#ifdef DEBUG
char buf[4096];
@@ -506,7 +506,7 @@ static int netlink_flush_rules(struct netlink_ctx *ctx,
const struct handle *h,
return netlink_del_rule_batch(ctx, h, loc);
}
-void netlink_dump_chain(struct nftnl_chain *nlc)
+void netlink_dump_chain(const struct nftnl_chain *nlc)
{
#ifdef DEBUG
char buf[4096];
@@ -920,7 +920,7 @@ int netlink_delete_table(struct netlink_ctx *ctx, const
struct handle *h,
return netlink_del_table_compat(ctx, h, loc);
}
-void netlink_dump_table(struct nftnl_table *nlt)
+void netlink_dump_table(const struct nftnl_table *nlt)
{
#ifdef DEBUG
char buf[4096];
@@ -1035,7 +1035,7 @@ static const struct datatype *dtype_map_from_kernel(enum
nft_data_types type)
}
}
-void netlink_dump_set(struct nftnl_set *nls)
+void netlink_dump_set(const struct nftnl_set *nls)
{
#ifdef DEBUG
char buf[4096];
--
2.5.5
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html