path: root/include
diff options
authorPablo Neira Ayuso <>2013-06-15 22:19:23 +0200
committerPablo Neira Ayuso <>2013-06-17 21:08:40 +0200
commit6cc9220f185e46e90bbb2ff282efcacbfe10aa01 (patch)
tree2ce75b5b5b280e60513a956e2d8bd5c83db365c5 /include
parentfc2ede69dcb0cbd2301b76fd89438a2ccb62ccfe (diff)
src: constify first parameter of all nft_*_get
Signed-off-by: Pablo Neira Ayuso <>
Diffstat (limited to 'include')
2 files changed, 10 insertions, 10 deletions
diff --git a/include/libnftables/expr.h b/include/libnftables/expr.h
index 1ab5590..21bb3af 100644
--- a/include/libnftables/expr.h
+++ b/include/libnftables/expr.h
@@ -22,11 +22,11 @@ void nft_rule_expr_set_u32(struct nft_rule_expr *expr, uint16_t type, uint32_t d
void nft_rule_expr_set_u64(struct nft_rule_expr *expr, uint16_t type, uint64_t data);
void nft_rule_expr_set_str(struct nft_rule_expr *expr, uint16_t type, const char *str);
-const void *nft_rule_expr_get(struct nft_rule_expr *expr, uint16_t type, size_t *data_len);
-uint8_t nft_rule_expr_get_u8(struct nft_rule_expr *expr, uint16_t type);
-uint32_t nft_rule_expr_get_u32(struct nft_rule_expr *expr, uint16_t type);
-uint64_t nft_rule_expr_get_u64(struct nft_rule_expr *expr, uint16_t type);
-const char *nft_rule_expr_get_str(struct nft_rule_expr *expr, uint16_t type);
+const void *nft_rule_expr_get(const struct nft_rule_expr *expr, uint16_t type, size_t *data_len);
+uint8_t nft_rule_expr_get_u8(const struct nft_rule_expr *expr, uint16_t type);
+uint32_t nft_rule_expr_get_u32(const struct nft_rule_expr *expr, uint16_t type);
+uint64_t nft_rule_expr_get_u64(const struct nft_rule_expr *expr, uint16_t type);
+const char *nft_rule_expr_get_str(const struct nft_rule_expr *expr, uint16_t type);
void nft_rule_expr_build_payload(struct nlmsghdr *nlh, struct nft_rule_expr *expr);
diff --git a/include/libnftables/rule.h b/include/libnftables/rule.h
index 242ea07..fb6e804 100644
--- a/include/libnftables/rule.h
+++ b/include/libnftables/rule.h
@@ -31,11 +31,11 @@ void nft_rule_attr_set_u32(struct nft_rule *r, uint16_t attr, uint32_t val);
void nft_rule_attr_set_u64(struct nft_rule *r, uint16_t attr, uint64_t val);
void nft_rule_attr_set_str(struct nft_rule *r, uint16_t attr, const char *str);
-void *nft_rule_attr_get(struct nft_rule *r, uint16_t attr);
-const char *nft_rule_attr_get_str(struct nft_rule *r, uint16_t attr);
-uint8_t nft_rule_attr_get_u8(struct nft_rule *r, uint16_t attr);
-uint32_t nft_rule_attr_get_u32(struct nft_rule *r, uint16_t attr);
-uint64_t nft_rule_attr_get_u64(struct nft_rule *r, uint16_t attr);
+const void *nft_rule_attr_get(const struct nft_rule *r, uint16_t attr);
+const char *nft_rule_attr_get_str(const struct nft_rule *r, uint16_t attr);
+uint8_t nft_rule_attr_get_u8(const struct nft_rule *r, uint16_t attr);
+uint32_t nft_rule_attr_get_u32(const struct nft_rule *r, uint16_t attr);
+uint64_t nft_rule_attr_get_u64(const struct nft_rule *r, uint16_t attr);
void nft_rule_add_expr(struct nft_rule *r, struct nft_rule_expr *expr);