safenetlink

package
v1.17.0-pre.2 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddrList

func AddrList(link netlink.Link, family int) ([]netlink.Addr, error)

AddrList wraps netlink.AddrList, but retries the call automatically if netlink.ErrDumpInterrupted is returned

func BridgeVlanList

func BridgeVlanList() (map[int32][]*nl.BridgeVlanInfo, error)

BridgeVlanList wraps netlink.BridgeVlanList, but retries the call automatically if netlink.ErrDumpInterrupted is returned

func ChainList

func ChainList(link netlink.Link, parent uint32) ([]netlink.Chain, error)

ChainList wraps netlink.ChainList, but retries the call automatically if netlink.ErrDumpInterrupted is returned

func ClassList

func ClassList(link netlink.Link, parent uint32) ([]netlink.Class, error)

ClassList wraps netlink.ClassList, but retries the call automatically if netlink.ErrDumpInterrupted is returned

func ConntrackTableList

func ConntrackTableList(table netlink.ConntrackTableType, family netlink.InetFamily) ([]*netlink.ConntrackFlow, error)

ConntrackTableList wraps netlink.ConntrackTableList, but retries the call automatically if netlink.ErrDumpInterrupted is returned

func DevLinkGetAllPortList

func DevLinkGetAllPortList() ([]*netlink.DevlinkPort, error)

DevLinkGetAllPortList wraps netlink.DevLinkGetAllPortList, but retries the call automatically if netlink.ErrDumpInterrupted is returned

func DevLinkGetDeviceList

func DevLinkGetDeviceList() ([]*netlink.DevlinkDevice, error)

DevLinkGetDeviceList wraps netlink.DevLinkGetDeviceList, but retries the call automatically if netlink.ErrDumpInterrupted is returned

func DevlinkGetDeviceParams

func DevlinkGetDeviceParams(bus string, device string) ([]*netlink.DevlinkParam, error)

DevlinkGetDeviceParams wraps netlink.DevlinkGetDeviceParams, but retries the call automatically if netlink.ErrDumpInterrupted is returned

func FilterList

func FilterList(link netlink.Link, parent uint32) ([]netlink.Filter, error)

FilterList wraps netlink.FilterList, but retries the call automatically if netlink.ErrDumpInterrupted is returned

func FouList

func FouList(fam int) ([]netlink.Fou, error)

FouList wraps netlink.FouList, but retries the call automatically if netlink.ErrDumpInterrupted is returned

func GTPPDPList

func GTPPDPList() ([]*netlink.PDP, error)

GTPPDPList wraps netlink.GTPPDPList, but retries the call automatically if netlink.ErrDumpInterrupted is returned

func GenlFamilyList

func GenlFamilyList() ([]*netlink.GenlFamily, error)

GenlFamilyList wraps netlink.GenlFamilyList, but retries the call automatically if netlink.ErrDumpInterrupted is returned

func LinkByAlias

func LinkByAlias(alias string) (netlink.Link, error)

LinkByAlias wraps netlink.LinkByAlias, but retries the call automatically if netlink.ErrDumpInterrupted is returned

func LinkByName

func LinkByName(name string) (netlink.Link, error)

LinkByName wraps netlink.LinkByName, but retries the call automatically if netlink.ErrDumpInterrupted is returned

func LinkGetProtinfo

func LinkGetProtinfo(link netlink.Link) (netlink.Protinfo, error)

LinkGetProtinfo wraps netlink.LinkGetProtinfo, but retries the call automatically if netlink.ErrDumpInterrupted is returned

func LinkList() ([]netlink.Link, error)

LinkList wraps netlink.LinkList, but retries the call automatically if netlink.ErrDumpInterrupted is returned

func LinkSubscribeWithOptions

func LinkSubscribeWithOptions(ch chan<- netlink.LinkUpdate, done <-chan struct{}, options netlink.LinkSubscribeOptions) error

LinkSubscribeWithOptions wraps netlink.LinkSubscribeWithOptions, but retries the call automatically if netlink.ErrDumpInterrupted is returned

func NeighList

func NeighList(linkIndex, family int) ([]netlink.Neigh, error)

NeighList wraps netlink.NeighList, but retries the call automatically if netlink.ErrDumpInterrupted is returned

func NeighListExecute

func NeighListExecute(msg netlink.Ndmsg) ([]netlink.Neigh, error)

NeighListExecute wraps netlink.NeighListExecute, but retries the call automatically if netlink.ErrDumpInterrupted is returned

func NeighProxyList

func NeighProxyList(linkIndex, family int) ([]netlink.Neigh, error)

NeighProxyList wraps netlink.NeighProxyList, but retries the call automatically if netlink.ErrDumpInterrupted is returned

func QdiscList

func QdiscList(link netlink.Link) ([]netlink.Qdisc, error)

QdiscList wraps netlink.QdiscList, but retries the call automatically if netlink.ErrDumpInterrupted is returned

func RdmaLinkByName

func RdmaLinkByName(name string) (*netlink.RdmaLink, error)

RdmaLinkByName wraps netlink.RdmaLinkByName, but retries the call automatically if netlink.ErrDumpInterrupted is returned

func RdmaLinkDel

func RdmaLinkDel(name string) error

RdmaLinkDel wraps netlink.RdmaLinkDel, but retries the call automatically if netlink.ErrDumpInterrupted is returned

func RdmaLinkList() ([]*netlink.RdmaLink, error)

RdmaLinkList wraps netlink.RdmaLinkList, but retries the call automatically if netlink.ErrDumpInterrupted is returned

func RouteList

func RouteList(link netlink.Link, family int) ([]netlink.Route, error)

