summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/libnftables/chain.h2
-rw-r--r--include/libnftables/rule.h2
-rw-r--r--include/libnftables/set.h4
-rw-r--r--include/libnftables/table.h2
-rw-r--r--src/chain.c2
-rw-r--r--src/rule.c2
-rw-r--r--src/set.c2
-rw-r--r--src/set_elem.c2
-rw-r--r--src/table.c2
9 files changed, 10 insertions, 10 deletions
diff --git a/include/libnftables/chain.h b/include/libnftables/chain.h
index e20dbd1..382947f 100644
--- a/include/libnftables/chain.h
+++ b/include/libnftables/chain.h
@@ -27,7 +27,7 @@ enum {
NFT_CHAIN_ATTR_TYPE,
};
-bool nft_chain_attr_is_set(struct nft_chain *c, uint16_t attr);
+bool nft_chain_attr_is_set(const struct nft_chain *c, uint16_t attr);
void nft_chain_attr_unset(struct nft_chain *c, uint16_t attr);
void nft_chain_attr_set(struct nft_chain *t, uint16_t attr, const void *data);
void nft_chain_attr_set_u32(struct nft_chain *t, uint16_t attr, uint32_t data);
diff --git a/include/libnftables/rule.h b/include/libnftables/rule.h
index 9adfcfc..c597444 100644
--- a/include/libnftables/rule.h
+++ b/include/libnftables/rule.h
@@ -26,7 +26,7 @@ enum {
};
void nft_rule_attr_unset(struct nft_rule *r, uint16_t attr);
-bool nft_rule_attr_is_set(struct nft_rule *r, uint16_t attr);
+bool nft_rule_attr_is_set(const struct nft_rule *r, uint16_t attr);
void nft_rule_attr_set(struct nft_rule *r, uint16_t attr, const void *data);
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);
diff --git a/include/libnftables/set.h b/include/libnftables/set.h
index 971f967..6023d50 100644
--- a/include/libnftables/set.h
+++ b/include/libnftables/set.h
@@ -20,7 +20,7 @@ struct nft_set;
struct nft_set *nft_set_alloc(void);
void nft_set_free(struct nft_set *s);
-bool nft_set_attr_is_set(struct nft_set *s, uint16_t attr);
+bool nft_set_attr_is_set(const struct nft_set *s, uint16_t attr);
void nft_set_attr_unset(struct nft_set *s, uint16_t attr);
void nft_set_attr_set(struct nft_set *s, uint16_t attr, const void *data);
void nft_set_attr_set_u32(struct nft_set *s, uint16_t attr, uint32_t val);
@@ -86,7 +86,7 @@ void *nft_set_elem_attr_get(struct nft_set_elem *s, uint16_t attr, size_t *data_
const char *nft_set_elem_attr_get_str(struct nft_set_elem *s, uint16_t attr);
uint32_t nft_set_elem_attr_get_u32(struct nft_set_elem *s, uint16_t attr);
-bool nft_set_elem_attr_is_set(struct nft_set_elem *s, uint16_t attr);
+bool nft_set_elem_attr_is_set(const struct nft_set_elem *s, uint16_t attr);
struct nlmsghdr *nft_set_elem_nlmsg_build_hdr(char *buf, uint16_t cmd, uint16_t family, uint16_t type, uint32_t seq);
void nft_set_elems_nlmsg_build_payload(struct nlmsghdr *nlh, struct nft_set *s);
diff --git a/include/libnftables/table.h b/include/libnftables/table.h
index 57ddb2e..f3f3e89 100644
--- a/include/libnftables/table.h
+++ b/include/libnftables/table.h
@@ -19,7 +19,7 @@ enum {
NFT_TABLE_ATTR_FLAGS,
};
-bool nft_table_attr_is_set(struct nft_table *t, uint16_t attr);
+bool nft_table_attr_is_set(const struct nft_table *t, uint16_t attr);
void nft_table_attr_unset(struct nft_table *t, uint16_t attr);
void nft_table_attr_set(struct nft_table *t, uint16_t attr, const void *data);
const void *nft_table_attr_get(struct nft_table *t, uint16_t attr);
diff --git a/src/chain.c b/src/chain.c
index 0c7f422..3fb1d03 100644
--- a/src/chain.c
+++ b/src/chain.c
@@ -69,7 +69,7 @@ void nft_chain_free(struct nft_chain *c)
}
EXPORT_SYMBOL(nft_chain_free);
-bool nft_chain_attr_is_set(struct nft_chain *c, uint16_t attr)
+bool nft_chain_attr_is_set(const struct nft_chain *c, uint16_t attr)
{
return c->flags & (1 << attr);
}
diff --git a/src/rule.c b/src/rule.c
index 37a085f..b1bf64b 100644
--- a/src/rule.c
+++ b/src/rule.c
@@ -73,7 +73,7 @@ void nft_rule_free(struct nft_rule *r)
}
EXPORT_SYMBOL(nft_rule_free);
-bool nft_rule_attr_is_set(struct nft_rule *r, uint16_t attr)
+bool nft_rule_attr_is_set(const struct nft_rule *r, uint16_t attr)
{
return r->flags & (1 << attr);
}
diff --git a/src/set.c b/src/set.c
index bfcb0eb..ef15527 100644
--- a/src/set.c
+++ b/src/set.c
@@ -56,7 +56,7 @@ void nft_set_free(struct nft_set *s)
}
EXPORT_SYMBOL(nft_set_free);
-bool nft_set_attr_is_set(struct nft_set *s, uint16_t attr)
+bool nft_set_attr_is_set(const struct nft_set *s, uint16_t attr)
{
return s->flags & (1 << attr);
}
diff --git a/src/set_elem.c b/src/set_elem.c
index e95a872..4adba91 100644
--- a/src/set_elem.c
+++ b/src/set_elem.c
@@ -45,7 +45,7 @@ void nft_set_elem_free(struct nft_set_elem *s)
}
EXPORT_SYMBOL(nft_set_elem_free);
-bool nft_set_elem_attr_is_set(struct nft_set_elem *s, uint16_t attr)
+bool nft_set_elem_attr_is_set(const struct nft_set_elem *s, uint16_t attr)
{
return s->flags & (1 << attr);
}
diff --git a/src/table.c b/src/table.c
index e1dbd38..b2ebaa3 100644
--- a/src/table.c
+++ b/src/table.c
@@ -49,7 +49,7 @@ void nft_table_free(struct nft_table *t)
}
EXPORT_SYMBOL(nft_table_free);
-bool nft_table_attr_is_set(struct nft_table *t, uint16_t attr)
+bool nft_table_attr_is_set(const struct nft_table *t, uint16_t attr)
{
return t->flags & (1 << attr);
}