Versions in this module Expand all Collapse all v1 v1.0.0 Jun 25, 2023 Changes in this version + type AddressAttributes struct + Address net.IP + Anycast net.IP + Broadcast net.IP + CacheInfo CacheInfo + Flags uint32 + Label string + Local net.IP + Multicast net.IP + type AddressMessage struct + Attributes *AddressAttributes + Family uint8 + Flags uint8 + Index uint32 + PrefixLength uint8 + Scope uint8 + func (m *AddressMessage) MarshalBinary() ([]byte, error) + func (m *AddressMessage) UnmarshalBinary(b []byte) error + type AddressService struct + func (a *AddressService) Delete(req *AddressMessage) error + func (a *AddressService) List() ([]AddressMessage, error) + func (a *AddressService) New(req *AddressMessage) error + type CacheInfo struct + Created uint32 + Prefered uint32 + Updated uint32 + Valid uint32 + type Conn struct + Address *AddressService + Link *LinkService + Neigh *NeighService + Route *RouteService + Rule *RuleService + func Dial(config *netlink.Config) (*Conn, error) + func (c *Conn) Close() error + func (c *Conn) Execute(m Message, family uint16, flags netlink.HeaderFlags) ([]Message, error) + func (c *Conn) Receive() ([]Message, []netlink.Message, error) + func (c *Conn) Send(m Message, family uint16, flags netlink.HeaderFlags) (netlink.Message, error) + func (c *Conn) SetOption(option netlink.ConnOption, enable bool) error + func (c *Conn) SetReadDeadline(t time.Time) error + type LinkAttributes struct + Address net.HardwareAddr + Alias *string + Broadcast net.HardwareAddr + Carrier *uint8 + CarrierChanges *uint32 + CarrierDownCount *uint32 + CarrierUpCount *uint32 + Index *uint32 + Info *LinkInfo + LinkMode *uint8 + MTU uint32 + Master *uint32 + Name string + NetDevGroup *uint32 + OperationalState OperationalState + PhysPortID *string + PhysPortName *string + PhysSwitchID *string + ProtoDown *uint8 + QueueDisc string + Stats *LinkStats + Stats64 *LinkStats64 + TxQueueLen *uint32 + Type uint32 + XDP *LinkXDP + type LinkInfo struct + Data []byte + Kind string + SlaveData []byte + SlaveKind string + type LinkMessage struct + Attributes *LinkAttributes + Change uint32 + Family uint16 + Flags uint32 + Index uint32 + Type uint16 + func (m *LinkMessage) MarshalBinary() ([]byte, error) + func (m *LinkMessage) UnmarshalBinary(b []byte) error + type LinkService struct + func (l *LinkService) Delete(index uint32) error + func (l *LinkService) Get(index uint32) (LinkMessage, error) + func (l *LinkService) List() ([]LinkMessage, error) + func (l *LinkService) ListByKind(kind string) ([]LinkMessage, error) + func (l *LinkService) New(req *LinkMessage) error + func (l *LinkService) Set(req *LinkMessage) error + type LinkStats struct + Collisions uint32 + Multicast uint32 + RXBytes uint32 + RXCRCErrors uint32 + RXCompressed uint32 + RXDropped uint32 + RXErrors uint32 + RXFIFOErrors uint32 + RXFrameErrors uint32 + RXLengthErrors uint32 + RXMissedErrors uint32 + RXNoHandler uint32 + RXOverErrors uint32 + RXPackets uint32 + TXAbortedErrors uint32 + TXBytes uint32 + TXCarrierErrors uint32 + TXCompressed uint32 + TXDropped uint32 + TXErrors uint32 + TXFIFOErrors uint32 + TXHeartbeatErrors uint32 + TXPackets uint32 + TXWindowErrors uint32 + type LinkStats64 struct + Collisions uint64 + Multicast uint64 + RXBytes uint64 + RXCRCErrors uint64 + RXCompressed uint64 + RXDropped uint64 + RXErrors uint64 + RXFIFOErrors uint64 + RXFrameErrors uint64 + RXLengthErrors uint64 + RXMissedErrors uint64 + RXNoHandler uint64 + RXOtherhostDropped uint64 + RXOverErrors uint64 + RXPackets uint64 + TXAbortedErrors uint64 + TXBytes uint64 + TXCarrierErrors uint64 + TXCompressed uint64 + TXDropped uint64 + TXErrors uint64 + TXFIFOErrors uint64 + TXHeartbeatErrors uint64 + TXPackets uint64 + TXWindowErrors uint64 + type LinkXDP struct + Attached uint8 + ExpectedFD int32 + FD int32 + Flags uint32 + ProgID uint32 + type MPLSNextHop struct + BottomOfStack bool + Label int + TTL uint8 + TrafficClass int + type Message interface + type NeighAttributes struct + Address net.IP + CacheInfo *NeighCacheInfo + IfIndex uint32 + LLAddress net.HardwareAddr + type NeighCacheInfo struct + Confirmed uint32 + RefCount uint32 + Updated uint32 + Used uint32 + type NeighMessage struct + Attributes *NeighAttributes + Family uint16 + Flags uint8 + Index uint32 + State uint16 + Type uint8 + func (m *NeighMessage) MarshalBinary() ([]byte, error) + func (m *NeighMessage) UnmarshalBinary(b []byte) error + type NeighService struct + func (l *NeighService) Delete(index uint32) error + func (l *NeighService) List() ([]NeighMessage, error) + func (l *NeighService) New(req *NeighMessage) error + type NextHop struct + Gateway net.IP + Hop RTNextHop + MPLS []MPLSNextHop + type OperationalState uint8 + const OperStateDormant + const OperStateDown + const OperStateLowerLayerDown + const OperStateNotPresent + const OperStateTesting + const OperStateUnknown + const OperStateUp + type RTNextHop struct + Flags uint8 + Hops uint8 + IfIndex uint32 + Length uint16 + type RouteAttributes struct + Dst net.IP + Expires *uint32 + Gateway net.IP + Mark uint32 + Metrics *RouteMetrics + Multipath []NextHop + OutIface uint32 + Pref *uint8 + Priority uint32 + Src net.IP + Table uint32 + type RouteMessage struct + Attributes RouteAttributes + DstLength uint8 + Family uint8 + Flags uint32 + Protocol uint8 + Scope uint8 + SrcLength uint8 + Table uint8 + Tos uint8 + Type uint8 + func (m *RouteMessage) MarshalBinary() ([]byte, error) + func (m *RouteMessage) UnmarshalBinary(b []byte) error + type RouteMetrics struct + AdvMSS uint32 + Features uint32 + InitCwnd uint32 + InitRwnd uint32 + MTU uint32 + type RouteService struct + func (r *RouteService) Add(req *RouteMessage) error + func (r *RouteService) Delete(req *RouteMessage) error + func (r *RouteService) Get(req *RouteMessage) ([]RouteMessage, error) + func (r *RouteService) List() ([]RouteMessage, error) + func (r *RouteService) Replace(req *RouteMessage) error + type RuleAttributes struct + DPortRange *RulePortRange + Dst *net.IP + DstRealm *uint16 + FwMark *uint32 + FwMask *uint32 + Goto *uint32 + IIFName *string + IPProto *uint8 + L3MDev *uint8 + OIFName *string + Priority *uint32 + Protocol *uint8 + SPortRange *RulePortRange + Src *net.IP + SrcRealm *uint16 + SuppressIFGroup *uint32 + SuppressPrefixLen *uint32 + Table *uint32 + TunID *uint64 + UIDRange *RuleUIDRange + type RuleMessage struct + Action uint8 + Attributes *RuleAttributes + DstLength uint8 + Family uint8 + Flags uint32 + SrcLength uint8 + TOS uint8 + Table uint8 + func (m *RuleMessage) MarshalBinary() ([]byte, error) + func (m *RuleMessage) UnmarshalBinary(b []byte) error + type RulePortRange struct + End uint16 + Start uint16 + type RuleService struct + func (r *RuleService) Add(req *RuleMessage) error + func (r *RuleService) Delete(req *RuleMessage) error + func (r *RuleService) Get(req *RuleMessage) ([]RuleMessage, error) + func (r *RuleService) List() ([]RuleMessage, error) + func (r *RuleService) Replace(req *RuleMessage) error + type RuleUIDRange struct + End uint16 + Start uint16