Comments on: Monitoring Linux networking state using netlink https://olegkutkov.me/2018/02/14/monitoring-linux-networking-state-using-netlink/ Programming, electronics and diy projects Wed, 07 Sep 2022 13:31:11 +0000 hourly 1 https://wordpress.org/?v=6.5.3 By: Pragya Nand https://olegkutkov.me/2018/02/14/monitoring-linux-networking-state-using-netlink/#comment-1370 Wed, 07 Sep 2022 13:31:11 +0000 http://olegkutkov.me/?p=250#comment-1370 Hi Oleg,
Thanks for such an informative blogpost on netlink.
Is there any specific post related on how to access nested attribute such as IFLA_LINKINFO.

]]>
By: Venkateswaran https://olegkutkov.me/2018/02/14/monitoring-linux-networking-state-using-netlink/#comment-1038 Thu, 06 May 2021 21:35:27 +0000 http://olegkutkov.me/?p=250#comment-1038 RTM_DELLINK event is not triggered in any case. Do you know why ? I thought it ll be triggered when I remove my cable but not

]]>
By: Shahriar Basiri https://olegkutkov.me/2018/02/14/monitoring-linux-networking-state-using-netlink/#comment-948 Sat, 07 Nov 2020 07:30:45 +0000 http://olegkutkov.me/?p=250#comment-948 Hello Oleg,
Another question dear Oleg:). In function parseRtattr(), “h->nlmsg_len” is passed as “len” where it is the size of whole netlink message (nlmsghdr+ifinfomsg/ifaddrmsg+rtattrs). Then, this len is checked in RTA_OK and updated in RTA_NEXT macros. I think this size should be just size of rtattrs so that RTA_OK be valid.

]]>
By: shahriar https://olegkutkov.me/2018/02/14/monitoring-linux-networking-state-using-netlink/#comment-943 Thu, 05 Nov 2020 10:06:41 +0000 http://olegkutkov.me/?p=250#comment-943 NLMSG_DATA(h) is first casted to ifinfomsg and then ifaddrmsg in your code. Can you explain how it works? I thought we have ifinfomsg in case of NEW_LINK,DEL_LINK and ifaddrmsg in case of NEW_ADDR and DEL_ADDR

]]>
By: Puneet Sharma https://olegkutkov.me/2018/02/14/monitoring-linux-networking-state-using-netlink/#comment-883 Thu, 16 Jul 2020 13:53:35 +0000 http://olegkutkov.me/?p=250#comment-883 Nice article.
Very useful to jumpstart understanding netlink sockets.
Thank you.

]]>
By: Oleg Kutkov https://olegkutkov.me/2018/02/14/monitoring-linux-networking-state-using-netlink/#comment-51 Wed, 10 Apr 2019 22:00:16 +0000 http://olegkutkov.me/?p=250#comment-51 In reply to dmytro.

Hello.
Please check out my answer on the Stack Overflow.

]]>
By: dmytro https://olegkutkov.me/2018/02/14/monitoring-linux-networking-state-using-netlink/#comment-50 Wed, 10 Apr 2019 13:53:01 +0000 http://olegkutkov.me/?p=250#comment-50 Hello Oleg,
I would be grateful if you checked this SO question
https://stackoverflow.com/questions/55614270/how-to-asynchronously-check-if-an-ipv6-netwrok-interface-changes-state-from-tent

and if possible provided answers/ideas, etc.
Thanks in advance!!!

]]>
By: Getting Linux routing table using netlink. - Oleg Kutkov personal blog https://olegkutkov.me/2018/02/14/monitoring-linux-networking-state-using-netlink/#comment-48 Sun, 24 Mar 2019 01:42:57 +0000 http://olegkutkov.me/?p=250#comment-48 […] the previous article we discussed monitoring of the network interfaces using netlink. Now it’s time to do […]

]]>
By: Oleg Kutkov https://olegkutkov.me/2018/02/14/monitoring-linux-networking-state-using-netlink/#comment-44 Sun, 03 Mar 2019 18:48:37 +0000 http://olegkutkov.me/?p=250#comment-44 In reply to io.

Hello! Yep, I spent a lot of the time trying to figure out how it supposed to work.
I digged into the kernel and iproute2 sources, debugging and experimenting.

]]>
By: io https://olegkutkov.me/2018/02/14/monitoring-linux-networking-state-using-netlink/#comment-43 Sun, 03 Mar 2019 17:53:24 +0000 http://olegkutkov.me/?p=250#comment-43 Thanks for the article!
There are a few weird not documented macros directly from linux kernel – how did you figure out what they are supposed to do? Seems like the only way to work with netlink without libs like libnl is to debug and pull things from iproute2…

]]>