Documentation ¶
Index ¶
- Constants
- func AddIFAddr(addr *net.IPNet, ifname string) error
- func DelDummyRoute(dst *net.IPNet, ifname string) error
- func DelIFAddr(addr *net.IPNet, ifname string) error
- func FdbSysfsPath(ifname string) string
- func GetNetlinkAddrs() ([][]byte, error)
- func GetNetlinkLinks() ([][]byte, error)
- func GetNetlinkNeighs() ([][]byte, error)
- func GetNetlinkRoutes() ([][]byte, error)
- func HexSlice(bs []byte) []string
- func Hexdump(bs []byte) string
- func IpToString(ip net.IP) string
- func IsInvalidHardwareAddr(hwaddr net.HardwareAddr) bool
- func NewClientConn(addr string, ch chan<- *ConnInfo) (*grpc.ClientConn, error)
- func NewConnStatsHandler(ch chan<- *ConnInfo) stats.Handler
- func NewDummyRoute(dst *net.IPNet, ifname string) (*netlink.Route, error)
- func NewFDBEntry(hwaddr net.HardwareAddr, index int, vid uint16, flags int, state int) *netlink.Neigh
- func NewIPNetFromIP(ip net.IP) *net.IPNet
- func NewLinkAndAddr(addr *net.IPNet, ifname string) (netlink.Link, *netlink.Addr, error)
- func NewNetlinkMessage(t uint16, data []byte) *syscall.NetlinkMessage
- func NewNlMsghdr(t uint16, length uint32) syscall.NlMsghdr
- func NewNodeIdFromIF(ifname string) (uint8, error)
- func NewNodeIdFromIP(ip net.IP) uint8
- func ParseBridgeVlanInfoFlags(s string) (uint16, error)
- func SetDummyRoute(dst *net.IPNet, ifname string) error
- func StringBridgeVlanInfoFlags(flags uint16) string
- type ConnInfo
- type ConnStatsHandler
- func (h *ConnStatsHandler) HandleConn(ctxt context.Context, st stats.ConnStats)
- func (h *ConnStatsHandler) HandleRPC(ctxt context.Context, st stats.RPCStats)
- func (h *ConnStatsHandler) TagConn(ctxt context.Context, info *stats.ConnTagInfo) context.Context
- func (h *ConnStatsHandler) TagRPC(ctxt context.Context, info *stats.RPCTagInfo) context.Context
- type Counter16
- type Counter32
- type Counters16
- type Counters32
- type FdbEntry
- type Queue
Constants ¶
View Source
const ( INVALID_HARDWAREADDR = "00:00:00:00:00:00" EMPTY_HARDWAREADDR = "" )
View Source
const COUNTERS_MAX = 256
View Source
const (
FDB_SYSFS_CLASS_NET = "/sys/class/net"
)
View Source
const (
QUEUE_INVALID = -1
)
Variables ¶
This section is empty.
Functions ¶
func FdbSysfsPath ¶ added in v0.2.0
func GetNetlinkAddrs ¶
func GetNetlinkLinks ¶
func GetNetlinkNeighs ¶
func GetNetlinkRoutes ¶
func IpToString ¶ added in v0.2.0
func IsInvalidHardwareAddr ¶
func IsInvalidHardwareAddr(hwaddr net.HardwareAddr) bool
func NewClientConn ¶
func NewClientConn(addr string, ch chan<- *ConnInfo) (*grpc.ClientConn, error)
func NewConnStatsHandler ¶
func NewFDBEntry ¶ added in v0.4.0
func NewLinkAndAddr ¶
func NewNetlinkMessage ¶
func NewNetlinkMessage(t uint16, data []byte) *syscall.NetlinkMessage
func NewNodeIdFromIF ¶ added in v0.2.0
func NewNodeIdFromIP ¶ added in v0.2.0
func ParseBridgeVlanInfoFlags ¶ added in v0.4.0
func StringBridgeVlanInfoFlags ¶ added in v0.4.0
Types ¶
type ConnStatsHandler ¶
type ConnStatsHandler struct {
// contains filtered or unexported fields
}
func (*ConnStatsHandler) HandleConn ¶
func (h *ConnStatsHandler) HandleConn(ctxt context.Context, st stats.ConnStats)
func (*ConnStatsHandler) HandleRPC ¶
func (h *ConnStatsHandler) HandleRPC(ctxt context.Context, st stats.RPCStats)
func (*ConnStatsHandler) TagConn ¶
func (h *ConnStatsHandler) TagConn(ctxt context.Context, info *stats.ConnTagInfo) context.Context
func (*ConnStatsHandler) TagRPC ¶
func (h *ConnStatsHandler) TagRPC(ctxt context.Context, info *stats.RPCTagInfo) context.Context
type Counters16 ¶
type Counters16 struct {
Counters [COUNTERS_MAX]Counter16
}
func NewCounters16 ¶
func NewCounters16() *Counters16
func (*Counters16) Next ¶
func (c *Counters16) Next(index uint8) uint16
type Counters32 ¶
type Counters32 struct {
Counters [COUNTERS_MAX]Counter32
}
func NewCounters32 ¶
func NewCounters32() *Counters32
func (*Counters32) Next ¶
func (c *Counters32) Next(index uint8) uint32
type FdbEntry ¶ added in v0.2.0
type FdbEntry struct { MacAddr [6]byte PortNo uint8 Local uint8 AgeingTimer uint32 PortHi uint8 Pad0 uint8 Unused uint16 }
func (*FdbEntry) HardwareAddr ¶ added in v0.2.0
func (e *FdbEntry) HardwareAddr() net.HardwareAddr
Source Files ¶
Click to show internal directories.
Click to hide internal directories.