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§
Macros§
Structs§
- Address
AddRequest - A request to create a new address. This is equivalent to the
ip address addcommands. - Address
DelRequest - Address
GetRequest - Address
Handle - Address
Message Builder - Helper struct for building AddressMessage.
- Afstats
Request - Handle
- Link
AddRequest - A request to create a new link. This is equivalent to the
ip link addcommands. - LinkAmt
- Represent AMT (Automatic Multicast Tunneling) interface. Example code on creating an AMT interface
- Link
Assign Nsid Handle - Request to assign a new nsid to a network namespace.
- Link
Bareudp - Represent BareUDP interface.
- Link
BatAdv - Represent batadv interface.
- Link
Bond - Represent bond interface. Example code on creating a bond interface
- Link
Bond Port - Link
Bridge - Represent Linux Bridge interface. Example code on creating a linux bridge interface
- Link
Bridge Port - Link
Bridge Vlan - LinkCan
- Represent CAN (Controller Area Network) interface.
- Link
DelProp Request - Link
DelRequest - LinkDsa
- Represent DSA interface. Example code on creating a DSA interface
- Link
Dummy - Represent dummy interface. Example code on creating a dummy interface
- Link
Geneve - Represent GENEVE interface. Example code on creating a GENEVE interface
- Link
GetNsid Handle - Request to resolve a network namespace name to its nsid.
- Link
GetRequest - LinkGre
- Represent GRE/Gretap interface (IPv4).
- Link
Gre6 - Represent IP6GRE/IP6Gretap interface (IPv6).
- LinkGtp
- Represent GTP interface. Example code on creating a GTP interface
- Link
Handle - LinkHsr
- Represent HSR (High-availability Seamless Redundancy) interface.
- LinkIfb
- Represent ifb interface. Example code on creating a ifb interface
- Link
Ip6Tnl - Represent IP6TNL interface. Example code on creating a IP6TNL interface
- Link
IpIp - Represent IPIP interface. Example code on creating a IPIP interface
- Link
IpVlan - Represent IPVLAN interface.
- Link
IpVtap - Represent IPVTAP interface.
- Link
Ipoib - Represent IPoIB (IP over InfiniBand) interface. Example code on creating an IPoIB interface
- Link
MacSec - Represent MACsec interface. Example code on creating a MACsec interface
- Link
MacVlan - Represent MAC VLAN interface. Example code on creating a MAC VLAN interface
- Link
MacVtap - Represent MAC VTAP interface. Example code on creating a MAC VTAP interface
- Link
Message Builder - Helper struct for building LinkMessage. The LinkMessageBuilder is designed for advanced user, wrapper structs/functions are created
- Link
Netdevsim - Represent netdevsim interface. Example code on creating a netdevsim interface
- Link
Netkit - Represent netkit virtual interface. Netkit devices are used for container networking and BPF programs.
- Link
Nlmon - Represent nlmon interface. Example code on creating a nlmon interface
- Link
Pfcp - Represent PFCP interface. Example code on creating a PFCP interface
- Link
RmNet - Represent rmnet interface.
Example code on creating a rmnet interface.
The
link(parent device) is required for the rmnet interface. - Link
SetRequest - LinkSit
- Represent SIT interface. Example code on creating a SIT interface
- Link
Team - Represent team interface. Example code on creating a team interface
- LinkTun
- Represent TUN/TAP interface. Example code on creating a TUN interface
- Link
Unspec - Generic interface without interface type Could be used to match interface by interface name or index. Example on attaching a interface to controller
- Link
Vcan - Represent vcan interface. Example code on creating a vcan interface
- Link
Veth - Represent virtual ethernet interface. Example code on creating a veth pair
- Link
Virt Wifi - Represent virt_wifi interface. Example code on creating a virt_wifi interface
- Link
Vlan - Represent VLAN interface. Example code on creating a VLAN interface
- LinkVrf
- Represent VRF interface. Example code on creating a VRF interface
- LinkVti
- Link
Vti6 - Link
Vxcan - Represent virtual can interface. Example code on creating a vxcan pair
- Link
Vxlan - Represent VxLAN interface. Example code on creating a VxLAN interface
- Link
Wireguard - Represent wireguard interface. Example code on creating a wireguard interface
- Link
Wwan - Represent wwan interface.
Example code on creating a wwan interface.
The
parentdevis required to specify the parent device for the wwan interface. - Link
Xfrm - Represent XFRM interface. Example code on creating a XFRM interface
- Neighbour
AddRequest - Neighbour
DelRequest - Neighbour
GetRequest - Neighbour
Handle - Network
Namespace - QDisc
DelRequest - QDisc
GetRequest - QDisc
Handle - QDisc
NewRequest - QosMapping
- A quality-of-service mapping between the internal priority
fromto the external vlan priorityto. - Route
AddRequest - A request to create a new route. This is equivalent to the
ip route addcommands. - Route
DelRequest - Route
GetRequest - Route
Handle - Route
Message Builder - Route
Next HopBuilder - Rule
AddRequest - A request to create a new rule. This is equivalent to the
ip rule addcommand. - Rule
DelRequest - Rule
GetRequest - Rule
Handle - Traffic
Chain GetRequest - Traffic
Chain Handle - Traffic
Class GetRequest - Traffic
Class Handle - Traffic
Filter GetRequest - Traffic
Filter Handle - Traffic
Filter NewRequest
Enums§
- Error
- IpVersion
- Internet Protocol (IP) version.
- Multicast
Group
Constants§
Functions§
- from_
socket - new_
connection - new_
connection_ with_ socket - new_
multicast_ connection - Equal to
ip monitorcommand - new_
multicast_ connection_ with_ socket - Equal to
ip monitorcommand