* Clarification on rtnetlink requests
@ 2015-08-19 15:05 David Chappelle
2015-08-19 19:03 ` Anish Bhatt
0 siblings, 1 reply; 2+ messages in thread
From: David Chappelle @ 2015-08-19 15:05 UTC (permalink / raw)
To: netdev
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: Clarification on rtnetlink requests
2015-08-19 15:05 Clarification on rtnetlink requests David Chappelle
@ 2015-08-19 19:03 ` Anish Bhatt
0 siblings, 0 replies; 2+ messages in thread
From: Anish Bhatt @ 2015-08-19 19:03 UTC (permalink / raw)
To: David Chappelle, netdev
> -----Original Message-----
> From: netdev-owner@vger.kernel.org [mailto:netdev-
> owner@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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-08-19 19:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-19 15:05 Clarification on rtnetlink requests David Chappelle
2015-08-19 19:03 ` Anish Bhatt
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.