From 2dfb973c0dcc6d22113e2370f461f1733035baaf Mon Sep 17 00:00:00 2001 From: Vytas Dauksa Date: Tue, 17 Dec 2013 14:01:44 +0000 Subject: add markmask for hash:ip,mark data type Introduce packet mark mask for hash:ip,mark data type. This allows to set mark bit filter for the ip set. Change-Id: Id8dd9ca7e64477c4f7b022a1d9c1a5b187f1c96e Signed-off-by: Jozsef Kadlecsik --- lib/data.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/data.c') diff --git a/lib/data.c b/lib/data.c index 1f74cd5..48ec98a 100644 --- a/lib/data.c +++ b/lib/data.c @@ -54,6 +54,7 @@ struct ipset_data { uint8_t netmask; uint32_t hashsize; uint32_t maxelem; + uint32_t markmask; uint32_t gc; uint32_t size; /* Filled out by kernel */ @@ -287,6 +288,9 @@ ipset_data_set(struct ipset_data *data, enum ipset_opt opt, const void *value) case IPSET_OPT_MAXELEM: data->create.maxelem = *(const uint32_t *) value; break; + case IPSET_OPT_MARKMASK: + data->create.markmask = *(const uint32_t *) value; + break; case IPSET_OPT_NETMASK: data->create.netmask = *(const uint8_t *) value; break; @@ -467,6 +471,8 @@ ipset_data_get(const struct ipset_data *data, enum ipset_opt opt) return &data->create.hashsize; case IPSET_OPT_MAXELEM: return &data->create.maxelem; + case IPSET_OPT_MARKMASK: + return &data->create.markmask; case IPSET_OPT_NETMASK: return &data->create.netmask; case IPSET_OPT_PROBES: @@ -561,6 +567,7 @@ ipset_data_sizeof(enum ipset_opt opt, uint8_t family) case IPSET_OPT_GC: case IPSET_OPT_HASHSIZE: case IPSET_OPT_MAXELEM: + case IPSET_OPT_MARKMASK: case IPSET_OPT_SIZE: case IPSET_OPT_ELEMENTS: case IPSET_OPT_REFERENCES: -- cgit v1.2.1