internal

package
v1.19.1 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2021 License: GPL-2.0, GPL-2.0-or-later Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MsgKindBreak                         = 0x0
	MsgKindLinkStat                      = 0x1
	MsgKindEthtoolStat                   = 0x2
	MsgKindEthtoolFlags                  = 0x3
	MsgKindEthtoolSettings               = 0x4
	MsgKindEthtoolLinkModesSupported     = 0x5
	MsgKindEthtoolLinkModesAdvertising   = 0x6
	MsgKindEthtoolLinkModesLPAdvertising = 0x7
	MsgKindDumpIfInfo                    = 0x8
	MsgKindCarrier                       = 0x9
	MsgKindSpeed                         = 0xa
	MsgKindIfInfo                        = 0xb
	MsgKindIfa                           = 0xc
	MsgKindIfa6                          = 0xd
	MsgKindDumpFibInfo                   = 0xe
	MsgKindFibEntry                      = 0xf
	MsgKindFib6Entry                     = 0x10
	MsgKindNeighUpdate                   = 0x11
	MsgKindChangeUpperXid                = 0x12
	MsgKindNetNsAdd                      = 0x13
	MsgKindNetNsDel                      = 0x14
)
View Source
const (
	SizeofMsg                 = 0x10
	SizeofMsgBreak            = 0x10
	SizeofMsgCarrier          = 0x18
	SizeofMsgChangeUpperXid   = 0x20
	SizeofMsgDumpFibInfo      = 0x10
	SizeofMsgDumpIfInfo       = 0x10
	SizeofMsgEthtoolFlags     = 0x18
	SizeofMsgEthtoolSettings  = 0x20
	SizeofMsgEthtoolLinkModes = 0x20
	SizeofMsgIfa              = 0x20
	SizeofMsgIfa6             = 0x30
	SizeofMsgIfInfo           = 0x48
	SizeofNextHop             = 0x18
	SizeofNextHop6            = 0x20
	SizeofMsgFibEntry         = 0x28
	SizeofMsgFib6Entry        = 0x50
	SizeofMsgNeighUpdate      = 0x38
	SizeofMsgNetNs            = 0x18
	SizeofMsgSpeed            = 0x18
	SizeofMsgStat             = 0x20
)
View Source
const (
	SizeofIfName     = 0x10
	SizeofEthAddr    = 0x6
	SizeofJumboFrame = 0x2600
)
View Source
const (
	NETDEV_UP = 1 + iota
	NETDEV_DOWN
	NETDEV_REBOOT
	NETDEV_CHANGE
	NETDEV_REGISTER
	NETDEV_UNREGISTER
	NETDEV_CHANGEMTU
	NETDEV_CHANGEADDR
	NETDEV_GOING_DOWN
	NETDEV_CHANGENAME
	NETDEV_FEAT_CHANGE
	NETDEV_BONDING_FAILOVER
	NETDEV_PRE_UP
	NETDEV_PRE_TYPE_CHANGE
	NETDEV_POST_TYPE_CHANGE
	NETDEV_POST_INIT
	NETDEV_UNREGISTER_FINAL
	NETDEV_RELEASE
	NETDEV_NOTIFY_PEERS
	NETDEV_JOIN
	NETDEV_CHANGEUPPER
	NETDEV_RESEND_IGMP
	NETDEV_PRECHANGEMTU
	NETDEV_CHANGEINFODATA
	NETDEV_BONDING_INFO
	NETDEV_PRECHANGEUPPER
	NETDEV_CHANGELOWERSTATE
	NETDEV_UDP_TUNNEL_PUSH_INFO
	NETDEV_CHANGE_TX_QUEUE_LEN
)
View Source
const (
	IfInfoReasonNew      = 0x0
	IfInfoReasonDel      = 0x1
	IfInfoReasonUp       = 0x2
	IfInfoReasonDown     = 0x3
	IfInfoReasonDump     = 0x4
	IfInfoReasonReg      = 0x5
	IfInfoReasonUnreg    = 0x6
	IfInfoReasonFeatures = 0x7
)
View Source
const (
	CarrierOff = 0x0
	CarrierOn  = 0x1
)
View Source
const (
	IFA_ADD = NETDEV_UP
	IFA_DEL = NETDEV_DOWN
)
View Source
const MsgVersion = 0x2

