summaryrefslogtreecommitdiffstats
path: root/include/netlink.h
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2013-04-18 17:53:59 +0200
committerPatrick McHardy <kaber@trash.net>2013-04-18 17:53:59 +0200
commite19e0ed6cde3176b7ef519748f893aa1afc86fa7 (patch)
tree4c13f623c1fbcb1d5f199f3031a9d19659ecea91 /include/netlink.h
parent18dfaeb51b7f6205a61925c97053a7fad4dfafc0 (diff)
cmd/netlink: make sure we always have a location in netlink operations
Improve error reporting by always using a location in netlink operations. Signed-off-by: Patrick McHardy<kaber@trash.net>
Diffstat (limited to 'include/netlink.h')
-rw-r--r--include/netlink.h51
1 files changed, 34 insertions, 17 deletions
diff --git a/include/netlink.h b/include/netlink.h
index 3252569b..ccbb872c 100644
--- a/include/netlink.h
+++ b/include/netlink.h
@@ -52,38 +52,55 @@ extern struct rule *netlink_delinearize_rule(struct netlink_ctx *ctx,
extern int netlink_add_rule(struct netlink_ctx *ctx, const struct handle *h,
const struct rule *rule, uint32_t flags);
-extern int netlink_delete_rule(struct netlink_ctx *ctx, const struct handle *h);
-extern int netlink_get_rule(struct netlink_ctx *ctx, const struct handle *h);
+extern int netlink_delete_rule(struct netlink_ctx *ctx, const struct handle *h,
+ const struct location *loc);
+extern int netlink_get_rule(struct netlink_ctx *ctx, const struct handle *h,
+ const struct location *loc);
extern int netlink_add_chain(struct netlink_ctx *ctx, const struct handle *h,
+ const struct location *loc,
const struct chain *chain);
extern int netlink_rename_chain(struct netlink_ctx *ctx, const struct handle *h,
- const char *name);
-extern int netlink_delete_chain(struct netlink_ctx *ctx, const struct handle *h);
-extern int netlink_list_chains(struct netlink_ctx *ctx, const struct handle *h);
-extern int netlink_get_chain(struct netlink_ctx *ctx, const struct handle *h);
-extern int netlink_list_chain(struct netlink_ctx *ctx, const struct handle *h);
-extern int netlink_flush_chain(struct netlink_ctx *ctx, const struct handle *h);
+ const struct location *loc, const char *name);
+extern int netlink_delete_chain(struct netlink_ctx *ctx, const struct handle *h,
+ const struct location *loc);
+extern int netlink_list_chains(struct netlink_ctx *ctx, const struct handle *h,
+ const struct location *loc);
+extern int netlink_get_chain(struct netlink_ctx *ctx, const struct handle *h,
+ const struct location *loc);
+extern int netlink_list_chain(struct netlink_ctx *ctx, const struct handle *h,
+ const struct location *loc);
+extern int netlink_flush_chain(struct netlink_ctx *ctx, const struct handle *h,
+ const struct location *loc);
extern int netlink_add_table(struct netlink_ctx *ctx, const struct handle *h,
+ const struct location *loc,
const struct table *table);
-extern int netlink_delete_table(struct netlink_ctx *ctx, const struct handle *h);
-extern int netlink_list_tables(struct netlink_ctx *ctx, const struct handle *h);
-extern int netlink_get_table(struct netlink_ctx *ctx, const struct handle *h);
-extern int netlink_list_table(struct netlink_ctx *ctx, const struct handle *h);
-extern int netlink_flush_table(struct netlink_ctx *ctx, const struct handle *h);
+extern int netlink_delete_table(struct netlink_ctx *ctx, const struct handle *h,
+ const struct location *loc);
+extern int netlink_list_tables(struct netlink_ctx *ctx, const struct handle *h,
+ const struct location *loc);
+extern int netlink_get_table(struct netlink_ctx *ctx, const struct handle *h,
+ const struct location *loc);
+extern int netlink_list_table(struct netlink_ctx *ctx, const struct handle *h,
+ const struct location *loc);
+extern int netlink_flush_table(struct netlink_ctx *ctx, const struct handle *h,
+ const struct location *loc);
extern int netlink_add_set(struct netlink_ctx *ctx, const struct handle *h,
struct set *set);
-extern int netlink_delete_set(struct netlink_ctx *ctx, const struct handle *h);
-extern int netlink_list_sets(struct netlink_ctx *ctx, const struct handle *h);
-extern int netlink_get_set(struct netlink_ctx *ctx, const struct handle *h);
+extern int netlink_delete_set(struct netlink_ctx *ctx, const struct handle *h,
+ const struct location *loc);
+extern int netlink_list_sets(struct netlink_ctx *ctx, const struct handle *h,
+ const struct location *loc);
+extern int netlink_get_set(struct netlink_ctx *ctx, const struct handle *h,
+ const struct location *loc);
extern int netlink_add_setelems(struct netlink_ctx *ctx, const struct handle *h,
const struct expr *expr);
extern int netlink_delete_setelems(struct netlink_ctx *ctx, const struct handle *h,
const struct expr *expr);
extern int netlink_get_setelems(struct netlink_ctx *ctx, const struct handle *h,
- struct set *set);
+ const struct location *loc, struct set *set);
#endif /* NFTABLES_NETLINK_H */