NM.SettingTCConfig

g GObject.Object GObject.Object NM.Setting NM.Setting GObject.Object->NM.Setting NM.SettingTCConfig NM.SettingTCConfig NM.Setting->NM.SettingTCConfig

Subclasses:

None

Methods

Inherited:

NM.Setting (21), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

add_qdisc (qdisc)

add_tfilter (tfilter)

clear_qdiscs ()

clear_tfilters ()

get_num_qdiscs ()

get_num_tfilters ()

get_qdisc (idx)

get_tfilter (idx)

remove_qdisc (idx)

remove_qdisc_by_value (qdisc)

remove_tfilter (idx)

remove_tfilter_by_value (tfilter)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Inherited:

NM.Setting (1)

Name

Type

Flags

Short Description

qdiscs

GLib.PtrArray

r/w

tfilters

GLib.PtrArray

r/w

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class NM.SettingTCConfig(**kwargs)
Bases:

NM.Setting

Abstract:

No

Structure:

NM.SettingTCConfigClass

Linux Traffic Control Settings

New in version 1.12.

classmethod new()
Returns:

the new empty NM.SettingTCConfig object

Return type:

NM.Setting

Creates a new NM.SettingTCConfig object with default values.

New in version 1.12.

add_qdisc(qdisc)
Parameters:

qdisc (NM.TCQdisc) – the qdisc to add

Returns:

True if the qdisc was added; False if the qdisc was already known.

Return type:

bool

Appends a new qdisc and associated information to the setting. The given qdisc is duplicated internally and is not changed by this function. If an identical qdisc (considering attributes as well) already exists, the qdisc is not added and the function returns False.

New in version 1.12.

add_tfilter(tfilter)
Parameters:

tfilter (NM.TCTfilter) – the tfilter to add

Returns:

True if the tfilter was added; False if the tfilter was already known.

Return type:

bool

Appends a new tfilter and associated information to the setting. The given tfilter is duplicated internally and is not changed by this function. If an identical tfilter (considering attributes as well) already exists, the tfilter is not added and the function returns False.

New in version 1.12.

clear_qdiscs()

Removes all configured queueing disciplines.

New in version 1.12.

clear_tfilters()

Removes all configured queueing disciplines.

New in version 1.12.

get_num_qdiscs()
Returns:

the number of configured queueing disciplines

Return type:

int

New in version 1.12.

get_num_tfilters()
Returns:

the number of configured queueing disciplines

Return type:

int

New in version 1.12.

get_qdisc(idx)
Parameters:

idx (int) – index number of the qdisc to return

Returns:

the qdisc at index idx

Return type:

NM.TCQdisc

New in version 1.12.

get_tfilter(idx)
Parameters:

idx (int) – index number of the tfilter to return

Returns:

the tfilter at index idx

Return type:

NM.TCTfilter

New in version 1.12.

remove_qdisc(idx)
Parameters:

idx (int) – index number of the qdisc

Removes the qdisc at index idx.

New in version 1.12.

remove_qdisc_by_value(qdisc)
Parameters:

qdisc (NM.TCQdisc) – the qdisc to remove

Returns:

True if the qdisc was found and removed; False if it was not.

Return type:

bool

Removes the first matching qdisc that matches qdisc.

New in version 1.12.

remove_tfilter(idx)
Parameters:

idx (int) – index number of the tfilter

Removes the tfilter at index idx.

New in version 1.12.

remove_tfilter_by_value(tfilter)
Parameters:

tfilter (NM.TCTfilter) – the tfilter to remove

Returns:

True if the tfilter was found and removed; False if it was not.

Return type:

bool

Removes the first matching tfilter that matches tfilter.

New in version 1.12.

Property Details

NM.SettingTCConfig.props.qdiscs
Name:

qdiscs

Type:

GLib.PtrArray

Default Value:

None

Flags:

READABLE, WRITABLE

Array of TC queueing disciplines.

When the NM.SettingTCConfig setting is present, qdiscs from this property are applied upon activation. If the property is empty, all qdiscs are removed and the device will only have the default qdisc assigned by kernel according to the “net.core.default_qdisc” sysctl.

If the NM.SettingTCConfig setting is not present, NetworkManager doesn’t touch the qdiscs present on the interface.

NM.SettingTCConfig.props.tfilters
Name:

tfilters

Type:

GLib.PtrArray

Default Value:

None

Flags:

READABLE, WRITABLE

Array of TC traffic filters.

When the NM.SettingTCConfig setting is present, filters from this property are applied upon activation. If the property is empty, NetworkManager removes all the filters.

If the NM.SettingTCConfig setting is not present, NetworkManager doesn’t touch the filters present on the interface.