AddrAdd will add an IP address to a link device.
AddrDel will delete an IP address from a link device.
AddrList gets a list of IP addresses in the system.
AddrReplace will replace (or, if not present, add) an IP address on a link device.
AddrSubscribe takes a chan down which notifications will be sent when addresses change.
AddrSubscribeAt works like AddrSubscribe plus it allows the caller to choose the network namespace in which to subscribe (ns).
AddrSubscribeWithOptions work like AddrSubscribe but enable to provide additional options to modify the behavior.
BridgeVlanAdd adds a new vlan filter entry Equivalent to: `bridge vlan add dev DEV vid VID [ pvid ] [ untagged ] [ self ] [ master ]`.
BridgeVlanAddRange adds a new vlan filter entry Equivalent to: `bridge vlan add dev DEV vid VID-VIDEND [ pvid ] [ untagged ] [ self ] [ master ]`.
BridgeVlanDel adds a new vlan filter entry Equivalent to: `bridge vlan del dev DEV vid VID [ pvid ] [ untagged ] [ self ] [ master ]`.
BridgeVlanDelRange adds a new vlan filter entry Equivalent to: `bridge vlan del dev DEV vid VID-VIDEND [ pvid ] [ untagged ] [ self ] [ master ]`.
BridgeVlanList gets a map of device id to bridge vlan infos.
ChainAdd will add a chain to the system.
ChainDel will delete a chain from the system.
ChainList gets a list of chains in the system.
ClassAdd will add a class to the system.
ClassChange will change a class in place Equivalent to: `tc class change $class` The parent and handle MUST NOT be changed.
ClassDel will delete a class from the system.
ClassList gets a list of classes in the system.
ClassReplace will replace a class to the system.
ConntrackCreate creates a new conntrack flow in the desired table conntrack -I [table] Create a conntrack or expectation.
ConntrackDeleteFilter deletes entries on the specified table on the base of the filter conntrack -D [table] parameters Delete conntrack or expectation
Deprecated: use [ConntrackDeleteFilter] instead.
ConntrackDeleteFilters deletes entries on the specified table matching any of the specified filters conntrack -D [table] parameters Delete conntrack or expectation.
ConntrackTableFlush flushes all the flows of a specified table conntrack -F [table] Flush table The flush operation applies to all the family types.
ConntrackTableList returns the flow list of a table of a specific family conntrack -L [table] [options] List conntrack or expectation table.
ConntrackUpdate updates an existing conntrack flow in the desired table using the handle conntrack -U [table] Update a conntrack.
DevLinkGetPortList provides a pointer to devlink ports and nil error, otherwise returns an error code.
DevlinkGetDeviceByName provides a pointer to devlink device and nil error, otherwise returns an error code.
DevlinkGetDeviceInfoByName returns devlink info for selected device, otherwise returns an error code.
DevlinkGetDeviceInfoByNameAsMap returns devlink info for selected device as a map, otherwise returns an error code.
DevLinkGetDeviceList provides a pointer to devlink devices and nil error, otherwise returns an error code.
DevlinkGetDeviceParamByName returns specific parameter for devlink device Equivalent to: `devlink dev param show <bus>/<device> name <param>`.
DevlinkGetDeviceParams returns parameters for devlink device Equivalent to: `devlink dev param show <bus>/<device>`.
DevlinkGetDeviceResources returns devlink device resources.
DevLinkGetPortByIndex provides a pointer to devlink portand nil error, otherwise returns an error code.
DevLinkPortAdd adds a devlink port and returns a port on success otherwise returns nil port and an error code.
DevLinkPortDel deletes a devlink port and returns success or error code.
DevlinkPortFnSet sets one or more port function attributes specified by the attribute mask.
DevlinkSetDeviceParam set specific parameter for devlink device Equivalent to: `devlink dev param set <bus>/<device> name <param> cmode <cmode> value <value>` cmode argument should contain valid cmode value as uint8, modes are define in nl.DEVLINK_PARAM_CMODE_* constants value argument should have one of the following types: uint8, uint16, uint32, string, bool.
DevLinkSetEswitchMode sets eswitch mode if able to set successfully or returns an error code.
FilterAdd will add a filter to the system.
FilterDel will delete a filter from the system.
FilterList gets a list of filters in the system.
FilterReplace will replace a filter.
GetNetNsIdByFd looks up the network namespace ID for a given fd.
GetNetNsIdByPid looks up the network namespace ID for a given pid (really thread id).
GetSocketTimeout returns the timeout value used by default netlink sockets.
IpsetAdd adds an entry to an existing ipset.
IpsetCreate creates a new ipset.
IpsetDel deletes an entry from an existing ipset.
IpsetDestroy destroys an existing ipset.
IpsetFlush flushes an existing ipset.
IpsetList dumps an specific ipset.
IpsetListAll dumps all ipsets.
IpsetProtocol returns the ipset protocol version from the kernel.
IpsetSwap swaps two ipsets.
IpsetTest tests whether an entry is in a set or not.
IsBitSet check if specific bit is set in the uint64 input value usage example: hasNetClass := IsBitSet(mgmtDev, VIRTIO_ID_NET).
LinkAdd adds a new link device.
LinkAddAltName adds a new alternative name for the link device.
LinkByAlias finds a link by its alias and returns a pointer to the object.
LinkByIndex finds a link by index and returns a pointer to the object.
LinkByName finds a link by name and returns a pointer to the object.
LinkDel deletes link device.
LinkDelAltName delete an alternative name for the link device.
LinkSetBondSlave removes specified slave from bond link via ioctl interface.
LinkDeserialize deserializes a raw message received from netlink into a link object.
LinkList gets a list of link devices.
LinkSetAlias sets the alias of the link device.
LinkSetAllmulticastOff disables the reception of all hardware multicast packets for the link device.
LinkSetAllmulticastOn enables the reception of all hardware multicast packets for the link device.
LinkSetBondSlave add slave to bond link via ioctl interface.
LinkSetBondSlaveActive sets specified slave to ACTIVE in an `active-backup` bond link via ioctl interface.
LinkSetBondSlaveQueueId modify bond slave queue-id.
LinkSetBRSlaveGroupFwdMask set the group_fwd_mask of a bridge slave interface.
LinkSetDown disables link device.
LinkSetGROIPv4MaxSize sets the IPv4 GRO maximum size of the link device.
LinkSetGROMaxSize sets the IPv6 GRO maximum size of the link device.
LinkSetGroup sets the link group id which can be used to perform mass actions with iproute2 as well use it as a reference in nft filters.
LinkSetGSOIPv4MaxSize sets the IPv4 GSO maximum size of the link device.
LinkSetGSOMaxSegs sets the GSO maximum segment count of the link device.
LinkSetGSOMaxSize sets the IPv6 GSO maximum size of the link device.
LinkSetHardwareAddr sets the hardware address of the link device.
LinkSetMacvlanMode sets the mode of a macvlan or macvtap link device.
LinkSetMaster sets the master of the link device.
LinkSetMasterByIndex sets the master of the link device.
LinkSetMTU sets the mtu of the link device.
LinkSetAllmulticastOff disables the reception of multicast packets for the link device.
LinkSetMulticastOn enables the reception of multicast packets for the link device.
LinkSetName sets the name of the link device.
LinkSetNoMaster removes the master of the link device.
LinkSetNsFd puts the device into a new network namespace.
LinkSetNsPid puts the device into a new network namespace.
LinkSetTxQLen sets the transaction queue length for the link.
LinkSetUp enables the link device.
LinkSetVfHardwareAddr sets the hardware address of a vf for the link.
LinkSetVfNodeGUID sets the node GUID of a vf for the link.
LinkSetVfPortGUID sets the port GUID of a vf for the link.
LinkSetVfRate sets the min and max tx rate of a vf for the link.
LinkSetVfSpoofchk enables/disables spoof check on a vf for the link.
LinkSetVfState enables/disables virtual link state on a vf.
LinkSetVfTrust enables/disables trust state on a vf for the link.
LinkSetVfTxRate sets the tx rate of a vf for the link.
LinkSetVfVlan sets the vlan of a vf for the link.
LinkSetVfVlanQos sets the vlan and qos priority of a vf for the link.
LinkSetVfVlanQosProto sets the vlan, qos and protocol of a vf for the link.
LinkSetXdpFd adds a bpf function to the driver.
LinkSetXdpFdWithFlags adds a bpf function to the driver with the given options.
LinkSubscribe takes a chan down which notifications will be sent when links change.
LinkSubscribeAt works like LinkSubscribe plus it allows the caller to choose the network namespace in which to subscribe (ns).
LinkSubscribeWithOptions work like LinkSubscribe but enable to provide additional options to modify the behavior.
NeighAdd will add an IP to MAC mapping to the ARP table Equivalent to: `ip neigh add ....`.
NeighAppend will append an entry to FDB Equivalent to: `bridge fdb append...`.
NeighDel will delete an IP address from a link device.
NeighList returns a list of IP-MAC mappings in the system (ARP table).
NeighListExecute returns a list of neighbour entries filtered by link, ip family, flag and state.
NeighProxyList returns a list of neighbor proxies in the system.
NeighSet will add or replace an IP to MAC mapping to the ARP table Equivalent to: `ip neigh replace....`.
NeighSubscribe takes a chan down which notifications will be sent when neighbors are added or deleted.
NeighSubscribeAt works like NeighSubscribe plus it allows the caller to choose the network namespace in which to subscribe (ns).
NeighSubscribeWithOptions work like NeighSubscribe but enable to provide additional options to modify the behavior.
NewClassStatistics Construct a ClassStatistics struct which fields are all initialized by 0.
NewHandle returns a netlink handle on the current network namespace.
NewHandleAt returns a netlink handle on the network namespace specified by ns.
NewHandleAtFrom works as NewHandle but allows client to specify the new and the origin netns Handle.
NewHfscClass returns a new HFSC struct with the set parameters.
NewHtbClass NOTE: function is in here because it uses other linux functions.
NewIPNet generates an IPNet from an ip address using a netmask of 32 or 128.
NewLinkAttrs returns LinkAttrs structure filled with default values.
NOTE function is here because it uses other linux functions.
NewRule return empty rules.
NewRulePortRange creates rule sport/dport range.
NewRuleUIDRange creates rule uid range.
ParseAddr parses the string representation of an address in the form $ip/$netmask $label.
ParseIPNet parses a string in ip/net format and returns a net.IPNet.
QdiscAdd will add a qdisc to the system.
QdiscChange will change a qdisc in place Equivalent to: `tc qdisc change $qdisc` The parent and handle MUST NOT be changed.
QdiscDel will delete a qdisc from the system.
QdiscList gets a list of qdiscs in the system.
QdiscReplace will replace a qdisc to the system.
RdmaLinkAdd adds an rdma link for the specified type to the network device.
RdmaLinkByName finds a link by name and returns a pointer to the object if found and nil error, otherwise returns error code.
RdmaLinkDel deletes an rdma link
Similar to: rdma link delete NAME REF: https://man7.org/linux/man-pages/man8/rdma-link.8.html.
RdmaLinkList gets a list of RDMA link devices.
RdmaLinkSetName sets the name of the rdma link device.
RdmaLinkSetNsFd puts the RDMA device into a new network namespace.
RdmaSystemGetNetnsMode gets the net namespace mode for RDMA subsystem Returns mode string and error status as nil on success or returns error otherwise.
RdmaSystemSetNetnsMode sets the net namespace mode for RDMA subsystem Returns nil on success or appropriate error code.
RouteAdd will add a route to the system.
RouteAddEcmp will add a route to the system.
RouteAppend will append a route to the system.
RouteChange will change an existing route in the system.
RouteDel will delete a route from the system.
RouteGet gets a route to a specific destination from the host system.
RouteGetWithOptions gets a route to a specific destination from the host system.
RouteList gets a list of routes in the system.
RouteListFiltered gets a list of routes in the system filtered with specified rules.
RouteListFilteredIter passes each route that matches the filter to the given iterator func.
RouteReplace will add a route to the system.
RouteSubscribe takes a chan down which notifications will be sent when routes are added or deleted.
RouteSubscribeAt works like RouteSubscribe plus it allows the caller to choose the network namespace in which to subscribe (ns).
RouteSubscribeWithOptions work like RouteSubscribe but enable to provide additional options to modify the behavior.
RuleAdd adds a rule to the system.
RuleDel deletes a rule from the system.
RuleList lists rules in the system.
RuleListFiltered gets a list of rules in the system filtered by the specified rule template `filter`.
SetBits set provided bits in the uint64 input value usage example: features := SetBits(0, VIRTIO_NET_F_MTU, VIRTIO_NET_F_CTRL_MAC_ADDR).
SetNetNSIdByFd sets the ID of the network namespace for a given fd.
SetNetNSIdByPid sets the ID of the network namespace for a given pid (really thread id).
SetSocketTimeout configures timeout for default netlink sockets.
SocketDestroy kills the Socket identified by its local and remote addresses.
SocketDiagTCP requests INET_DIAG_INFO for TCP protocol for specified family type and return related socket.
SocketDiagTCPInfo requests INET_DIAG_INFO for TCP protocol for specified family type and return with extension TCP info.
SocketDiagUDP requests INET_DIAG_INFO for UDP protocol for specified family type and return related socket.
SocketDiagUDPInfo requests INET_DIAG_INFO for UDP protocol for specified family type and return with extension info.
SocketDiagXDP requests XDP_DIAG_INFO for XDP family sockets.
SocketGet returns the Socket identified by its local and remote addresses.
XDPSocketGet returns the XDP socket identified by its inode number and/or socket cookie.
StringToBondLacpRate returns bond lacp arte, or unknown is the s is invalid.
StringToBondMode returns bond mode, or unknown is the s is invalid.
StringToBondXmitHashPolicy returns bond lacp arte, or unknown is the s is invalid.
StringToVlanProtocol returns vlan protocol, or unknown is the s is invalid.
UnixSocketDiag requests UNIX_DIAG_INFO for unix sockets.
UnixSocketDiagInfo requests UNIX_DIAG_INFO for unix sockets and return with extension info.
VDPADelDev removes VDPA device Equivalent to: `vdpa dev del <name>`.
VDPAGetDevByName returns VDPA device selected by name Equivalent to: `vdpa dev show <name>`.
VDPAGetDevConfigByName returns VDPA device configuration selected by name Equivalent to: `vdpa dev config show <name>`.
VDPAGetDevConfigList returns list of VDPA devices configurations Equivalent to: `vdpa dev config show`.
VDPAGetDevList returns list of VDPA devices Equivalent to: `vdpa dev show`.
VDPAGetDevVStats returns vstats for VDPA device Equivalent to: `vdpa dev vstats show <name> qidx <queueIndex>`.
VDPAGetMGMTDevByBusAndName returns mgmt devices selected by bus and name Equivalent to: `vdpa mgmtdev show <bus>/<name>`.
VDPAGetMGMTDevList returns list of mgmt devices Equivalent to: `vdpa mgmtdev show`.
VDPANewDev adds new VDPA device Equivalent to: `vdpa dev add name <name> mgmtdev <mgmtBus>/mgmtName [params]`.
VethPeerIndex get veth peer index.
XfrmPolicyAdd will add an xfrm policy to the system.
XfrmPolicyDel will delete an xfrm policy from the system.
XfrmPolicyFlush will flush the policies on the system.
XfrmPolicyGet gets a the policy described by the index or selector, if found.
XfrmPolicyList gets a list of xfrm policies in the system.
XfrmPolicyUpdate will update an xfrm policy to the system.
XfrmStateAdd will add an xfrm state to the system.
XfrmStateAllocSpi will allocate an xfrm state in the system.
XfrmStateDel will delete an xfrm state from the system.
XfrmStateFlush will flush the xfrm state on the system.
XfrmStateGet gets the xfrm state described by the ID, if found.
XfrmStateList gets a list of xfrm states in the system.
XfrmStateUpdate will update an xfrm state to the system.