PRIO¶
The following classes provide access to the prio
queueing discipline:
- class PrioQDisc(qdisc_handle: Handle, parent_handle: Optional[Handle], bands: Optional[int] = None, priomap: Optional[Sequence[int]] = None)[source]¶
Bases:
QDiscThis class provides access to the Priority queueing discipline of Linux (see tc-prio(8)).
- Parameters:
qdisc_handle – handle of this
PrioQDiscparent_handle – handle of parent,
Noneif this is a root queuing disciplinebands – as documented in tc-prio(8)
priomap – as documented in tc-prio(8)
- The
bandsandpriomapparameters must be consistent: priomapmust have 16 entries (number of Linux priorities)value of each entry in
priomapmust be less thanbands
- get_description() str[source]¶
Returns a string describing the queuing discipline and its attributes
- qdisc_creation_args() List[str][source]¶
Returns the arguments expected by the tc(8) command to create a prio qdisc
- dump(outfile: TextIO, level=0, qclass_map: Optional[Mapping[Handle, QClass]] = None)¶
Recursively dump this
Qdisctooutfile.The
qclass_map, if present, is used to determine the destinationQClassobjects of traffic filters.
- get_child_count() int¶
Return number of children of this
QDisc/QClass
- get_child_iter() Iterator[QClass]¶
Returns an iterator for the
QClasschildren of thisQDisc/QClass.
- get_config() QDiscConfig¶
Returns the
QDiscConfigwhere thisQDisc/QClasshas been instantiated, orNoneif not instantiated.
- get_handle() Handle¶
Returns the
QDisc/QClasshandle
- get_interface() Optional[str]¶
Returns the interface where this
QDisc/QClasshas been instantiated, orNoneif theQDisc/QClassis not instantiated.
- get_parent_handle() Optional[Handle]¶
Returns the handle of the parent of this
QDisc/QClass
- is_default() bool¶
Returns
Trueif thisQDiscis the default qdisc used by the kernel.
- static is_ingress() bool¶
Returns
Trueif thisQDiscis the ingress qdisc
- is_root() bool¶
Returns
Trueif this is a rootQDisc
- class PrioQClass(handle: Handle, parent_handle: Handle, class_name: Optional[str] = None)[source]¶
Bases:
QClassA class of the
PrioQDisc(prio) queuing discipline.- Parameters:
handle –
Handleof thisQClassparent_handle –
Handleof the parent of thisQClassclass_name – optional class name; defaults to the class handle
- dump(outfile: TextIO, level: int, qclass_map: Optional[Mapping[Handle, QClass]] = None)¶
Recursively dump this
QClasstooutfile.The
qclass_map, if present, is used to determine the destinationQClassobjects of traffic filters.
- get_class_name() str¶
Returns the class name
- get_config() QDiscConfig¶
Returns the
QDiscConfigwhere thisQDisc/QClasshas been instantiated, orNoneif not instantiated.
- get_handle() Handle¶
Returns the
QDisc/QClasshandle
- get_interface() Optional[str]¶
Returns the interface where this
QDisc/QClasshas been instantiated, orNoneif theQDisc/QClassis not instantiated.
- get_parent_handle() Optional[Handle]¶
Returns the handle of the parent of this
QDisc/QClass
- get_qdisc() Optional[QDisc]¶
Returns the
QDiscunder thisQClass; returnsNoneif there is noQDisc, or if this is not a leaf queuing class
- is_leaf() bool¶
Returns
Trueif this is a leaf queuing class
- set_class_name(class_name: str) None¶
Sets the class name