summaryrefslogtreecommitdiff
path: root/src/netlink.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2008-12-07 12:03:42 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2008-12-07 12:03:42 +0100
commit27ee6a0f1255cb6c7dadc55caf3928fd62354314 (patch)
tree60c311b58284f6a2ad8d79919eac58e4aec5d61f /src/netlink.c
parent2676982afacd502f3119cd323d060bbb88446057 (diff)
downloadconntrack-tools-27ee6a0f1255cb6c7dadc55caf3928fd62354314.tar.gz
conntrack-tools-27ee6a0f1255cb6c7dadc55caf3928fd62354314.zip
netlink: constify conntrack object parameter of nl_*_conntrack()
This patch constifies the first parameter, which is a conntrack object, in all nl_*_conntrack() functions. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/netlink.c')
-rw-r--r--src/netlink.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/netlink.c b/src/netlink.c
index 5929232..89c85d7 100644
--- a/src/netlink.c
+++ b/src/netlink.c
@@ -154,7 +154,8 @@ int nl_overrun_request_resync(void)
return nfct_send(STATE(overrun), NFCT_Q_DUMP, &family);
}
-static int __nl_get_conntrack(struct nfct_handle *h, struct nf_conntrack *ct)
+static int
+__nl_get_conntrack(struct nfct_handle *h, const struct nf_conntrack *ct)
{
int ret;
char __tmp[nfct_maxsize()];
@@ -172,13 +173,13 @@ static int __nl_get_conntrack(struct nfct_handle *h, struct nf_conntrack *ct)
return 1;
}
-int nl_exist_conntrack(struct nf_conntrack *ct)
+int nl_exist_conntrack(const struct nf_conntrack *ct)
{
return __nl_get_conntrack(STATE(request), ct);
}
/* get the conntrack and update the cache */
-int nl_get_conntrack(struct nf_conntrack *ct)
+int nl_get_conntrack(const struct nf_conntrack *ct)
{
return __nl_get_conntrack(STATE(dump), ct);
}
@@ -268,7 +269,7 @@ int nl_update_conntrack(const struct nf_conntrack *orig)
return ret;
}
-int nl_destroy_conntrack(struct nf_conntrack *ct)
+int nl_destroy_conntrack(const struct nf_conntrack *ct)
{
return nfct_query(STATE(dump), NFCT_Q_DESTROY, ct);
}