From 931dc2d4c9195ab50974ce8af1a14053f2ebdc84 Mon Sep 17 00:00:00 2001 From: Felix Huettner Date: Tue, 5 Dec 2023 09:35:03 +0000 Subject: dump: support filtering by zone based on a kernel side extension of the conntrack api, this patch brings this extension to userspace. When dumping the conntrack table we can now filter based on the conntrack zone directly in kernel space. If the kernel does not yet support this feature this filtering is ignored. Signed-off-by: Felix Huettner Signed-off-by: Pablo Neira Ayuso --- src/conntrack/api.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/conntrack/api.c') diff --git a/src/conntrack/api.c b/src/conntrack/api.c index cd8bea8..60c87b3 100644 --- a/src/conntrack/api.c +++ b/src/conntrack/api.c @@ -1551,6 +1551,19 @@ void nfct_filter_dump_set_attr_u8(struct nfct_filter_dump *filter_dump, nfct_filter_dump_set_attr(filter_dump, type, &value); } +/** + * nfct_filter_dump_attr_set_u16 - set u16 dump filter attribute + * \param filter dump filter object that we want to modify + * \param type filter attribute type + * \param value value of the filter attribute using unsigned int (32 bits). + */ +void nfct_filter_dump_set_attr_u16(struct nfct_filter_dump *filter_dump, + const enum nfct_filter_dump_attr type, + uint16_t value) +{ + nfct_filter_dump_set_attr(filter_dump, type, &value); +} + /** * @} */ -- cgit v1.2.3