Add a reworked IPv4 options match - xt_ipv4options

This revision 1 of ipv4options makes it possible to match the
presence or absence of any of the 32 possible IP options, either all
or any of the options the user specified.
This commit is contained in:
Jan Engelhardt
2009-03-08 23:38:12 +01:00
parent 0bb538ba69
commit a51b16097b
6 changed files with 278 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
#ifndef _LINUX_NETFILTER_XT_IPV4OPTIONS_H
#define _LINUX_NETFILTER_XT_IPV4OPTIONS_H 1
/* IPv4 allows for a 5-bit option number - 32 options */
/**
* %XT_V4OPTS_ALL: all options in @map must be present (respecting @invert)
* %XT_V4OPTS_ANY: any of the option in @map
*/
enum xt_ipv4options_flags {
XT_V4OPTS_ALL = 1 << 0,
XT_V4OPTS_ANY = 1 << 1,
};
/**
* @map: bitmask of options that should appear
* @invert: inversion map
* @flags: see above
*/
struct xt_ipv4options_mtinfo1 {
__u32 map;
__u32 invert;
__u8 flags;
};
#endif /* _LINUX_NETFILTER_XT_IPV4OPTIONS_H */