TtlMatch

class TtlMatch[source]

Match against the packet TTL value

to_iptables_args() List[str][source]

Returns iptables(8) arguments for this match

ttl() TtlCriterion[source]

Returns the TTL criterion


TtlCriterion

class TtlCriterion(match: Match)[source]

A criterion for a TTL value comparison used by TtlMatch.

equals(value: int) Match[source]

Check if the packet TTL is equal to value

Parameters:

value – the TTL value

get_value()[source]

Returns the value that the criterion is comparing against and the comparison operation (as a string)

Return type:

tuple of (int, str)

greater_than(value: int) Match[source]

Check if the packet TTL is greater than value

Parameters:

value – the TTL value

less_than(value: int) Match[source]

Check if the packet TTL is less than value

Parameters:

value – the TTL value