Documentation
¶
Overview ¶
Package tc allows to show and alter traffic control settings in the Linux kernel.
Traffic control is composed of the elements shaping, scheduling, policing and dropping. This processing is controlled by qdiscs, classes and filters.
For a more detailed introduction of these elements, please have a look at http://man7.org/linux/man-pages/man8/tc.8.html.
Example (CBPF) ¶
This example demonstrate the use with classic BPF
package main
import (
"fmt"
"net"
"os"
"github.com/florianl/go-tc"
"golang.org/x/sys/unix"
)
func main() {
// open a rtnetlink socket
rtnl, err := tc.Open(&tc.Config{})
if err != nil {
fmt.Fprintf(os.Stderr, "could not open rtnetlink socket: %v\n", err)
return
}
defer func() {
if err := rtnl.Close(); err != nil {
fmt.Fprintf(os.Stderr, "could not close rtnetlink socket: %v\n", err)
}
}()
devID, err := net.InterfaceByName("lo")
if err != nil {
fmt.Fprintf(os.Stderr, "could not get interface ID: %v\n", err)
return
}
qdisc := tc.Object{
tc.Msg{
Family: unix.AF_UNSPEC,
Ifindex: uint32(devID.Index),
Handle: tc.BuildHandle(0xFFFF, 0x0000),
Parent: 0xFFFFFFF1,
Info: 0,
},
tc.Attribute{
Kind: "clsact",
},
}
if err := rtnl.Qdisc().Add(&qdisc); err != nil {
fmt.Fprintf(os.Stderr, "could not assign clsact to lo: %v\n", err)
return
}
// when deleting the qdisc, the applied filter will also be gone
defer rtnl.Qdisc().Delete(&qdisc)
filter := tc.Object{
tc.Msg{
Family: unix.AF_UNSPEC,
Ifindex: uint32(devID.Index),
Handle: 0,
Parent: tc.Ingress,
Info: 0x300,
},
tc.Attribute{
Kind: "bpf",
BPF: &tc.Bpf{
Ops: []byte{0x6, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff},
OpsLen: 0x1,
ClassID: 0x10001,
Flags: 0x1,
},
},
}
if err := rtnl.Filter().Add(&filter); err != nil {
fmt.Fprintf(os.Stderr, "could not assign cBPF: %v\n", err)
return
}
}
Output:
Index ¶
- Constants
- Variables
- func BuildHandle(major, minor uint16) uint32
- type ActBpf
- type ActBpfParms
- type Action
- type Atm
- type AtmPvc
- type Attribute
- type Basic
- type Bpf
- type Cbq
- type CbqFOpt
- type CbqLssOpt
- type CbqOvl
- type CbqPolice
- type CbqWrrOpt
- type CbqXStats
- type Choke
- type ChokeXStats
- type Class
- type Codel
- type CodelXStats
- type Config
- type Connmark
- type ConnmarkParam
- type Cookie
- type Csum
- type CsumParms
- type Defact
- type DefactParms
- type Drr
- type Dsmark
- type FifoOpt
- type Filter
- type Flow
- type Fq
- type FqCodel
- type FqCodelClStats
- type FqCodelQdStats
- type FqCodelXStats
- type Fw
- type GenStatsBasic
- type GenStatsQueue
- type GenStatsRateEst
- type GenStatsRateEst64
- type Hfsc
- type Hhf
- type HhfXStats
- type HookFunc
- type Htb
- type HtbGlob
- type HtbOpt
- type HtbXStats
- type Ife
- type IfeParms
- type Ipt
- type IptCnt
- type Mirred
- type MirredParam
- type MqPrio
- type Msg
- type Nat
- type NatParms
- type Object
- type Pie
- type PieXStats
- type Police
- type Policy
- type Qdisc
- type Qfq
- type RateSpec
- type Red
- type RedQOpt
- type RedXStats
- type Route4
- type Rsvp
- type RsvpGpi
- type RsvpPInfo
- type Sample
- type SampleParms
- type ServiceCurve
- type Sfb
- type SfbQopt
- type SfbXStats
- type SfqXStats
- type Stats
- type Stats2
- type Tbf
- type TbfQopt
- type Tc
- type Tcft
- type U32
- type U32Key
- type U32Mark
- type U32Sel
- type VLan
- type VLanParms
- type XStats
Examples ¶
Constants ¶
const ( // Ingress and Egress can be used as value in Msg.Parent Ingress = 0xFFFFFFF2 Egress = 0xFFFFFFF3 // To alter filter in shared blocks, set Msg.Ifindex to MagicBlock MagicBlock = 0xFFFFFFFF )
Constants to define the direction
Variables ¶
var ( ErrNotImplemented = errors.New("functionality not yet implemented") ErrNoArg = errors.New("missing argument") ErrNoArgAlter = errors.New("argument cannot be altered") ErrNotLinux = errors.New("not implemented for OS other than linux") )
Various errors
Functions ¶
func BuildHandle ¶
BuildHandle is a simple helper function to construct the handle for the Tcmsg struct
Types ¶
type ActBpf ¶
type ActBpf struct {
Tm *Tcft
Parms *ActBpfParms
Ops []byte
OpsLen uint16
FD uint32
Name string
Tag []byte
ID uint32
}
ActBpf represents policing attributes of various filters and classes
type ActBpfParms ¶
ActBpfParms from include/uapi/linux/tc_act/tc_bpf.h
type Action ¶
type Action struct {
Kind string
Index uint32
Stats interface{}
Cookie *Cookie
Bpf *ActBpf
ConnMark *Connmark
CSum *Csum
Defact *Defact
Ife *Ife
Ipt *Ipt
Mirred *Mirred
Nat *Nat
Sample *Sample
VLan *VLan
Police *Police
}
Action represents action attributes of various filters and classes
type Attribute ¶
type Attribute struct {
Kind string
EgressBlock uint32
IngressBlock uint32
HwOffload uint8
Chain uint32
Stats *Stats
XStats *XStats
Stats2 *Stats2
// Filters
Basic *Basic
BPF *Bpf
U32 *U32
Rsvp *Rsvp
Route4 *Route4
Fw *Fw
Flow *Flow
// Classless qdiscs
FqCodel *FqCodel
Codel *Codel
Fq *Fq
Pie *Pie
Hhf *Hhf
Tbf *Tbf
Sfb *Sfb
Red *Red
MqPrio *MqPrio
Pfifo *FifoOpt
Bfifo *FifoOpt
Choke *Choke
// Classful qdiscs
Htb *Htb
Hfsc *Hfsc
Dsmark *Dsmark
Drr *Drr
Cbq *Cbq
Atm *Atm
Qfq *Qfq
}
Attribute contains various elements for traffic control
type Bpf ¶
type Bpf struct {
Action *Action
Police *Police
ClassID uint32
OpsLen uint16
Ops []byte
FD uint32
Name string
Flags uint32
FlagsGen uint32
Tag []byte
ID uint32
}
Bpf contains attributes of the bpf discipline
type Cbq ¶
type Cbq struct {
LssOpt *CbqLssOpt
WrrOpt *CbqWrrOpt
FOpt *CbqFOpt
OVLStrategy *CbqOvl
Rate *RateSpec
RTab []byte
Police *CbqPolice
}
Cbq contains attributes of the cbq discipline
type CbqLssOpt ¶
type CbqLssOpt struct {
Change byte
Flags byte
EwmaLog byte
Level byte
Maxidle uint32
Minidle uint32
OffTime uint32
Avpkt uint32
}
CbqLssOpt from include/uapi/linux/pkt_sched.h
type CbqWrrOpt ¶
type CbqWrrOpt struct {
Flags byte
Priority byte
CPriority byte
Reserved byte
Allot uint32
Weight uint32
}
CbqWrrOpt from include/uapi/linux/pkt_sched.h
type ChokeXStats ¶
ChokeXStats from from include/uapi/linux/pkt_sched.h
type CodelXStats ¶
type CodelXStats struct {
MaxPacket uint32
Count uint32
LastCount uint32
LDelay uint32
DropNext int32
DropOverlimit uint32
EcnMark uint32
Dropping uint32
CeMark uint32
}
CodelXStats from from include/uapi/linux/pkt_sched.h
type Config ¶
type Config struct {
// NetNS defines the network namespace
NetNS int
}
Config contains options for RTNETLINK
type Connmark ¶
type Connmark struct {
Parms *ConnmarkParam
Tm *Tcft
}
Connmark represents policing attributes of various filters and classes
type ConnmarkParam ¶
type ConnmarkParam struct {
Index uint32
Capab uint32
Action uint32
RefCnt uint32
BindCnt uint32
Zone uint16
}
ConnmarkParam from include/uapi/linux/tc_act/tc_connmark.h
type CsumParms ¶
type CsumParms struct {
Index uint32
Capab uint32
Action uint32
RefCnt uint32
BindCnt uint32
UpdateFlags uint32
}
CsumParms from include/uapi/linux/tc_act/tc_csum.h
type Defact ¶
type Defact struct {
Parms *DefactParms
Tm *Tcft
Data *string
}
Defact contains attributes of the defact discipline
type DefactParms ¶
DefactParms from include/uapi/linux/tc_act/tc_defact.h
type FifoOpt ¶
type FifoOpt struct {
Limit uint32
}
FifoOpt from from include/uapi/linux/pkt_sched.h
type Flow ¶
type Flow struct {
Keys uint32
Mode uint32
BaseClass uint32
RShift uint32
Addend uint32
Mask uint32
XOR uint32
Divisor uint32
PerTurb uint32
}
Flow contains attributes of the flow discipline
type Fq ¶
type Fq struct {
PLimit uint32
FlowPLimit uint32
Quantum uint32
InitQuantum uint32
RateEnable uint32
FlowDefaultRate uint32
FlowMaxRate uint32
BucketsLog uint32
FlowRefillDelay uint32
OrphanMask uint32
LowRateThreshold uint32
CEThreshold uint32
}
Fq contains attributes of the fq discipline
type FqCodel ¶
type FqCodel struct {
Target uint32
Limit uint32
Interval uint32
ECN uint32
Flows uint32
Quantum uint32
CEThreshold uint32
DropBatchSize uint32
MemoryLimit uint32
}
FqCodel contains attributes of the fq_codel discipline
type FqCodelClStats ¶
type FqCodelClStats struct {
Deficit int32
LDelay uint32
Count uint32
LastCount uint32
Dropping uint32
DropNext int32
}
FqCodelClStats from from include/uapi/linux/pkt_sched.h
type FqCodelQdStats ¶
type FqCodelQdStats struct {
MaxPacket uint32
DropOverlimit uint32
EcnMark uint32
NewFlowCount uint32
NewFlowsLen uint32
OldFlowsLen uint32
CeMark uint32
MemoryUsage uint32
DropOvermemory uint32
}
FqCodelQdStats from from include/uapi/linux/pkt_sched.h
type FqCodelXStats ¶
type FqCodelXStats struct {
Type uint32
Qd *FqCodelQdStats
Cl *FqCodelClStats
}
FqCodelXStats from from include/uapi/linux/pkt_sched.h
type GenStatsBasic ¶
GenStatsBasic from include/uapi/linux/gen_stats.h
type GenStatsQueue ¶
type GenStatsQueue struct {
QueueLen uint32
Backlog uint32
Drops uint32
Requeues uint32
Overlimits uint32
}
GenStatsQueue from include/uapi/linux/gen_stats.h
type GenStatsRateEst ¶
GenStatsRateEst from include/uapi/linux/gen_stats.h
type GenStatsRateEst64 ¶
GenStatsRateEst64 from include/uapi/linux/gen_stats.h
type Hfsc ¶
type Hfsc struct {
Rsc *ServiceCurve
Fsc *ServiceCurve
Usc *ServiceCurve
}
Hfsc contains attributes of the hfsc discipline
type Hhf ¶
type Hhf struct {
BacklogLimit uint32
Quantum uint32
HHFlowsLimit uint32
ResetTimeout uint32
AdmitBytes uint32
EVICTTimeout uint32
NonHHWeight uint32
}
Hhf contains attributes of the hhf discipline
type HhfXStats ¶
type HhfXStats struct {
DropOverlimit uint32
HhOverlimit uint32
HhTotCount uint32
HhCurCount uint32
}
HhfXStats from from include/uapi/linux/pkt_sched.h
type HookFunc ¶
HookFunc is a function, which is called for each altered RTNETLINK Object. Return something different than 0, to stop receiving messages. action will have the value of unix.RTM_[NEW|GET|DEL][QDISC|TCLASS|FILTER].
type Htb ¶
type Htb struct {
Parms *HtbOpt
Init *HtbGlob
Ctab []byte
Rtab []byte
DirectQlen uint32
Rate64 uint64
Ceil64 uint64
}
Htb contains attributes of the HTB discipline
type HtbGlob ¶
type HtbGlob struct {
Version uint32
Rate2Quantum uint32
Defcls uint32
Debug uint32
DirectPkts uint32
}
HtbGlob from include/uapi/linux/pkt_sched.h
type HtbOpt ¶
type HtbOpt struct {
Rate RateSpec
Ceil RateSpec
Buffer uint32
Cbuffer uint32
Quantum uint32
Level uint32
Prio uint32
}
HtbOpt from include/uapi/linux/pkt_sched.h
type IfeParms ¶
type IfeParms struct {
Index uint32
Capab uint32
Action uint32
RefCnt uint32
BindCnt uint32
Flags uint16
}
IfeParms from from include/uapi/linux/tc_act/tc_ife.h
type Mirred ¶
type Mirred struct {
Parms *MirredParam
Tm *Tcft
}
Mirred represents policing attributes of various filters and classes
type MirredParam ¶
type MirredParam struct {
Index uint32
Capab uint32
Action uint32
RefCnt uint32
BindCnt uint32
Eaction uint32
IfIndex uint32
}
MirredParam from include/uapi/linux/tc_act/tc_mirred.h
type NatParms ¶
type NatParms struct {
Index uint32
Capab uint32
Action uint32
RefCnt uint32
BindCnt uint32
OldAddr uint32
NewAddr uint32
Mask uint32
Flags uint32
}
NatParms from from include/uapi/linux/tc_act/tc_nat.h
type Pie ¶
type Pie struct {
Target uint32
Limit uint32
TUpdate uint32
Alpha uint32
Beta uint32
ECN uint32
Bytemode uint32
}
Pie contains attributes of the pie discipline
type PieXStats ¶
type PieXStats struct {
Prob uint64
Delay uint32
AvgDqRate uint32
PacketsIn uint32
Dropped uint32
Overlimit uint32
Maxq uint32
EcnMark uint32
}
PieXStats from from include/uapi/linux/pkt_sched.h
type Police ¶
type Police struct {
Tbf *Policy
Rate *RateSpec
PeakRate *RateSpec
AvRate uint32
Result uint32
Tm *Tcft
}
Police represents policing attributes of various filters and classes
type Policy ¶
type Policy struct {
Index uint32
Action uint32
Limit uint32
Burst uint32
Mtu uint32
Rate RateSpec
PeakRage RateSpec
RefCnt uint32
BindCnt uint32
Capab uint32
}
Policy from from include/uapi/linux/pkt_sched.h
type Qdisc ¶
type Qdisc struct {
Tc
}
Qdisc represents the queueing discipline part of traffic control
Example ¶
This example demonstraces how to add a qdisc to an interface and delete it again
package main
import (
"fmt"
"net"
"os"
"github.com/florianl/go-tc"
"golang.org/x/sys/unix"
)
func main() {
// open a rtnetlink socket
rtnl, err := tc.Open(&tc.Config{})
if err != nil {
fmt.Fprintf(os.Stderr, "could not open rtnetlink socket: %v\n", err)
return
}
defer func() {
if err := rtnl.Close(); err != nil {
fmt.Fprintf(os.Stderr, "could not close rtnetlink socket: %v\n", err)
}
}()
devID, err := net.InterfaceByName("lo")
if err != nil {
fmt.Fprintf(os.Stderr, "could not get interface ID: %v\n", err)
return
}
qdisc := tc.Object{
tc.Msg{
Family: unix.AF_UNSPEC,
Ifindex: uint32(devID.Index),
Handle: tc.BuildHandle(0xFFFF, 0x0000),
Parent: 0xFFFFFFF1,
Info: 0,
},
tc.Attribute{
Kind: "clsact",
},
}
if err := rtnl.Qdisc().Add(&qdisc); err != nil {
fmt.Fprintf(os.Stderr, "could not assign clsact to lo: %v\n", err)
return
}
if err := rtnl.Qdisc().Delete(&qdisc); err != nil {
fmt.Fprintf(os.Stderr, "could not delete clsact qdisc from lo: %v\n", err)
return
}
}
Output:
func (*Qdisc) Get ¶
Get fetches all queueing disciplines
Example ¶
This example demonstrate how Get() can get used to read information
package main
import (
"fmt"
"net"
"os"
"github.com/florianl/go-tc"
)
func main() {
// open a rtnetlink socket
rtnl, err := tc.Open(&tc.Config{})
if err != nil {
fmt.Fprintf(os.Stderr, "could not open rtnetlink socket: %v\n", err)
return
}
defer func() {
if err := rtnl.Close(); err != nil {
fmt.Fprintf(os.Stderr, "could not close rtnetlink socket: %v\n", err)
}
}()
qdiscs, err := rtnl.Qdisc().Get()
if err != nil {
fmt.Fprintf(os.Stderr, "could not get qdiscs: %v\n", err)
return
}
for _, qdisc := range qdiscs {
iface, err := net.InterfaceByIndex(int(qdisc.Ifindex))
if err != nil {
fmt.Fprintf(os.Stderr, "could not get interface from id %d: %v", qdisc.Ifindex, err)
return
}
fmt.Printf("%20s\t%s\n", iface.Name, qdisc.Kind)
}
}
Output:
type RateSpec ¶
type RateSpec struct {
CellLog uint8
Linklayer uint8
Overhead uint16
CellAlign uint16
Mpu uint16
Rate uint32
}
RateSpec from from include/uapi/linux/pkt_sched.h
type RedQOpt ¶
type RedQOpt struct {
Limit uint32
QthMin uint32
QthMax uint32
Wlog byte
Plog byte
ScellLog byte
Flags byte
}
RedQOpt from include/uapi/linux/pkt_sched.h
type RsvpPInfo ¶
type RsvpPInfo struct {
Dpi RsvpGpi
Spi RsvpGpi
Protocol uint8
TunnelID uint8
TunnelHdr uint8
Pad uint8
}
RsvpPInfo from include/uapi/linux/pkt_sched.h
type Sample ¶
type Sample struct {
Parms *SampleParms
Tm *Tcft
Rate *uint32
TruncSize *uint32
SampleGroup *uint32
}
Sample contains attribute of the Sample discipline
type SampleParms ¶
SampleParms from from include/uapi/linux/tc_act/tc_sample.h
type ServiceCurve ¶
ServiceCurve from include/uapi/linux/pkt_sched.h
type SfbQopt ¶
type SfbQopt struct {
RehashInterval uint32 // in ms
WarmupTime uint32 // in ms
Max uint32
BinSize uint32
Increment uint32
Decrement uint32
Limit uint32
PenaltyRate uint32
PenaltyBurst uint32
}
SfbQopt from include/uapi/linux/pkt_sched.h
type SfbXStats ¶
type SfbXStats struct {
EarlyDrop uint32
PenaltyDrop uint32
BucketDrop uint32
QueueDrop uint32
ChildDrop uint32
Marked uint32
MaxQlen uint32
MaxProb uint32
AvgProb uint32
}
SfbXStats from from include/uapi/linux/pkt_sched.h
type SfqXStats ¶
type SfqXStats struct {
Allot int32
}
SfqXStats from from include/uapi/linux/pkt_sched.h
type Stats ¶
type Stats struct {
Bytes uint64 /* Number of enqueued bytes */
Packets uint32 /* Number of enqueued packets */
Drops uint32 /* Packets dropped because of lack of resources */
Overlimits uint32 /* Number of throttle events when this
* flow goes out of allocated bandwidth */
Bps uint32 /* Current flow byte rate */
Pps uint32 /* Current flow packet rate */
Qlen uint32
Backlog uint32
}
Stats from include/uapi/linux/pkt_sched.h
type Stats2 ¶
type Stats2 struct {
// gnet_stats_basic
Bytes uint64
Packets uint32
//gnet_stats_queue
Qlen uint32
Backlog uint32
Drops uint32
Requeues uint32
Overlimits uint32
}
Stats2 from include/uapi/linux/pkt_sched.h
type Tbf ¶
type Tbf struct {
Parms *TbfQopt
Rtab []byte
Ptab []byte
Rate64 uint64
Prate64 uint64
Burst uint32
Pburst uint32
}
Tbf contains attributes of the TBF discipline
type Tc ¶
type Tc struct {
// contains filtered or unexported fields
}
Tc represents a RTNETLINK wrapper
func (*Tc) Monitor ¶
Monitor NETLINK_ROUTE messages
Example ¶
This example demonstrates how Monitor() can be used
package main
import (
"context"
"fmt"
"time"
"github.com/florianl/go-tc"
)
func main() {
tcSocket, err := tc.Open(&tc.Config{})
if err != nil {
fmt.Printf("could not open socket for TC: %v", err)
return
}
defer func() {
if err := tcSocket.Close(); err != nil {
fmt.Printf("coult not close TC socket: %v", err)
return
}
}()
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
// Hook function mon, which is called every time,
// something is received by the kernel on this socket
mon := func(action uint16, m tc.Object) int {
fmt.Printf("Action:\t%d\nObject: \t%#v\n", action, m)
return 0
}
tcSocket.Monitor(ctx, 10*time.Millisecond, mon)
<-ctx.Done()
}
Output:
type U32 ¶
type U32 struct {
ClassID uint32
Hash uint32
Link uint32
Divisor uint32
Sel *U32Sel
InDev string
Pcnt uint64
Mark *U32Mark
Flags uint32
Police *Police
}
U32 contains attributes of the u32 discipline
Example ¶
package main
import (
"fmt"
"net"
"os"
"github.com/florianl/go-tc"
"golang.org/x/sys/unix"
)
func main() {
// example from http://man7.org/linux/man-pages/man8/tc-police.8.html
rtnl, err := tc.Open(&tc.Config{})
if err != nil {
fmt.Fprintf(os.Stderr, "could not open rtnetlink socket: %v\n", err)
return
}
defer func() {
if err := rtnl.Close(); err != nil {
fmt.Fprintf(os.Stderr, "could not close rtnetlink socket: %v\n", err)
}
}()
devID, err := net.InterfaceByName("lo")
if err != nil {
fmt.Fprintf(os.Stderr, "could not get interface ID: %v\n", err)
return
}
qdisc := tc.Object{
tc.Msg{
Family: unix.AF_UNSPEC,
Ifindex: uint32(devID.Index),
Handle: 0,
Parent: 0xFFFF0000,
Info: 768,
},
tc.Attribute{
Kind: "u32",
U32: &tc.U32{
Sel: &tc.U32Sel{
Flags: 0x1,
NKeys: 0x3,
Keys: []tc.U32Key{
// match ip protocol 6 0xff
{Mask: 0xff0000, Val: 0x60000, Off: 0x800, OffMask: 0x0},
{Mask: 0xff000f00, Val: 0x5c0, Off: 0x0, OffMask: 0x0},
{Mask: 0xff0000, Val: 0x100000, Off: 0x2000, OffMask: 0x0},
},
},
Police: &tc.Police{
Tbf: &tc.Policy{
Action: 0x1,
Burst: 0xc35000,
Rate: tc.RateSpec{
CellLog: 0x3,
Linklayer: 0x1,
CellAlign: 0xffff,
Rate: 0x1e848,
},
},
},
},
},
}
if err := rtnl.Qdisc().Add(&qdisc); err != nil {
fmt.Fprintf(os.Stderr, "could not assign clsact to lo: %v\n", err)
return
}
// when deleting the qdisc, the applied filter will also be gone
defer rtnl.Qdisc().Delete(&qdisc)
filter := tc.Object{
tc.Msg{
Family: unix.AF_UNSPEC,
Ifindex: uint32(devID.Index),
Handle: 0,
Parent: tc.Ingress,
Info: 0x300,
},
tc.Attribute{
Kind: "bpf",
BPF: &tc.Bpf{
Ops: []byte{0x6, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff},
OpsLen: 0x1,
ClassID: 0x10001,
Flags: 0x1,
},
},
}
if err := rtnl.Filter().Add(&filter); err != nil {
fmt.Fprintf(os.Stderr, "could not assign cBPF: %v\n", err)
return
}
}
Output:
type U32Sel ¶
type U32Sel struct {
Flags uint8
Offshift uint8
NKeys uint8
OffMask uint16
Off uint16
Offoff uint16
Hoff uint16
Hmask uint32
Keys []U32Key
}
U32Sel from include/uapi/linux/pkt_sched.h
type VLan ¶
type VLan struct {
Parms *VLanParms
Tm *Tcft
PushID *uint16
PushProtocol *uint16
PushPriority *uint32
}
VLan contains attribute of the VLan discipline
type VLanParms ¶
type VLanParms struct {
Index uint32
Capab uint32
Action uint32
RefCnt uint32
BindCnt uint32
VLanAction uint32
}
VLanParms from from include/uapi/linux/tc_act/tc_vlan.h
type XStats ¶
type XStats struct {
Sfb *SfbXStats
Sfq *SfqXStats
Red *RedXStats
Choke *ChokeXStats
Htb *HtbXStats
Cbq *CbqXStats
Codel *CodelXStats
Hhf *HhfXStats
Pie *PieXStats
FqCodel *FqCodelXStats
}
XStats contains further statistics to the TCA_KIND
Source Files
¶
- attributeTcMsg.go
- class.go
- doc.go
- f_basic.go
- f_bpf.go
- f_flow.go
- f_fw.go
- f_route4.go
- f_rsvp.go
- f_u32.go
- filter.go
- m_action.go
- m_bpf.go
- m_connmark.go
- m_csum.go
- m_defact.go
- m_ife.go
- m_ipt.go
- m_mirred.go
- m_nat.go
- m_police.go
- m_sample.go
- m_vlan.go
- nest.go
- q_atm.go
- q_cbq.go
- q_choke.go
- q_codel.go
- q_drr.go
- q_dsmark.go
- q_fq.go
- q_fqCodel.go
- q_hfsc.go
- q_hhf.go
- q_htb.go
- q_mqPrio.go
- q_pie.go
- q_qfq.go
- q_red.go
- q_sfb.go
- q_tbf.go
- qdisc.go
- structs.go
- tc.go
- tc_linux.go
- types.go