TtlTarget

class TtlTarget(set_ttl_to: Optional[int] = None, inc_ttl_by: Optional[int] = None, dec_ttl_by: Optional[int] = None)[source]

This class provides access to the TTL target

Parameters:
  • set_ttl_to – set the TTL to this value

  • inc_ttl_by – increase the TTL by this value

  • dec_ttl_by – decrease the TTL by this value

Exactly one of set_ttl_to, inc_ttl_by, dec_ttl_by should not be equal to None.

get_ttl_value() Optional[int][source]

Returns the value to set the TTL to

get_ttl_inc() Optional[int][source]

Returns the TTL increment value

get_ttl_dec() Optional[int][source]

Returns the TTL decrement value

set_ttl_value(value: int) None[source]

Set the TTL to value

dec_ttl_value(value: int) None[source]

Decrease the TTL by value

inc_ttl_value(value: int) None[source]

Increase the TTL by value

to_iptables_args() List[str][source]

Returns a list of iptables(8) arguments

get_target_name() str

Returns the target name

is_terminating() bool

Returns True if this is a terminating target