Clarification on netlink requests

Dan Williams dcbw at redhat.com
Wed Aug 19 08:34:30 PDT 2015


On Wed, 2015-08-19 at 10:22 -0400, David Chappelle wrote:
> I am a bit confused with respect to the structure of netlink requests.
> It seems that in some circumstances a request can look like:
> 
>     struct request
>     {
>         struct nlmsghdr header;
>         struct rtgenmsg body;
>     };
> 
> and in other cases it can look like:
> 
>     struct request
>     {
>         struct nlmsghdr header;
>         struct ifinfomsg body;
>     };
> 
> How do I know which one to use when sending RTM_GETLINK and
> RTM_GETADDR requests?

'man rtnetlink'?

http://man7.org/linux/man-pages/man7/rtnetlink.7.html

Dan




More information about the libnl mailing list