libnl 3.7.0

Attribute Modifications

uint32_t rtnl_htb_get_rate2quantum (struct rtnl_qdisc *qdisc)
 Return rate/quantum ratio of HTB qdisc. More...
 
int rtnl_htb_set_rate2quantum (struct rtnl_qdisc *qdisc, uint32_t rate2quantum)
 
uint32_t rtnl_htb_get_defcls (struct rtnl_qdisc *qdisc)
 Return default class of HTB qdisc. More...
 
int rtnl_htb_set_defcls (struct rtnl_qdisc *qdisc, uint32_t defcls)
 Set default class of the htb qdisc to the specified value. More...
 
uint32_t rtnl_htb_get_prio (struct rtnl_class *class)
 
int rtnl_htb_set_prio (struct rtnl_class *class, uint32_t prio)
 
uint32_t rtnl_htb_get_rate (struct rtnl_class *class)
 Return rate of HTB class. More...
 
int rtnl_htb_get_rate64 (struct rtnl_class *class, uint64_t *out_rate64)
 Return rate of HTB class. More...
 
int rtnl_htb_set_rate (struct rtnl_class *class, uint32_t rate)
 Set rate of HTB class. More...
 
int rtnl_htb_set_rate64 (struct rtnl_class *class, uint64_t rate)
 Set rate of HTB class. More...
 
uint32_t rtnl_htb_get_ceil (struct rtnl_class *class)
 Return ceil rate of HTB class. More...
 
int rtnl_htb_get_ceil64 (struct rtnl_class *class, uint64_t *out_ceil64)
 Return ceil rate of HTB class. More...
 
int rtnl_htb_set_ceil (struct rtnl_class *class, uint32_t ceil)
 Set ceil rate of HTB class. More...
 
int rtnl_htb_set_ceil64 (struct rtnl_class *class, uint64_t ceil64)
 Set ceil rate of HTB class. More...
 
uint32_t rtnl_htb_get_rbuffer (struct rtnl_class *class)
 Return burst buffer size of HTB class. More...
 
int rtnl_htb_set_rbuffer (struct rtnl_class *class, uint32_t rbuffer)
 Set size of the rate bucket of HTB class. More...
 
uint32_t rtnl_htb_get_cbuffer (struct rtnl_class *class)
 Return ceil burst buffer size of HTB class. More...
 
int rtnl_htb_set_cbuffer (struct rtnl_class *class, uint32_t cbuffer)
 Set size of the ceil bucket of HTB class. More...
 
uint32_t rtnl_htb_get_quantum (struct rtnl_class *class)
 Return quantum of HTB class. More...
 
int rtnl_htb_set_quantum (struct rtnl_class *class, uint32_t quantum)
 Set quantum of HTB class (overwrites value calculated based on r2q) More...
 
int rtnl_htb_get_level (struct rtnl_class *class)
 Return level of HTB class. More...
 
int rtnl_htb_set_level (struct rtnl_class *class, int level)
 Set level of HTB class. More...
 

Detailed Description

Function Documentation

◆ rtnl_htb_get_rate2quantum()

uint32_t rtnl_htb_get_rate2quantum ( struct rtnl_qdisc *  qdisc)

Return rate/quantum ratio of HTB qdisc.

Parameters
qdischtb qdisc object
Returns
rate/quantum ratio or 0 if unspecified

Definition at line 304 of file htb.c.

◆ rtnl_htb_set_rate2quantum()

int rtnl_htb_set_rate2quantum ( struct rtnl_qdisc *  qdisc,
uint32_t  rate2quantum 
)

Definition at line 315 of file htb.c.

◆ rtnl_htb_get_defcls()

uint32_t rtnl_htb_get_defcls ( struct rtnl_qdisc *  qdisc)

Return default class of HTB qdisc.

Parameters
qdischtb qdisc object

Returns the classid of the class where all unclassified traffic goes to.

Returns
classid or TC_H_UNSPEC if unspecified.

Definition at line 338 of file htb.c.

◆ rtnl_htb_set_defcls()

int rtnl_htb_set_defcls ( struct rtnl_qdisc *  qdisc,
uint32_t  defcls 
)

Set default class of the htb qdisc to the specified value.

Parameters
qdiscqdisc to change
defclsnew default class

Definition at line 354 of file htb.c.

◆ rtnl_htb_get_prio()

uint32_t rtnl_htb_get_prio ( struct rtnl_class *  class)

Definition at line 368 of file htb.c.

◆ rtnl_htb_set_prio()

int rtnl_htb_set_prio ( struct rtnl_class *  class,
uint32_t  prio 
)

Definition at line 379 of file htb.c.

◆ rtnl_htb_get_rate()

uint32_t rtnl_htb_get_rate ( struct rtnl_class *  class)

Return rate of HTB class.

Parameters
classhtb class object
Returns
Rate in bytes/s or 0 if unspecified. If the value cannot be represented as 32 bit integer, (1<<32) is returned. Use rtnl_htb_get_rate64() instead.

Definition at line 401 of file htb.c.

◆ rtnl_htb_get_rate64()

int rtnl_htb_get_rate64 ( struct rtnl_class *  class,
uint64_t *  out_rate64 
)

Return rate of HTB class.

Parameters
classhtb class object
out_rate64on success, the set rate.
Returns
0 on success or a negative error code.

