[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <525DB349B3FB5444AE057A887CB2A8D8EBC6C0@nice.asicdesigners.com>
Date: Wed, 19 Aug 2015 19:03:33 +0000
From: Anish Bhatt <anish@...lsio.com>
To: David Chappelle <chappedm@...il.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: Clarification on rtnetlink requests
> -----Original Message-----
> From: netdev-owner@...r.kernel.org [mailto:netdev-
> owner@...r.kernel.org] On Behalf Of David Chappelle
> Sent: Wednesday, August 19, 2015 8:05 AM
> To: netdev@...r.kernel.org
> Subject: Clarification on rtnetlink requests
>
> I am a bit confused with respect to the structure of rtnetlink 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? Furthermore, it also seems that 'struct rtattr'
> can be specified at the end of the request as well. Is there any
> documentation that describes this.
RTM_GETLINK uses ifinfomsg and RTM_GETADDR uses ifaddrmsg, see man 7 rtnetlink. struct rtgenmsg is just a generic type, look at include/linux/rtnetlink.h
-Anish
Powered by blists - more mailing lists