LengthMatch

Example:

>>> from linuxnet.iptables import LengthMatch
>>> m = LengthMatch()
>>> m.length().equals(20,40)
<linuxnet.iptables.matches.lengthmatch.LengthMatch object at 0x7efe3a7baf80>
>>> m.to_iptables_args()
['-m', 'length', '--length', '20:40']
class LengthMatch[source]

Match against the length of the layer-3 payload

static get_match_name() str[source]

Returns the iptables(8) match extension name

get_criteria() Iterable[Criterion][source]

Returns the length match criteria: length

length() NumberOrRangeCriterion[source]

The length (or length range) we match against