* Question about reading the routing table with netlink
@ 2013-09-10 14:21 Fernando Gont
2013-09-10 23:13 ` Hannes Frederic Sowa
0 siblings, 1 reply; 2+ messages in thread
From: Fernando Gont @ 2013-09-10 14:21 UTC (permalink / raw)
To: netdev
Folks,
Short version of the question:
I'm trying to loop up a routing table entry with a
socket(AF_NETLINK,SOCK_RAW,NETLINK_ROUTE).
Everything seems fine, except that I do not quite understand what's the
effect of setting the RTA_SRC attribute type when doing that.
Empirically, it seems that if the RTA_SRC attribute is set and it
contains an address that is assigned to the interface involved in the
route, then such address is later returned in the reply as an RTA_SRC
attribute.
Aside question, I was curious about the NETLINK_FIB_LOOKUP family (I
guess it can be used for the same purpose?) -- but I wasn't able to get
much information about it.
Any help will be welcome.
Thanks!
P.S.: Not sure if this is the right forum to ask this.. please direct me
elsewhere if appropriate.
Best regards,
--
Fernando Gont
e-mail: fernando@gont.com.ar || fgont@si6networks.com
PGP Fingerprint: 7809 84F5 322E 45C7 F1C9 3945 96EE A9EF D076 FFF1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Question about reading the routing table with netlink
2013-09-10 14:21 Question about reading the routing table with netlink Fernando Gont
@ 2013-09-10 23:13 ` Hannes Frederic Sowa
0 siblings, 0 replies; 2+ messages in thread
From: Hannes Frederic Sowa @ 2013-09-10 23:13 UTC (permalink / raw)
To: Fernando Gont; +Cc: netdev
On Tue, Sep 10, 2013 at 11:21:44AM -0300, Fernando Gont wrote:
> Folks,
>
> Short version of the question:
> I'm trying to loop up a routing table entry with a
> socket(AF_NETLINK,SOCK_RAW,NETLINK_ROUTE).
>
> Everything seems fine, except that I do not quite understand what's the
> effect of setting the RTA_SRC attribute type when doing that.
It sets the source address for the routing table lookup. This is important if
e.g. rules are specified or if ipv6 subtrees are in use.
> Empirically, it seems that if the RTA_SRC attribute is set and it
> contains an address that is assigned to the interface involved in the
> route, then such address is later returned in the reply as an RTA_SRC
> attribute.
Hm, I thought that RTA_SRC only has a semantic in the request and is moslty
just copied over to the response.
Greetings,
Hannes
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-09-10 23:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-10 14:21 Question about reading the routing table with netlink Fernando Gont
2013-09-10 23:13 ` Hannes Frederic Sowa
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.