path: root/include/libnftables/rule.h
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/libnftables/rule.h
parentfc2ede69dcb0cbd2301b76fd89438a2ccb62ccfe (diff)
src: constify first parameter of all nft_*_get
Signed-off-by: Pablo Neira Ayuso <>
Diffstat (limited to 'include/libnftables/rule.h')
1 files changed, 5 insertions, 5 deletions
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);