SkbeditAction

The SkbeditAction class supports SKB editing.

class SkbeditAction(action_index: Optional[int] = None, decision: Optional[ActionDecision] = None, *, queue_mapping: Optional[int] = None, priority: Optional[str] = None, mark: Optional[int] = None, mask: Optional[int] = None, packet_type: Optional[str] = None, inheritdsfield: Optional[bool] = False)[source]

This class supports the tc(8) skbedit action as documented in tc-skbedit(8).

Parameters:
  • action_index – an integer that effectively names the action

  • decision – control action to take

  • queue_mapping – specify transmit queue for packet

  • priority – priority

  • mark – firewall mark

  • mask – mask for the mark

  • packet_type – packet type

  • inheritdsfield – use the DiffServ field to override the classification decision

classmethod get_kind() str[source]

Returns skbedit

get_queue_mapping() Optional[int][source]

Returns the queue mapping, if any

get_priority() Optional[str][source]

Returns the priority, if any

get_mark() Optional[int][source]

Returns the firewall mark, if any

get_mask() Optional[int][source]

Returns the mask for the firewall mark, if any

get_packet_type() Optional[str][source]

Returns the packet type, if any

inheritdsfield() bool[source]

Returns the inheritdsfield value

action_creation_args() List[str]

Returns a list of tc(8) arguments to instantiate this action

get_action_index() Optional[int]

Returns the action index

get_decision() Optional[ActionDecision]

Returns the decision (e.g. ActionDecision.DROP) for this action

get_install_duration() int

Returns the number of seconds since the action was installed (created)

get_stats() Optional[ActionStats]

Returns action statistics

get_use_duration() int

It is not clear how the use duration (in seconds) is defined. As a data point, the install duration and use duration of an action created as part of a filter creation always have the same value.

parse_common_lines(line_iter: LineGroupIterator) None

Parse lines common to all actions. Stop when an empty line is encountered (the end of the action)

set_action_index(action_index: int) None

Sets the action index

set_durations(*, install_duration: int, use_duration: int) None

Set the install and use duration