Add xt_length2

xt_length2 provides exact layer-4,-5 and -7 length matching
besides the preexisting layer-3 length match.
This commit is contained in:
Jan Engelhardt
2009-01-29 15:33:32 +01:00
parent 85cab10371
commit 7cdfc0ac3d
7 changed files with 478 additions and 0 deletions

22
extensions/xt_length2.h Normal file
View File

@@ -0,0 +1,22 @@
#ifndef _LINUX_NETFILTER_XT_LENGTH2_H
#define _LINUX_NETFILTER_XT_LENGTH2_H
enum {
XT_LENGTH_INVERT = 1 << 0,
/* IP header plus payload */
XT_LENGTH_LAYER3 = 1 << 1,
/* Strip IP header: */
XT_LENGTH_LAYER4 = 1 << 2,
/* Strip TCP/UDP/etc. header */
XT_LENGTH_LAYER5 = 1 << 3,
/* TCP/UDP/SCTP payload */
XT_LENGTH_LAYER7 = 1 << 4,
};
struct xt_length_mtinfo2 {
u_int32_t min, max;
u_int16_t flags;
};
#endif /* _LINUX_NETFILTER_XT_LENGTH2_H */