Traffic actionsΒΆ

Traffic actions allow certain predefined operations to be applied to incoming or outgoing packets that are matched by some traffic filter. An example of such an operation is rate policing.

Although traffic actions may exist as standalone objects in the kernel, they must be associated with a traffic filter in order to take effect.

A traffic action is of a certain action type; police is such an action type (this is also referred to as an action kind). Traffic actions are identified by an action index; this index is per action-type.

This package provides Python classes that correspond to traffic action types (subclasses of the TrafficAction class). Standalone traffic actions are not currently supported. An instance of a TrafficAction subclass can be created and added to a TrafficFilter instance. The TrafficAction will be deleted when the last filter using the action is deleted.

Traffic actions can be shared. This is implemented by creating an instance of a TrafficAction subclass and specifying the action index of an existing action (of the same type).

The linuxnet.qos package supports the following traffic action classes: