tc

package
v1.8.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contain added in v1.4.0

func Contain(keys []netlink.TcU32Key, subKeys []netlink.TcU32Key) bool

func FilterBySrcIP added in v1.3.0

func FilterBySrcIP(link netlink.Link, parent uint32, ipNet *net.IPNet) (*netlink.U32, error)

FilterBySrcIP found u32 filter by pod ip used for prio only

func MatchSrc added in v1.3.0

func MatchSrc(u32 *netlink.U32, ipNet *net.IPNet)

MatchSrc add match for source ip

func SetRule

func SetRule(dev netlink.Link, rule *TrafficShapingRule) error

SetRule set the traffic rule on interface

func U32IPv4Src added in v1.3.0

func U32IPv4Src(ipNet *net.IPNet) netlink.TcU32Key

func U32IPv6Src added in v1.3.0

func U32IPv6Src(ipNet *net.IPNet) []netlink.TcU32Key

func U32MatchSrc added in v1.3.0

func U32MatchSrc(ipNet *net.IPNet) []netlink.TcU32Key

U32MatchSrc return u32 match key by src ip

Types

type TrafficShapingRule added in v1.1.0

type TrafficShapingRule struct {
	// rate in bytes
	Rate uint64
}

TrafficShapingRule the interface traffic shaping rule

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL