Skip to main content

Crate rtnetlink

Crate rtnetlink 

Source
Expand description

This crate provides methods to manipulate networking resources (links, addresses, arp tables, route tables) via the netlink protocol.

Re-exports§

pub use netlink_packet_core as packet_core;
pub use netlink_packet_route as packet_route;
pub use netlink_proto as proto;
pub use netlink_sys as sys;

Modules§

constants

Macros§

try_nl
try_rtnl

Structs§

AddressAddRequest
A request to create a new address. This is equivalent to the ip address add commands.
AddressDelRequest
AddressGetRequest
AddressHandle
AddressMessageBuilder
Helper struct for building AddressMessage.
AfstatsRequest
Handle
LinkAddRequest
A request to create a new link. This is equivalent to the ip link add commands.
LinkAmt
Represent AMT (Automatic Multicast Tunneling) interface. Example code on creating an AMT interface
LinkAssignNsidHandle
Request to assign a new nsid to a network namespace.
LinkBareudp
Represent BareUDP interface.
LinkBatAdv
Represent batadv interface.
LinkBond
Represent bond interface. Example code on creating a bond interface
LinkBondPort
LinkBridge
Represent Linux Bridge interface. Example code on creating a linux bridge interface
LinkBridgePort
LinkBridgeVlan
LinkCan
Represent CAN (Controller Area Network) interface.
LinkDelPropRequest
LinkDelRequest
LinkDsa
Represent DSA interface. Example code on creating a DSA interface
LinkDummy
Represent dummy interface. Example code on creating a dummy interface
LinkGeneve
Represent GENEVE interface. Example code on creating a GENEVE interface
LinkGetNsidHandle
Request to resolve a network namespace name to its nsid.
LinkGetRequest
LinkGre
Represent GRE/Gretap interface (IPv4).
LinkGre6
Represent IP6GRE/IP6Gretap interface (IPv6).
LinkGtp
Represent GTP interface. Example code on creating a GTP interface
LinkHandle
LinkHsr
Represent HSR (High-availability Seamless Redundancy) interface.
LinkIfb
Represent ifb interface. Example code on creating a ifb interface
LinkIp6Tnl
Represent IP6TNL interface. Example code on creating a IP6TNL interface
LinkIpIp
Represent IPIP interface. Example code on creating a IPIP interface
LinkIpVlan
Represent IPVLAN interface.
LinkIpVtap
Represent IPVTAP interface.
LinkIpoib
Represent IPoIB (IP over InfiniBand) interface. Example code on creating an IPoIB interface
LinkMacSec
Represent MACsec interface. Example code on creating a MACsec interface
LinkMacVlan
Represent MAC VLAN interface. Example code on creating a MAC VLAN interface
LinkMacVtap
Represent MAC VTAP interface. Example code on creating a MAC VTAP interface
LinkMessageBuilder
Helper struct for building LinkMessage. The LinkMessageBuilder is designed for advanced user, wrapper structs/functions are created
LinkNetdevsim
Represent netdevsim interface. Example code on creating a netdevsim interface
LinkNetkit
Represent netkit virtual interface. Netkit devices are used for container networking and BPF programs.
LinkNlmon
Represent nlmon interface. Example code on creating a nlmon interface
LinkPfcp
Represent PFCP interface. Example code on creating a PFCP interface
LinkRmNet
Represent rmnet interface. Example code on creating a rmnet interface. The link (parent device) is required for the rmnet interface.
LinkSetRequest
LinkSit
Represent SIT interface. Example code on creating a SIT interface
LinkTeam
Represent team interface. Example code on creating a team interface
LinkTun
Represent TUN/TAP interface. Example code on creating a TUN interface
LinkUnspec
Generic interface without interface type Could be used to match interface by interface name or index. Example on attaching a interface to controller
LinkVcan
Represent vcan interface. Example code on creating a vcan interface
LinkVeth
Represent virtual ethernet interface. Example code on creating a veth pair
LinkVirtWifi
Represent virt_wifi interface. Example code on creating a virt_wifi interface
LinkVlan
Represent VLAN interface. Example code on creating a VLAN interface
LinkVrf
Represent VRF interface. Example code on creating a VRF interface
LinkVti
LinkVti6
LinkVxcan
Represent virtual can interface. Example code on creating a vxcan pair
LinkVxlan
Represent VxLAN interface. Example code on creating a VxLAN interface
LinkWireguard
Represent wireguard interface. Example code on creating a wireguard interface
LinkWwan
Represent wwan interface. Example code on creating a wwan interface. The parentdev is required to specify the parent device for the wwan interface.
LinkXfrm
Represent XFRM interface. Example code on creating a XFRM interface
NeighbourAddRequest
NeighbourDelRequest
NeighbourGetRequest
NeighbourHandle
NetworkNamespace
QDiscDelRequest
QDiscGetRequest
QDiscHandle
QDiscNewRequest
QosMapping
A quality-of-service mapping between the internal priority from to the external vlan priority to.
RouteAddRequest
A request to create a new route. This is equivalent to the ip route add commands.
RouteDelRequest
RouteGetRequest
RouteHandle
RouteMessageBuilder
RouteNextHopBuilder
RuleAddRequest
A request to create a new rule. This is equivalent to the ip rule add command.
RuleDelRequest
RuleGetRequest
RuleHandle
TrafficChainGetRequest
TrafficChainHandle
TrafficClassGetRequest
TrafficClassHandle
TrafficFilterGetRequest
TrafficFilterHandle
TrafficFilterNewRequest

Enums§

Error
IpVersion
Internet Protocol (IP) version.
MulticastGroup

Constants§

NETNS_PATH
NONE_FS
SELF_NS_PATH

Functions§

from_socket
new_connection
new_connection_with_socket
new_multicast_connection
Equal to ip monitor command
new_multicast_connection_with_socket
Equal to ip monitor command