RouteList wraps netlink.RouteList, but retries the call automatically if netlink.ErrDumpInterrupted is returned

func RouteListFiltered

func RouteListFiltered(family int, filter *netlink.Route, filterMask uint64) ([]netlink.Route, error)

RouteListFiltered wraps netlink.RouteListFiltered, but retries the call automatically if netlink.ErrDumpInterrupted is returned

func RouteListFilteredIter

func RouteListFilteredIter(family int, filter *netlink.Route, filterMask uint64, f func(netlink.Route) (cont bool)) error

RouteListFilteredIter wraps netlink.RouteListFilteredIter, but retries the call automatically if netlink.ErrDumpInterrupted is returned

func RouteSubscribeWithOptions

func RouteSubscribeWithOptions(ch chan<- netlink.RouteUpdate, done <-chan struct{}, options netlink.RouteSubscribeOptions) error

RouteSubscribeWithOptions wraps netlink.RouteSubscribeWithOptions, but retries the call automatically if netlink.ErrDumpInterrupted is returned

func RuleList

func RuleList(family int) ([]netlink.Rule, error)

RuleList wraps netlink.RuleList, but retries the call automatically if netlink.ErrDumpInterrupted is returned

func RuleListFiltered

func RuleListFiltered(family int, filter *netlink.Rule, filterMask uint64) ([]netlink.Rule, error)

RuleListFiltered wraps netlink.RuleListFiltered, but retries the call automatically if netlink.ErrDumpInterrupted is returned

func SocketDiagTCP

func SocketDiagTCP(family uint8) ([]*netlink.Socket, error)

SocketDiagTCP wraps netlink.SocketDiagTCP, but retries the call automatically if netlink.ErrDumpInterrupted is returned

func SocketDiagTCPInfo

func SocketDiagTCPInfo(family uint8) ([]*netlink.InetDiagTCPInfoResp, error)

SocketDiagTCPInfo wraps netlink.SocketDiagTCPInfo, but retries the call automatically if netlink.ErrDumpInterrupted is returned

func SocketDiagUDP

func SocketDiagUDP(family uint8) ([]*netlink.Socket, error)

SocketDiagUDP wraps netlink.SocketDiagUDP, but retries the call automatically if netlink.ErrDumpInterrupted is returned

func SocketDiagUDPInfo

func SocketDiagUDPInfo(family uint8) ([]*netlink.InetDiagUDPInfoResp, error)

SocketDiagUDPInfo wraps netlink.SocketDiagUDPInfo, but retries the call automatically if netlink.ErrDumpInterrupted is returned

func SocketDiagXDP

func SocketDiagXDP() ([]*netlink.XDPDiagInfoResp, error)

SocketDiagXDP wraps netlink.SocketDiagXDP, but retries the call automatically if netlink.ErrDumpInterrupted is returned

func SocketGet

func SocketGet(local, remote net.Addr) (*netlink.Socket, error)

SocketGet wraps netlink.SocketGet, but retries the call automatically if netlink.ErrDumpInterrupted is returned

func SocketXDPGetInfo

func SocketXDPGetInfo(ino uint32, cookie uint64) (*netlink.XDPDiagInfoResp, error)

SocketXDPGetInfo wraps netlink.SocketXDPGetInfo, but retries the call automatically if netlink.ErrDumpInterrupted is returned

func UnixSocketDiag

func UnixSocketDiag() ([]*netlink.UnixSocket, error)

UnixSocketDiag wraps netlink.UnixSocketDiag, but retries the call automatically if netlink.ErrDumpInterrupted is returned

func UnixSocketDiagInfo

func UnixSocketDiagInfo() ([]*netlink.UnixDiagInfoResp, error)

UnixSocketDiagInfo wraps netlink.UnixSocketDiagInfo, but retries the call automatically if netlink.ErrDumpInterrupted is returned

func VDPAGetDevConfigList

func VDPAGetDevConfigList() ([]*netlink.VDPADevConfig, error)

VDPAGetDevConfigList wraps netlink.VDPAGetDevConfigList, but retries the call automatically if netlink.ErrDumpInterrupted is returned

func VDPAGetDevList

func VDPAGetDevList() ([]*netlink.VDPADev, error)

VDPAGetDevList wraps netlink.VDPAGetDevList, but retries the call automatically if netlink.ErrDumpInterrupted is returned

func VDPAGetMGMTDevList

func VDPAGetMGMTDevList() ([]*netlink.VDPAMGMTDev, error)

VDPAGetMGMTDevList wraps netlink.VDPAGetMGMTDevList, but retries the call automatically if netlink.ErrDumpInterrupted is returned

func WithRetry

func WithRetry(netlinkFunc func() error) error

WithRetry runs the netlinkFunc. If netlinkFunc returns netlink.ErrDumpInterrupted, the function is retried. If success or any other error is returned, WithRetry returns immediately, propagating the error.

func WithRetryResult

func WithRetryResult[T any](netlinkFunc func() (T, error)) (out T, err error)

WithRetryResult works like WithRetry, but allows netlinkFunc to have a return value besides the error

func XfrmPolicyList

func XfrmPolicyList(family int) ([]netlink.XfrmPolicy, error)

XfrmPolicyList wraps netlink.XfrmPolicyList, but retries the call automatically if netlink.ErrDumpInterrupted is returned

func XfrmStateList

func XfrmStateList(family int) ([]netlink.XfrmState, error)

XfrmStateList wraps netlink.XfrmStateList, but retries the call automatically if netlink.ErrDumpInterrupted is returned

Types

This section is empty.

Jump to

Keyboard shortcuts

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