FwmarkIPFilter

The FwmarkIPFilter uses the packet filter mark to classify packets.

class FwmarkIPFilter(*, prio=None, dest_class_handle: Optional[Handle] = None, filter_name=None, fwmark: Optional[int] = None)[source]

This class is used for filters that compare against the firewall mark when the ethernet frames carry IP datagrams (see tc-fw(8))

Parameters:
  • prio – filter priority (integer)

  • dest_class_handleHandle of queuing class where filter-matching traffic will be directed

  • filter_name – user-friendly filter name (string)

  • fwmark – firewall mark (integer)

add_action(action: TrafficAction) None

Add a filter action.

Raises TcError if the filter is instantiated.

filter_creation_args() List[str][source]

Returns a list of tc(8) arguments to create this filter

get_actions() List[TrafficAction]

Returns the action list for this filter

get_description() str[source]

Returns a string with detailed info about the filter

get_dest_handle() Optional[Handle]

Returns the Handle of the QClass where this filter will send traffic

get_filter_name() Optional[str]

Returns the filter name

get_filter_type() str

Returns the filter type

get_fwmark() Optional[int][source]

Returns the fwmark that this filter compares against

get_match_name() Optional[str][source]

Returns a string with the name that describes the traffic matched by the filter.

get_prio() int

Returns the filter priority

is_instantiated() bool

Returns True if the filter is in the kernel

set_dest_handle(handle: Handle)

Sets the handle of the class where this filter will send traffic.

Raises TcError if the filter is instantiated.

set_filter_name(filter_name: str)

Set the filter name

set_fwmark(fwmark: int)[source]

Set the fwmark that this filter compares against.

Raises a TcError if the filter is already instantiated.

set_prio(prio: int)

Set the filter priority.

Raises TcError if the filter is instantiated.