{"id":3971,"date":"2022-12-20T17:28:33","date_gmt":"2022-12-20T20:28:33","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/rtnetlink-man7\/"},"modified":"2022-12-20T17:28:33","modified_gmt":"2022-12-20T20:28:33","slug":"rtnetlink-man7","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/rtnetlink-man7\/","title":{"rendered":"RTNETLINK (man7)"},"content":{"rendered":"<h1 align=\"center\">RTNETLINK<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#VERSIONS\">VERSIONS<\/a><br \/> <a href=\"#BUGS\">BUGS<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#COLOPHON\">COLOPHON<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">rtnetlink \u2212 Linux IPv4 routing socket<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>#include <asm\/types.h> <br \/> #include <linux\/netlink.h> #include <linux\/rtnetlink.h> #include <sys\/socket.h><\/b><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>rtnetlink_socket = socket(AF_NETLINK, int<\/b> <i>socket_type<\/i><b>, NETLINK_ROUTE);<\/b><\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Rtnetlink allows the kernel\u2019s routing tables to be read and altered. It is used within the kernel to communicate between various subsystems, though this usage is not documented here, and for communication with user-space programs. Network routes, IP addresses, link parameters, neighbor setups, queueing disciplines, traffic classes and packet classifiers may all be controlled through <b>NETLINK_ROUTE<\/b> sockets. It is based on netlink messages; see <b>netlink<\/b>(7) for more information.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Routing attributes<\/b> <br \/> Some rtnetlink messages have optional attributes after the initial header:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">struct rtattr { <br \/> unsigned short rta_len; \/bin \/boot \/dead.letter \/dev \/etc \/home \/initrd \/lib \/lib64 \/lost+found \/media \/mnt \/opt \/proc \/release-notes.html \/release-notes.txt \/root \/run \/sbin \/srv \/sys \/tmp \/usr \/var Length of option bodies\/ usr\/ <br \/> unsigned short rta_type; \/bin \/boot \/dead.letter \/dev \/etc \/home \/initrd \/lib \/lib64 \/lost+found \/media \/mnt \/opt \/proc \/release-notes.html \/release-notes.txt \/root \/run \/sbin \/srv \/sys \/tmp \/usr \/var Type of option bodies\/ usr\/ <br \/> \/bin \/boot \/dead.letter \/dev \/etc \/home \/initrd \/lib \/lib64 \/lost+found \/media \/mnt \/opt \/proc \/release-notes.html \/release-notes.txt \/root \/run \/sbin \/srv \/sys \/tmp \/usr \/var Data follows bodies\/ usr\/ <br \/> };<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">These attributes should be manipulated using only the RTA_* macros or libnetlink, see <b>rtnetlink<\/b>(3).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Messages<\/b> <br \/> Rtnetlink consists of these message types (in addition to standard netlink messages): <b><br \/> RTM_NEWLINK<\/b>, <b>RTM_DELLINK<\/b>, <b>RTM_GETLINK<\/b><\/p>\n<p style=\"margin-left:22%;\">Create, remove, or get information about a specific network interface. These messages contain an <i>ifinfomsg<\/i> structure followed by a series of <i>rtattr<\/i> structures.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">struct ifinfomsg { <br \/> unsigned char ifi_family; \/bin \/boot \/dead.letter \/dev \/etc \/home \/initrd \/lib \/lib64 \/lost+found \/media \/mnt \/opt \/proc \/release-notes.html \/release-notes.txt \/root \/run \/sbin \/srv \/sys \/tmp \/usr \/var AF_UNSPEC bodies\/ usr\/ <br \/> unsigned short ifi_type; \/bin \/boot \/dead.letter \/dev \/etc \/home \/initrd \/lib \/lib64 \/lost+found \/media \/mnt \/opt \/proc \/release-notes.html \/release-notes.txt \/root \/run \/sbin \/srv \/sys \/tmp \/usr \/var Device type bodies\/ usr\/ <br \/> int ifi_index; \/bin \/boot \/dead.letter \/dev \/etc \/home \/initrd \/lib \/lib64 \/lost+found \/media \/mnt \/opt \/proc \/release-notes.html \/release-notes.txt \/root \/run \/sbin \/srv \/sys \/tmp \/usr \/var Interface index bodies\/ usr\/ <br \/> unsigned int ifi_flags; \/bin \/boot \/dead.letter \/dev \/etc \/home \/initrd \/lib \/lib64 \/lost+found \/media \/mnt \/opt \/proc \/release-notes.html \/release-notes.txt \/root \/run \/sbin \/srv \/sys \/tmp \/usr \/var Device flags bodies\/ usr\/ <br \/> unsigned int ifi_change; \/bin \/boot \/dead.letter \/dev \/etc \/home \/initrd \/lib \/lib64 \/lost+found \/media \/mnt \/opt \/proc \/release-notes.html \/release-notes.txt \/root \/run \/sbin \/srv \/sys \/tmp \/usr \/var change mask bodies\/ usr\/ <br \/> };<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\"><i>ifi_flags<\/i> contains the device flags, see <b>netdevice<\/b>(7); <i>ifi_index<\/i> is the unique interface index (since Linux 3.7, it is possible to feed a nonzero value with the <b>RTM_NEWLINK<\/b> message, thus creating a link with the given <i>ifindex<\/i>); <i>ifi_change<\/i> is reserved for future use and should be always set to 0xFFFFFFFF.<\/p>\n<p align=\"center\" style=\"margin-top: 1em\"><img decoding=\"async\" src=\"grohtml-937161.png\" alt=\"Image grohtml-937161.png\"><\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">The value type for <b>IFLA_STATS<\/b> is <i>struct rtnl_link_stats<\/i> (<i>struct net_device_stats<\/i> in Linux 2.4 and earlier).<\/p>\n<p style=\"margin-left:11%;\"><b>RTM_NEWADDR<\/b>, <b>RTM_DELADDR<\/b>, <b>RTM_GETADDR<\/b><\/p>\n<p style=\"margin-left:22%;\">Add, remove, or receive information about an IP address associated with an interface. In Linux 2.2, an interface can carry multiple IP addresses, this replaces the alias device concept in 2.0. In Linux 2.2, these messages support IPv4 and IPv6 addresses. They contain an <i>ifaddrmsg<\/i> structure, optionally followed by <i>rtattr<\/i> routing attributes.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">struct ifaddrmsg { <br \/> unsigned char ifa_family; \/bin \/boot \/dead.letter \/dev \/etc \/home \/initrd \/lib \/lib64 \/lost+found \/media \/mnt \/opt \/proc \/release-notes.html \/release-notes.txt \/root \/run \/sbin \/srv \/sys \/tmp \/usr \/var Address type bodies\/ usr\/ <br \/> unsigned char ifa_prefixlen; \/bin \/boot \/dead.letter \/dev \/etc \/home \/initrd \/lib \/lib64 \/lost+found \/media \/mnt \/opt \/proc \/release-notes.html \/release-notes.txt \/root \/run \/sbin \/srv \/sys \/tmp \/usr \/var Prefixlength of address bodies\/ usr\/ <br \/> unsigned char ifa_flags; \/bin \/boot \/dead.letter \/dev \/etc \/home \/initrd \/lib \/lib64 \/lost+found \/media \/mnt \/opt \/proc \/release-notes.html \/release-notes.txt \/root \/run \/sbin \/srv \/sys \/tmp \/usr \/var Address flags bodies\/ usr\/ <br \/> unsigned char ifa_scope; \/bin \/boot \/dead.letter \/dev \/etc \/home \/initrd \/lib \/lib64 \/lost+found \/media \/mnt \/opt \/proc \/release-notes.html \/release-notes.txt \/root \/run \/sbin \/srv \/sys \/tmp \/usr \/var Address scope bodies\/ usr\/ <br \/> unsigned int ifa_index; \/bin \/boot \/dead.letter \/dev \/etc \/home \/initrd \/lib \/lib64 \/lost+found \/media \/mnt \/opt \/proc \/release-notes.html \/release-notes.txt \/root \/run \/sbin \/srv \/sys \/tmp \/usr \/var Interface index bodies\/ usr\/ <br \/> };<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\"><i>ifa_family<\/i> is the address family type (currently <b>AF_INET<\/b> or <b>AF_INET6<\/b>), <i>ifa_prefixlen<\/i> is the length of the address mask of the address if defined for the family (like for IPv4), <i>ifa_scope<\/i> is the address scope, <i>ifa_index<\/i> is the interface index of the interface the address is associated with. <i>ifa_flags<\/i> is a flag word of <b>IFA_F_SECONDARY<\/b> for secondary address (old alias interface), <b>IFA_F_PERMANENT<\/b> for a permanent address set by the user and other undocumented flags.<\/p>\n<p align=\"center\" style=\"margin-top: 1em\"><img decoding=\"async\" src=\"grohtml-937162.png\" alt=\"Image grohtml-937162.png\"><\/p>\n<p style=\"margin-left:11%;\"><b>RTM_NEWROUTE<\/b>, <b>RTM_DELROUTE<\/b>, <b>RTM_GETROUTE<\/b><\/p>\n<p style=\"margin-left:22%;\">Create, remove, or receive information about a network route. These messages contain an <i>rtmsg<\/i> structure with an optional sequence of <i>rtattr<\/i> structures following. For <b>RTM_GETROUTE<\/b>, setting <i>rtm_dst_len<\/i> and <i>rtm_src_len<\/i> to 0 means you get all entries for the specified routing table. For the other fields, except <i>rtm_table<\/i> and <i>rtm_protocol<\/i>, 0 is the wildcard.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">struct rtmsg { <br \/> unsigned char rtm_family; \/bin \/boot \/dead.letter \/dev \/etc \/home \/initrd \/lib \/lib64 \/lost+found \/media \/mnt \/opt \/proc \/release-notes.html \/release-notes.txt \/root \/run \/sbin \/srv \/sys \/tmp \/usr \/var Address family of route bodies\/ usr\/ <br \/> unsigned char rtm_dst_len; \/bin \/boot \/dead.letter \/dev \/etc \/home \/initrd \/lib \/lib64 \/lost+found \/media \/mnt \/opt \/proc \/release-notes.html \/release-notes.txt \/root \/run \/sbin \/srv \/sys \/tmp \/usr \/var Length of destination bodies\/ usr\/ <br \/> unsigned char rtm_src_len; \/bin \/boot \/dead.letter \/dev \/etc \/home \/initrd \/lib \/lib64 \/lost+found \/media \/mnt \/opt \/proc \/release-notes.html \/release-notes.txt \/root \/run \/sbin \/srv \/sys \/tmp \/usr \/var Length of source bodies\/ usr\/ <br \/> unsigned char rtm_tos; \/bin \/boot \/dead.letter \/dev \/etc \/home \/initrd \/lib \/lib64 \/lost+found \/media \/mnt \/opt \/proc \/release-notes.html \/release-notes.txt \/root \/run \/sbin \/srv \/sys \/tmp \/usr \/var TOS filter bodies\/ usr\/ <br \/> unsigned char rtm_table; \/bin \/boot \/dead.letter \/dev \/etc \/home \/initrd \/lib \/lib64 \/lost+found \/media \/mnt \/opt \/proc \/release-notes.html \/release-notes.txt \/root \/run \/sbin \/srv \/sys \/tmp \/usr \/var Routing table ID; <br \/> see RTA_TABLE below bodies\/ usr\/ <br \/> unsigned char rtm_protocol; \/bin \/boot \/dead.letter \/dev \/etc \/home \/initrd \/lib \/lib64 \/lost+found \/media \/mnt \/opt \/proc \/release-notes.html \/release-notes.txt \/root \/run \/sbin \/srv \/sys \/tmp \/usr \/var Routing protocol; see below bodies\/ usr\/ <br \/> unsigned char rtm_scope; \/bin \/boot \/dead.letter \/dev \/etc \/home \/initrd \/lib \/lib64 \/lost+found \/media \/mnt \/opt \/proc \/release-notes.html \/release-notes.txt \/root \/run \/sbin \/srv \/sys \/tmp \/usr \/var See below bodies\/ usr\/ <br \/> unsigned char rtm_type; \/bin \/boot \/dead.letter \/dev \/etc \/home \/initrd \/lib \/lib64 \/lost+found \/media \/mnt \/opt \/proc \/release-notes.html \/release-notes.txt \/root \/run \/sbin \/srv \/sys \/tmp \/usr \/var See below *\/<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">unsigned int rtm_flags; <br \/> };<\/p>\n<p align=\"center\" style=\"margin-top: 1em\"><img decoding=\"async\" src=\"grohtml-937163.png\" alt=\"Image grohtml-937163.png\"><\/p>\n<p align=\"center\" style=\"margin-top: 1em\"><img decoding=\"async\" src=\"grohtml-937164.png\" alt=\"Image grohtml-937164.png\"><\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">Values larger than <b>RTPROT_STATIC<\/b> are not interpreted by the kernel, they are just for user information. They may be used to tag the source of a routing information or to distinguish between multiple routing daemons. See <i><linux\/rtnetlink.h><\/i> for the routing daemon identifiers which are already assigned.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\"><i>rtm_scope<\/i> is the distance to the destination:<\/p>\n<p align=\"center\" style=\"margin-top: 1em\"><img decoding=\"async\" src=\"grohtml-937165.png\" alt=\"Image grohtml-937165.png\"><\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">The values between <b>RT_SCOPE_UNIVERSE<\/b> and <b>RT_SCOPE_SITE<\/b> are available to the user.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">The <i>rtm_flags<\/i> have the following meanings:<\/p>\n<p align=\"center\" style=\"margin-top: 1em\"><img decoding=\"async\" src=\"grohtml-937166.png\" alt=\"Image grohtml-937166.png\"><\/p>\n<p style=\"margin-left:22%; margin-top: 1em\"><i>rtm_table<\/i> specifies the routing table<\/p>\n<p align=\"center\" style=\"margin-top: 1em\"><img decoding=\"async\" src=\"grohtml-937167.png\" alt=\"Image grohtml-937167.png\"><\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">The user may assign arbitrary values between <b>RT_TABLE_UNSPEC<\/b> and <b>RT_TABLE_DEFAULT<\/b>.<\/p>\n<p align=\"center\" style=\"margin-top: 1em\"><img decoding=\"async\" src=\"grohtml-937168.png\" alt=\"Image grohtml-937168.png\"><\/p>\n<p style=\"margin-left:22%; margin-top: 1em\"><b>RTA_MULTIPATH<\/b> contains several packed instances of <i>struct rtnexthop<\/i> together with nested RTAs (<b>RTA_GATEWAY<\/b>):<\/p>\n<p style=\"margin-left:28%; margin-top: 1em\">struct rtnexthop { <br \/> unsigned short rtnh_len; \/bin \/boot \/dead.letter \/dev \/etc \/home \/initrd \/lib \/lib64 \/lost+found \/media \/mnt \/opt \/proc \/release-notes.html \/release-notes.txt \/root \/run \/sbin \/srv \/sys \/tmp \/usr \/var Length of struct + length <br \/> of RTAs bodies\/ usr\/ <br \/> unsigned char rtnh_flags; \/bin \/boot \/dead.letter \/dev \/etc \/home \/initrd \/lib \/lib64 \/lost+found \/media \/mnt \/opt \/proc \/release-notes.html \/release-notes.txt \/root \/run \/sbin \/srv \/sys \/tmp \/usr \/var Flags (see <br \/> linux\/rtnetlink.h) bodies\/ usr\/ <br \/> unsigned char rtnh_hops; \/bin \/boot \/dead.letter \/dev \/etc \/home \/initrd \/lib \/lib64 \/lost+found \/media \/mnt \/opt \/proc \/release-notes.html \/release-notes.txt \/root \/run \/sbin \/srv \/sys \/tmp \/usr \/var Nexthop priority bodies\/ usr\/ <br \/> int rtnh_ifindex; \/bin \/boot \/dead.letter \/dev \/etc \/home \/initrd \/lib \/lib64 \/lost+found \/media \/mnt \/opt \/proc \/release-notes.html \/release-notes.txt \/root \/run \/sbin \/srv \/sys \/tmp \/usr \/var Interface index for this <br \/> nexthop bodies\/ usr\/ <br \/> }<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">There exist a bunch of <b>RTNH_*<\/b> macros similar to <b>RTA_*<\/b> and <b>NLHDR_*<\/b> macros useful to handle these structures.<\/p>\n<p style=\"margin-left:28%; margin-top: 1em\">struct rtvia { <br \/> unsigned short rtvia_family; <br \/> unsigned char rtvia_addr[0]; <br \/> };<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\"><i>rtvia_addr<\/i> is the address, <i>rtvia_family<\/i> is its family type.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\"><b>RTA_PREF<\/b> may contain values <b>ICMPV6_ROUTER_PREF_LOW<\/b>, <b>ICMPV6_ROUTER_PREF_MEDIUM<\/b>, and <b>ICMPV6_ROUTER_PREF_HIGH<\/b> defined incw <i><linux\/icmpv6.h><\/i>.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\"><b>RTA_ENCAP_TYPE<\/b> may contain values <b>LWTUNNEL_ENCAP_MPLS<\/b>, <b>LWTUNNEL_ENCAP_IP<\/b>, <b>LWTUNNEL_ENCAP_ILA<\/b>, or <b>LWTUNNEL_ENCAP_IP6<\/b> defined in <i><linux\/lwtunnel.h><\/i>.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\"><b>Fill these values in!<\/b><\/p>\n<p style=\"margin-left:11%;\"><b>RTM_NEWNEIGH<\/b>, <b>RTM_DELNEIGH<\/b>, <b>RTM_GETNEIGH<\/b><\/p>\n<p style=\"margin-left:22%;\">Add, remove, or receive information about a neighbor table entry (e.g., an ARP entry). The message contains an <i>ndmsg<\/i> structure.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">struct ndmsg { <br \/> unsigned char ndm_family; <br \/> int ndm_ifindex; \/bin \/boot \/dead.letter \/dev \/etc \/home \/initrd \/lib \/lib64 \/lost+found \/media \/mnt \/opt \/proc \/release-notes.html \/release-notes.txt \/root \/run \/sbin \/srv \/sys \/tmp \/usr \/var Interface index bodies\/ usr\/ <br \/> __u16 ndm_state; \/bin \/boot \/dead.letter \/dev \/etc \/home \/initrd \/lib \/lib64 \/lost+found \/media \/mnt \/opt \/proc \/release-notes.html \/release-notes.txt \/root \/run \/sbin \/srv \/sys \/tmp \/usr \/var State bodies\/ usr\/ <br \/> __u8 ndm_flags; \/bin \/boot \/dead.letter \/dev \/etc \/home \/initrd \/lib \/lib64 \/lost+found \/media \/mnt \/opt \/proc \/release-notes.html \/release-notes.txt \/root \/run \/sbin \/srv \/sys \/tmp \/usr \/var Flags bodies\/ usr\/ <br \/> __u8 ndm_type; <br \/> };<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">struct nda_cacheinfo { <br \/> __u32 ndm_confirmed; <br \/> __u32 ndm_used; <br \/> __u32 ndm_updated; <br \/> __u32 ndm_refcnt; <br \/> };<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\"><i>ndm_state<\/i> is a bit mask of the following states:<\/p>\n<p align=\"center\" style=\"margin-top: 1em\"><img decoding=\"async\" src=\"grohtml-937169.png\" alt=\"Image grohtml-937169.png\"><\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">Valid <i>ndm_flags<\/i> are:<\/p>\n<p align=\"center\" style=\"margin-top: 1em\"><img decoding=\"async\" src=\"grohtml-9371610.png\" alt=\"Image grohtml-9371610.png\"><\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">The <i>rtattr<\/i> struct has the following meanings for the <i>rta_type<\/i> field:<\/p>\n<p align=\"center\" style=\"margin-top: 1em\"><img decoding=\"async\" src=\"grohtml-9371611.png\" alt=\"Image grohtml-9371611.png\"><\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">If the <i>rta_type<\/i> field is <b>NDA_CACHEINFO<\/b>, then a <i>struct nda_cacheinfo<\/i> header follows.<\/p>\n<p style=\"margin-left:11%;\"><b>RTM_NEWRULE<\/b>, <b>RTM_DELRULE<\/b>, <b>RTM_GETRULE<\/b><\/p>\n<p style=\"margin-left:22%;\">Add, delete, or retrieve a routing rule. Carries a <i>struct rtmsg<\/i><\/p>\n<p style=\"margin-left:11%;\"><b>RTM_NEWQDISC<\/b>, <b>RTM_DELQDISC<\/b>, <b>RTM_GETQDISC<\/b><\/p>\n<p style=\"margin-left:22%;\">Add, remove, or get a queueing discipline. The message contains a <i>struct tcmsg<\/i> and may be followed by a series of attributes.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">struct tcmsg { <br \/> unsigned char tcm_family; <br \/> int tcm_ifindex; \/bin \/boot \/dead.letter \/dev \/etc \/home \/initrd \/lib \/lib64 \/lost+found \/media \/mnt \/opt \/proc \/release-notes.html \/release-notes.txt \/root \/run \/sbin \/srv \/sys \/tmp \/usr \/var interface index bodies\/ usr\/ <br \/> __u32 tcm_handle; \/bin \/boot \/dead.letter \/dev \/etc \/home \/initrd \/lib \/lib64 \/lost+found \/media \/mnt \/opt \/proc \/release-notes.html \/release-notes.txt \/root \/run \/sbin \/srv \/sys \/tmp \/usr \/var Qdisc handle bodies\/ usr\/ <br \/> __u32 tcm_parent; \/bin \/boot \/dead.letter \/dev \/etc \/home \/initrd \/lib \/lib64 \/lost+found \/media \/mnt \/opt \/proc \/release-notes.html \/release-notes.txt \/root \/run \/sbin \/srv \/sys \/tmp \/usr \/var Parent qdisc bodies\/ usr\/ <br \/> __u32 tcm_info; <br \/> };<\/p>\n<p align=\"center\" style=\"margin-top: 1em\"><img decoding=\"async\" src=\"grohtml-9371612.png\" alt=\"Image grohtml-9371612.png\"><\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">In addition, various other qdisc-module-specific attributes are allowed. For more information see the appropriate include files.<\/p>\n<p style=\"margin-left:11%;\"><b>RTM_NEWTCLASS<\/b>, <b>RTM_DELTCLASS<\/b>, <b>RTM_GETTCLASS<\/b><\/p>\n<p style=\"margin-left:22%;\">Add, remove, or get a traffic class. These messages contain a <i>struct tcmsg<\/i> as described above.<\/p>\n<p style=\"margin-left:11%;\"><b>RTM_NEWTFILTER<\/b>, <b>RTM_DELTFILTER<\/b>, <b>RTM_GETTFILTER<\/b><\/p>\n<p style=\"margin-left:22%;\">Add, remove, or receive information about a traffic filter. These messages contain a <i>struct tcmsg<\/i> as described above.<\/p>\n<h2>VERSIONS <a name=\"VERSIONS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>rtnetlink<\/b> is a new feature of Linux 2.2.<\/p>\n<h2>BUGS <a name=\"BUGS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This manual page is incomplete.<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>cmsg<\/b>(3), <b>rtnetlink<\/b>(3), <b>ip<\/b>(7), <b>netlink<\/b>(7)<\/p>\n<h2>COLOPHON <a name=\"COLOPHON\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This page is part of release 5.10 of the Linux <i>man-pages<\/i> project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https:\/\/www.kernel.org\/doc\/man\u2212pages\/.<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  rtnetlink \u2212 Linux IPv4 routing socket <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[971],"tags":[973,972,1061],"class_list":["post-3971","post","type-post","status-publish","format-standard","hentry","category-7-miscelanea","tag-973","tag-man7","tag-rtnetlink"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3971","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=3971"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3971\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=3971"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=3971"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=3971"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}