class duplicate.DuplicateAction(environment_id=None)

Bases: actions.action.Action

Defines the DuplicateAction - returns two copies of the given packet.


Initializes this action object.

  • action_name (str) – Name of this action (“duplicate”)
  • direction (str) – Direction of this action (“out”, “both”, “in”)

Swaps its left and right child

run(packet, logger)

The duplicate action duplicates the given packet and returns one copy for the left branch, and one for the right branch.

frequency = 3