MirredAction¶
The MirredAction supports packet mirroring and packet rediection.
- class MirredAction(action_index: Optional[int] = None, *, mirred_action: str, direction: str, to_dev: str)[source]¶
This class supports the tc(8)
mirredaction as documented in tc-mirred(8).- Parameters:
action_index – an integer that effectively names the action
mirred_action – either
mirrororredirectdirection – either
ingressoregressto_dev – destination interface
- MIRROR = 'mirror'¶
mirred mirroring action
- REDIRECT = 'redirect'¶
mirred redirect action
- EGRESS = 'egress'¶
Direction for packets to be sent out
- INGRESS = 'ingress'¶
Direction for packets to be received
- get_mirred_action() str[source]¶
Returns the mirred action, either
MirredAction.MIRRORorMirredAction.REDIRECT
- get_direction() Optional[int][source]¶
Returns the direction of the packet when it arrives at the destination interface, either
MirredAction.INGRESSorMirredAction.EGRESS
- get_action_index() Optional[int]¶
Returns the action index
- get_kind() str¶
Returns the action type