Variables

This section is empty.

Functions

This section is empty.

Types

type MsgBreak

type MsgBreak struct {
	Header MsgHeader
}

type MsgCarrier

type MsgCarrier struct {
	Header MsgHeader
	Xid    uint32
	Flag   uint8
	Pad    [3]uint8
}

type MsgChangeUpperXid

type MsgChangeUpperXid struct {
	Header  MsgHeader
	Upper   uint32
	Lower   uint32
	Linking uint8
	Pad     [7]uint8
}

type MsgEthtoolFlags

type MsgEthtoolFlags struct {
	Header MsgHeader
	Xid    uint32
	Flags  uint32
}

type MsgEthtoolLinkModes

type MsgEthtoolLinkModes struct {
	Header   MsgHeader
	Xid      uint32
	Reserved uint32
	Modes    uint64
}

type MsgEthtoolSettings

type MsgEthtoolSettings struct {
	Header           MsgHeader
	Xid              uint32
	Speed            uint32
	Duplex           uint8
	Port             uint8
	Phy_address      uint8
	Autoneg          uint8
	Mdio_support     uint8
	Eth_tp_mdix      uint8
	Eth_tp_mdix_ctrl uint8
	Pad              uint8
}

type MsgFib6Entry

type MsgFib6Entry struct {
	Header    MsgHeader
	Net       uint64
	Address   [16]uint8
	Length    uint8
	Event     uint8
	Nsiblings uint8
	Type      uint8
	Table     uint32
	Nh        NextHop6
}

func (*MsgFib6Entry) Siblings

func (msg *MsgFib6Entry) Siblings() []NextHop6

type MsgFibEntry

type MsgFibEntry struct {
	Header  MsgHeader
	Net     uint64
	Address uint32
	Mask    uint32
	Event   uint8
	Nhs     uint8
	Tos     uint8
	Type    uint8
	Table   uint32
}

func (*MsgFibEntry) NextHops

func (msg *MsgFibEntry) NextHops() []NextHop

type MsgHeader

type MsgHeader struct {
	Z64     uint64
	Z32     uint32
	Z16     uint16
	Version uint8
	Kind    uint8
}

func (*MsgHeader) Set

func (h *MsgHeader) Set(kind uint8)

func (*MsgHeader) Validate

func (h *MsgHeader) Validate(buf []byte) error

type MsgIfInfo

type MsgIfInfo struct {
	Header   MsgHeader
	Xid      uint32
	Kdata    uint32
	Ifname   [16]uint8
	Net      uint64
	Ifindex  int32
	Flags    uint32
	Addr     [6]uint8
	Kind     uint8
	Reason   uint8
	Features uint64
}

type MsgIfa

type MsgIfa struct {
	Header  MsgHeader
	Xid     uint32
	Event   uint32
	Address uint32
	Mask    uint32
}

type MsgIfa6

type MsgIfa6 struct {
	Header  MsgHeader
	Xid     uint32
	Event   uint32
	Address [16]uint8
	Length  uint8
	Pad     [7]uint8
}

type MsgKind

type MsgKind uint8

type MsgNeighUpdate

type MsgNeighUpdate struct {
	Header   MsgHeader
	Net      uint64
	Ifindex  int32
	Family   uint8
	Len      uint8
	Reserved uint16
	Dst      [16]uint8
	Lladdr   [6]uint8
	Pad      [2]uint8
}

type MsgNetNs

type MsgNetNs struct {
	Header MsgHeader
	Net    uint64
}

type MsgSpeed

type MsgSpeed struct {
	Header MsgHeader
	Xid    uint32
	Mbps   uint32
}

type MsgStat

type MsgStat struct {
	Header MsgHeader
	Xid    uint32
	Index  uint32
	Count  uint64
}

type NextHop

type NextHop struct {
	Ifindex int32
	Weight  int32
	Flags   uint32
	Gw      uint32
	Scope   uint8
	Pad     [7]uint8
}

type NextHop6

type NextHop6 struct {
	Ifindex  int32
	Weight   int32
	Flags    uint32
	Reserved uint32
	Gw       [16]uint8
}

Jump to

Keyboard shortcuts

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