Classful Queuing Disciplines¶
Table of Contents
HTB¶
HTB is a type of QDisc which allows to set a rate and burst, with priorities between classes. You can get more informations here.
Empty HTB class¶
-
class
pyqos.algorithms.htb.
EmptyHTBClass
(id=None, rate=None, ceil=None, burst=None, cburst=None, quantum=None, prio=None, children=None, *args, **kwargs)[source]¶ HTB that does nothing but can be used as parent for example
Can be useful to simulate, for example, a class already handled by another tool in the system.
-
apply
(auto_quantum=True, dryrun=False)[source]¶ Apply qos with current attributes
The function is recursive, so it will apply the qos of all children too.
-
branch_id
¶ Id of the current branch
-
burst
= None¶ Burst can be a callback or a fixed value
If _burst is an integer, its value will be returned directly. Otherwise, if it is a tuple, it will be considered as a callback.
-
cburst
= None¶ Cburst can be a callback or a fixed value
If _burst is an integer, its value will be returned directly. Otherwise, if it is a tuple, it will be considered as a callback.
-
ceil
= None¶ If ceil is an integer, will be used directly. Can also be a tupple to set a relative ceil, equals to a % of the parent class ceil:
(percentage, ceil_min, ceil_max)
. If the parent has no ceil defined, a relative ceil will use the parent’s rate instead. The root class cannot have a relative ceil. Will be replaced by a property at init
-
children
= None¶ children class which will be attached to this class
-
classid
¶ Return the full_id, corresponding to “branch_id:id”
-
interface
¶ Get the interface of the current branch
-
parent
= None¶ parent object
-
prio
= None¶ priority
-
quantum
¶ Quantum value
-
rate
= None¶ If rate is an integer, will be used directly. Can also be a tupple to set a relative rate, equals to a % of the parent class rate:
(percentage, rate_min, rate_max)
. The root class cannot have a relative rate. Will be replaced by a property at init
-
root
¶ Get the root of the current branch
-
Basic HTB class¶
-
class
pyqos.algorithms.htb.
HTBClass
(id=None, rate=None, ceil=None, burst=None, cburst=None, quantum=None, prio=None, children=None, *args, **kwargs)[source]¶ Basic HTB class
-
add_child
(*args)¶ Add a class as children
-
apply
(auto_quantum=True, dryrun=False)¶ Apply qos with current attributes
The function is recursive, so it will apply the qos of all children too.
-
branch_id
¶ Id of the current branch
-
classid
¶ Return the full_id, corresponding to “branch_id:id”
-
interface
¶ Get the interface of the current branch
-
quantum
¶ Quantum value
-
root
¶ Get the root of the current branch
-
Root HTB class¶
-
class
pyqos.algorithms.htb.
HTBClass
(id=None, rate=None, ceil=None, burst=None, cburst=None, quantum=None, prio=None, children=None, *args, **kwargs)[source] Basic HTB class
-
add_child
(*args) Add a class as children
-
apply
(auto_quantum=True, dryrun=False) Apply qos with current attributes
The function is recursive, so it will apply the qos of all children too.
-
branch_id
Id of the current branch
-
classid
Return the full_id, corresponding to “branch_id:id”
-
interface
Get the interface of the current branch
-
quantum
Quantum value
-
root
Get the root of the current branch
-
HTB filter¶
-
class
pyqos.algorithms.htb.
HTBFilter
(mark=None, qdisc=None, qdisc_kwargs=None, *args, **kwargs)[source]¶ Basic class with filtering
-
add_child
(*args)¶ Add a class as children
-
apply
(auto_quantum=True, dryrun=False)[source]¶ Apply qos with current attributes
The function is recursive, so it will apply the qos of all children too.
-
branch_id
¶ Id of the current branch
-
classid
¶ Return the full_id, corresponding to “branch_id:id”
-
interface
¶ Get the interface of the current branch
-
mark
= None¶ mark catch by the class
-
qdisc
= None¶ qdisc associated. Can be a class of an already initialized qdisc.
-
qdisc_kwargs
= {}¶ dict used during the construction ONLY, used as a kwargs to set the qdisc attributes.
-
quantum
¶ Quantum value
-
root
¶ Get the root of the current branch
-