summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2012-12-14 17:39:22 +0100
committerPatrick McHardy <kaber@trash.net>2012-12-14 17:39:22 +0100
commita5dadd72bef79d92c14271fb8718a13f0e7f3814 (patch)
tree7ca8daa07c624e51f59de8962e9a7b2467c3b3b2 /include
parent1c494b5302b285d6674478a3555b63403bebdcb0 (diff)
chains: add chain rename support
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'include')
-rw-r--r--include/netlink.h2
-rw-r--r--include/rule.h4
2 files changed, 6 insertions, 0 deletions
diff --git a/include/netlink.h b/include/netlink.h
index 22ef489c..8edd1a39 100644
--- a/include/netlink.h
+++ b/include/netlink.h
@@ -57,6 +57,8 @@ extern int netlink_get_rule(struct netlink_ctx *ctx, const struct handle *h);
extern int netlink_add_chain(struct netlink_ctx *ctx, const struct handle *h,
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);
diff --git a/include/rule.h b/include/rule.h
index 4a458d31..e468e8e8 100644
--- a/include/rule.h
+++ b/include/rule.h
@@ -190,6 +190,7 @@ extern void set_print(const struct set *set);
* @CMD_DELETE: delete object
* @CMD_LIST: list container
* @CMD_FLUSH: flush container
+ * @CMD_RENAME: rename object
*/
enum cmd_ops {
CMD_INVALID,
@@ -197,6 +198,7 @@ enum cmd_ops {
CMD_DELETE,
CMD_LIST,
CMD_FLUSH,
+ CMD_RENAME,
};
/**
@@ -229,6 +231,7 @@ enum cmd_obj {
* @obj: object type to perform operation on
* @handle: handle for operations working without full objects
* @union: object
+ * @arg: argument data
*/
struct cmd {
struct list_head list;
@@ -244,6 +247,7 @@ struct cmd {
struct chain *chain;
struct table *table;
};
+ const void *arg;
};
extern struct cmd *cmd_alloc(enum cmd_ops op, enum cmd_obj obj,