provide function to retrieve htb rate
This commit is contained in:
parent
552c85cab7
commit
5dc897d5de
2 changed files with 10 additions and 0 deletions
|
@ -26,6 +26,7 @@ extern void rtnl_htb_set_defcls(struct rtnl_qdisc *, uint32_t);
|
|||
|
||||
extern void rtnl_htb_set_prio(struct rtnl_class *, uint32_t);
|
||||
extern void rtnl_htb_set_rate(struct rtnl_class *, uint32_t);
|
||||
extern uint32_t rtnl_htb_get_rate(struct rtnl_class *);
|
||||
extern void rtnl_htb_set_ceil(struct rtnl_class *, uint32_t);
|
||||
extern void rtnl_htb_set_rbuffer(struct rtnl_class *, uint32_t);
|
||||
extern void rtnl_htb_set_cbuffer(struct rtnl_class *, uint32_t);
|
||||
|
|
|
@ -361,6 +361,15 @@ void rtnl_htb_set_rate(struct rtnl_class *class, uint32_t rate)
|
|||
d->ch_mask |= SCH_HTB_HAS_RATE;
|
||||
}
|
||||
|
||||
uint32_t rtnl_htb_get_rate(struct rtnl_class *class)
|
||||
{
|
||||
struct rtnl_htb_class *d = htb_class(class);
|
||||
if (d == NULL)
|
||||
return 0;
|
||||
|
||||
return d->ch_rate.rs_rate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set ceil of HTB class.
|
||||
* @arg class HTB class to be modified.
|
||||
|
|
Loading…
Add table
Reference in a new issue