netfilter: ipset: Add skbinfo extension kernel support in the ipset core.
Skbinfo extension provides mapping of metainformation with lookup in the ipset tables. This patch defines the flags, the constants, the functions and the structures for the data type independent support of the extension. Note the firewall mark stores in the kernel structures as two 32bit values, but transfered through netlink as one 64bit value. Signed-off-by: Anton Danilov <littlesmilingcloud@gmail.com> Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
This commit is contained in:

committed by
Jozsef Kadlecsik

parent
73e64e1813
commit
0e9871e3f7
@@ -115,6 +115,9 @@ enum {
|
||||
IPSET_ATTR_BYTES,
|
||||
IPSET_ATTR_PACKETS,
|
||||
IPSET_ATTR_COMMENT,
|
||||
IPSET_ATTR_SKBMARK,
|
||||
IPSET_ATTR_SKBPRIO,
|
||||
IPSET_ATTR_SKBQUEUE,
|
||||
__IPSET_ATTR_ADT_MAX,
|
||||
};
|
||||
#define IPSET_ATTR_ADT_MAX (__IPSET_ATTR_ADT_MAX - 1)
|
||||
@@ -147,6 +150,7 @@ enum ipset_errno {
|
||||
IPSET_ERR_COUNTER,
|
||||
IPSET_ERR_COMMENT,
|
||||
IPSET_ERR_INVALID_MARKMASK,
|
||||
IPSET_ERR_SKBINFO,
|
||||
|
||||
/* Type specific error codes */
|
||||
IPSET_ERR_TYPE_SPECIFIC = 4352,
|
||||
@@ -170,6 +174,12 @@ enum ipset_cmd_flags {
|
||||
IPSET_FLAG_MATCH_COUNTERS = (1 << IPSET_FLAG_BIT_MATCH_COUNTERS),
|
||||
IPSET_FLAG_BIT_RETURN_NOMATCH = 7,
|
||||
IPSET_FLAG_RETURN_NOMATCH = (1 << IPSET_FLAG_BIT_RETURN_NOMATCH),
|
||||
IPSET_FLAG_BIT_MAP_SKBMARK = 8,
|
||||
IPSET_FLAG_MAP_SKBMARK = (1 << IPSET_FLAG_BIT_MAP_SKBMARK),
|
||||
IPSET_FLAG_BIT_MAP_SKBPRIO = 9,
|
||||
IPSET_FLAG_MAP_SKBPRIO = (1 << IPSET_FLAG_BIT_MAP_SKBPRIO),
|
||||
IPSET_FLAG_BIT_MAP_SKBQUEUE = 10,
|
||||
IPSET_FLAG_MAP_SKBQUEUE = (1 << IPSET_FLAG_BIT_MAP_SKBQUEUE),
|
||||
IPSET_FLAG_CMD_MAX = 15,
|
||||
};
|
||||
|
||||
@@ -187,6 +197,8 @@ enum ipset_cadt_flags {
|
||||
IPSET_FLAG_WITH_COMMENT = (1 << IPSET_FLAG_BIT_WITH_COMMENT),
|
||||
IPSET_FLAG_BIT_WITH_FORCEADD = 5,
|
||||
IPSET_FLAG_WITH_FORCEADD = (1 << IPSET_FLAG_BIT_WITH_FORCEADD),
|
||||
IPSET_FLAG_BIT_WITH_SKBINFO = 6,
|
||||
IPSET_FLAG_WITH_SKBINFO = (1 << IPSET_FLAG_BIT_WITH_SKBINFO),
|
||||
IPSET_FLAG_CADT_MAX = 15,
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user