Definition at line 422 of file htb.c.

◆ rtnl_htb_set_rate()

int rtnl_htb_set_rate ( struct rtnl_class *  class,
uint32_t  rate 
)

Set rate of HTB class.

Parameters
classhtb class object
ratenew rate in bytes per second
Returns
0 on success or a negative error code.

Definition at line 442 of file htb.c.

References rtnl_htb_set_rate64().

+ Here is the call graph for this function:

◆ rtnl_htb_set_rate64()

int rtnl_htb_set_rate64 ( struct rtnl_class *  class,
uint64_t  rate 
)

Set rate of HTB class.

Parameters
classhtb class object
ratenew rate in bytes per second
Returns
0 on success or a negative error code.

Definition at line 454 of file htb.c.

Referenced by rtnl_htb_set_rate().

+ Here is the caller graph for this function:

◆ rtnl_htb_get_ceil()

uint32_t rtnl_htb_get_ceil ( struct rtnl_class *  class)

Return ceil rate of HTB class.

Parameters
classhtb class object
Returns
Ceil rate in bytes/s or 0 if unspecified. If the value cannot be represented as 32 bit integer, (1<<32) is returned. Use rtnl_htb_get_ceil64() instead.

Definition at line 477 of file htb.c.

◆ rtnl_htb_get_ceil64()

int rtnl_htb_get_ceil64 ( struct rtnl_class *  class,
uint64_t *  out_ceil64 
)

Return ceil rate of HTB class.

Parameters
classhtb class object
out_ceil64on success, the set ceil value.
Returns
0 on success or a negative error code.

Definition at line 498 of file htb.c.

◆ rtnl_htb_set_ceil()

int rtnl_htb_set_ceil ( struct rtnl_class *  class,
uint32_t  ceil 
)

Set ceil rate of HTB class.

Parameters
classhtb class object
ceilnew ceil rate number of bytes per second
Returns
0 on success or a negative error code.

Definition at line 518 of file htb.c.

References rtnl_htb_set_ceil64().

+ Here is the call graph for this function:

◆ rtnl_htb_set_ceil64()

int rtnl_htb_set_ceil64 ( struct rtnl_class *  class,
uint64_t  ceil64 
)

Set ceil rate of HTB class.

Parameters
classhtb class object
ceil64new ceil rate number of bytes per second
Returns
0 on success or a negative error code.

Definition at line 530 of file htb.c.

Referenced by rtnl_htb_set_ceil().

+ Here is the caller graph for this function:

◆ rtnl_htb_get_rbuffer()

uint32_t rtnl_htb_get_rbuffer ( struct rtnl_class *  class)

Return burst buffer size of HTB class.

Parameters
classhtb class object
Returns
Burst buffer size or 0 if unspecified

Definition at line 551 of file htb.c.

◆ rtnl_htb_set_rbuffer()

int rtnl_htb_set_rbuffer ( struct rtnl_class *  class,
uint32_t  rbuffer 
)

Set size of the rate bucket of HTB class.

Parameters
classHTB class to be modified.
rbufferNew size in bytes.

Definition at line 567 of file htb.c.

◆ rtnl_htb_get_cbuffer()

uint32_t rtnl_htb_get_cbuffer ( struct rtnl_class *  class)

Return ceil burst buffer size of HTB class.

Parameters
classhtb class object
Returns
Ceil burst buffer size or 0 if unspecified

Definition at line 587 of file htb.c.

◆ rtnl_htb_set_cbuffer()

int rtnl_htb_set_cbuffer ( struct rtnl_class *  class,
uint32_t  cbuffer 
)

Set size of the ceil bucket of HTB class.

Parameters
classHTB class to be modified.
cbufferNew size in bytes.

Definition at line 603 of file htb.c.

◆ rtnl_htb_get_quantum()

uint32_t rtnl_htb_get_quantum ( struct rtnl_class *  class)

Return quantum of HTB class.

Parameters
classhtb class object

See XXX[quantum def]

Returns
Quantum or 0 if unspecified.

Definition at line 625 of file htb.c.

◆ rtnl_htb_set_quantum()

int rtnl_htb_set_quantum ( struct rtnl_class *  class,
uint32_t  quantum 
)

Set quantum of HTB class (overwrites value calculated based on r2q)

Parameters
classhtb class object
quantumnew quantum in number of bytes

See XXX[quantum def]

Returns
0 on success or a negative error code.

Definition at line 645 of file htb.c.

◆ rtnl_htb_get_level()

int rtnl_htb_get_level ( struct rtnl_class *  class)

Return level of HTB class.

Parameters
classhtb class object

Returns the level of the HTB class. Leaf classes are assigned level 0, root classes have level (TC_HTB_MAXDEPTH - 1). Interior classes have a level of one less than their parent.

Returns
Level or a negative error code.

Definition at line 669 of file htb.c.

◆ rtnl_htb_set_level()

int rtnl_htb_set_level ( struct rtnl_class *  class,
int  level 
)

Set level of HTB class.

Parameters
classhtb class object
levelnew level of HTB class

Sets the level of a HTB class. Note that changing the level of a HTB class does not change the level of its in kernel counterpart. This function is provided only to create HTB objects which can be compared against or filtered upon.

Returns
0 on success or a negative error code.

Definition at line 693 of file htb.c.