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)
skbeditaction 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
markpacket_type – packet type
inheritdsfield – use the
DiffServfield to override the classification decision
- 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