func (hfsc *HfscClass) SetLS(m1 uint32, d uint32, m2 uint32) {
	hfsc.Fsc = ServiceCurve{m1: m1 / 8, d: d, m2: m2 / 8}
}
SetLS implements the LS from the tc CLI
package netlink
import (
	"fmt"
)
type Class interface {
	Attrs() *ClassAttrs
	Type() string
}
type GnetStatsBasic struct {
	Bytes   uint64  
	Packets uint32  
}
type GnetStatsRateEst struct {
	Bps uint32  
	Pps uint32  
}
type GnetStatsRateEst64 struct {
	Bps uint64  
	Pps uint64  
}
type GnetStatsQueue struct {
	Qlen       uint32  
	Backlog    uint32  
	Drops      uint32  
	Requeues   uint32  
	Overlimits uint32  
}
type ClassStatistics struct {
	Basic   *GnetStatsBasic
	Queue   *GnetStatsQueue
	RateEst *GnetStatsRateEst
}
func NewClassStatistics() *ClassStatistics {
	return &ClassStatistics{
		Basic:   &GnetStatsBasic{},
		Queue:   &GnetStatsQueue{},
		RateEst: &GnetStatsRateEst{},
	}
}
type ClassAttrs struct {
	LinkIndex  int
	Handle     uint32
	Parent     uint32
	Leaf       uint32
	Statistics *ClassStatistics
}
func (q ClassAttrs) String() string {
	return fmt.Sprintf("{LinkIndex: %d, Handle: %s, Parent: %s, Leaf: %d}", q.LinkIndex, HandleStr(q.Handle), HandleStr(q.Parent), q.Leaf)
}
type HtbClassAttrs struct {
	Rate    uint64
	Ceil    uint64
	Buffer  uint32
	Cbuffer uint32
	Quantum uint32
	Level   uint32
	Prio    uint32
}
func (q HtbClassAttrs) String() string {
	return fmt.Sprintf("{Rate: %d, Ceil: %d, Buffer: %d, Cbuffer: %d}", q.Rate, q.Ceil, q.Buffer, q.Cbuffer)
}
type HtbClass struct {
	ClassAttrs
	Rate    uint64
	Ceil    uint64
	Buffer  uint32
	Cbuffer uint32
	Quantum uint32
	Level   uint32
	Prio    uint32
}
func (q HtbClass) String() string {
	return fmt.Sprintf("{Rate: %d, Ceil: %d, Buffer: %d, Cbuffer: %d}", q.Rate, q.Ceil, q.Buffer, q.Cbuffer)
}
func (q *HtbClass) Attrs() *ClassAttrs {
	return &q.ClassAttrs
}
func (q *HtbClass) Type() string {
	return "htb"
}
type GenericClass struct {
	ClassAttrs
	ClassType string
}
func (class *GenericClass) Attrs() *ClassAttrs {
	return &class.ClassAttrs
}
func (class *GenericClass) Type() string {
	return class.ClassType
}
type ServiceCurve struct {
	m1 uint32
	d  uint32
	m2 uint32
}
func (c *ServiceCurve) Attrs() (uint32, uint32, uint32) {
	return c.m1, c.d, c.m2
}
type HfscClass struct {
	ClassAttrs
	Rsc ServiceCurve
	Fsc ServiceCurve
	Usc ServiceCurve
}
func (hfsc *HfscClass) SetUsc(m1 uint32, d uint32, m2 uint32) {
	hfsc.Usc = ServiceCurve{m1: m1 / 8, d: d, m2: m2 / 8}
}
func (hfsc *HfscClass) SetFsc(m1 uint32, d uint32, m2 uint32) {
	hfsc.Fsc = ServiceCurve{m1: m1 / 8, d: d, m2: m2 / 8}
}
func (hfsc *HfscClass) SetRsc(m1 uint32, d uint32, m2 uint32) {
	hfsc.Rsc = ServiceCurve{m1: m1 / 8, d: d, m2: m2 / 8}
}
func (hfsc *HfscClass) SetSC(m1 uint32, d uint32, m2 uint32) {
	hfsc.Rsc = ServiceCurve{m1: m1 / 8, d: d, m2: m2 / 8}
	hfsc.Fsc = ServiceCurve{m1: m1 / 8, d: d, m2: m2 / 8}
}
func (hfsc *HfscClass) SetUL(m1 uint32, d uint32, m2 uint32) {
	hfsc.Usc = ServiceCurve{m1: m1 / 8, d: d, m2: m2 / 8}
}