linuxnet.qos APIΒΆ
The linuxnet.qos API consists of the following:
QDiscConfig: objects of this class contain the queueing discipline configuration for a particular network interfaceClasses that provide access to queueing disciplines (e.g.
HTBQDisc); where those disciplines are classful, Python classes are available for the queueing discipline classes (e.g.HTBQClass)Classes that provide access to queueing discipline statistics; at a minimum, the statistics are those available via the QStats class, but some queueing disciplines provide their own subclass with additional statistics
Classes that provide access to traffic filters
Classes that provide access to traffic actions (e.g. policing)
The programming model of this library is centered around the
QDiscConfig class. One creates a QDiscConfig instance,
which is then used to obtain the queuing discipline configuration
of the interface, or to modify that configuration.
All configuration changes must explicitly take place via
a QDiscConfig instance.
Installing a new queuing discipline configuration is a 2-step process:
first, one creates an instance of the specific Python class for the
desired queuing discipline (e.g. HTBQDisc) with the appropriate
parameters, and then uses that Python class instance as an argument
to the QDiscConfig.create_qdisc() method to create the queuing
discipline inside the kernel.
Installing a new queuing class is a 2-step process:
first, one creates an instance of the specific Python class for the
desired queuing class (e.g. HTBQClass) with the appropriate
parameters, and then uses that Python class instance as an argument
to the QDiscConfig.create_qclass() method to create the queuing
class inside the kernel.
Installing a new filter is a 2-step process:
first, one creates an instance of the specific Python class for the
desired traffic filter (e.g. U32Filter) with the appropriate
parameters, and then uses that Python class instance as an argument
to the QDiscConfig.create_filter() method to create the traffic
filter inside the kernel.