> -----Original Message-----
> From: netdev-ow...@vger.kernel.org [mailto:netdev-
> ow...@vger.kernel.org] On Behalf Of David Chappelle
> Sent: Wednesday, August 19, 2015 8:05 AM
> To: netdev@vger.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

N�����r��y����b�X��ǧv�^�)޺{.n�+���z�^�)����w*jg��������ݢj/���z�ޖ��2�ޙ����&�)ߡ�a�����G���h��j:+v���w��٥

Reply via email to