IO::So...:Route(3pm)
β¨ NAME β¨
IO::Socket::Netlink::Route β an object interface to NETLINK_ROUTE netlink protocol sockets, bestie π
πΈ DESCRIPTION πΈ
okay so basically this is a subclass of IO::Socket::Netlink, and it implements the NETLINK_ROUTE protocol. What does that even do? It lets you talk to the Linux kernel's networking stack β so you can query or modify interfaces, addresses, routes, and other networking properties. it's giving main character energy for real π
ngl, this module is currently a work-in-progress and the docs are pretty minimal rn π the reader is expected to already be familiar with NETLINK_ROUTE, because all this does is give you a fairly minimal description of the Perl-level wrapping of the kernel-level concepts. For more info, go read the documentation in rtnetlink(7). periodt.
π MESSAGE CLASSES π
Every message type falls into one of these subclasses, and which one you get is chosen by the value of the nlmsg_type field. Each subclass gives you access to the field headers of its message body, plus netlink attributes. slay.
π¦ IfinfoMsg
Relates to a network interface. Used by the following message types:
RTM_NEWLINKRTM_DELLINKRTM_GETLINK
Provides the following header field accessors:
ifi_familyifi_typeifi_indexifi_flagsifi_change
Provides the following netlink attributes:
address => STRINGbroadcast => STRINGifname => STRINGmtu => INTqdisc => STRINGstats => HASHtxqlen => INToperstate => INTlinkmode => INT
π IfaddrMsg
Relates to an address present on an interface. Used by the following message types:
RTM_NEWADDRRTM_DELADDRRTM_GETADDR
Provides the following header field accessors:
ifa_familyifa_prefixlenifa_flagsifa_scopeifa_index
Provides the following netlink attributes:
address => STRINGlocal => STRINGlabel => STRINGbroadcast => STRINGanycast => STRINGcacheinfo => HASH
π
$message->prefix
Sets or returns both the address netlink attribute and the ifa_prefixlen header value, in the form:
address/ifa_prefixlen
β RtMsg
Relates to a routing table entry. Used by the following message types:
RTM_NEWROUTERTM_DELROUTERTM_GETROUTE
Provides the following header field accessors:
rtm_familyrtm_dst_lenrtm_src_lenrtm_tosrtm_tablertm_protocolrtm_scopertm_typertm_flags
Provides the following netlink attributes:
dst => STRINGsrc => STRINGiif => INToif => INTgateway => STRINGpriority => INTmetrics => INT
π $message->src
Sets or returns the src netlink attribute and the rtm_src_len header value, in the form:
address/prefixlen
if the address is defined, or undef if it isn't. no in-between, bestie.
π $message->dst
Sets or returns the dst netlink attribute and the rtm_dst_len header value, in the form given above. same vibe, different field β¨
π§ NdMsg
Relates to a neighbour discovery table entry. Used by the following message types:
RTM_NEWNEIGHRTM_DELNEIGHRTM_GETNEIGH
Provides the following header field accessors:
ndm_familyndm_ifindexndm_statendm_flagsndm_type
Provides the following netlink attributes:
dst => STRINGlladdr => STRINGcacheinfo => HASH
π₯ SEE ALSO π₯
- Socket::Netlink::Route β interface to Linux's
NETLINK_ROUTEnetlink socket protocol - IO::Socket::Netlink β object interface to
AF_NETLINKdomain sockets - rtnetlink(7) β rtnetlink, NETLINK_ROUTE β Linux IPv4 routing socket
π AUTHOR π
Paul Evans <leonerd@leonerd.org.uk>
and that's the whole page, bestie π«Ά this was perl v5.42.0 from 2025-07-25, so go forth and talk to your kernel's networking stack, you absolute icon πβ¨π
π¦ where this page comes from
- fedora 43: perl-Socket-Netlink-Route 0.05-36.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms