Subject: Question about reading the routing table with netlink

From: Fernando Gont <[email-masked]>
Date: Tue, 10 Sep 2013 11:21:44 -0300

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: [email-masked] || [email-masked]
PGP Fingerprint: 7809 84F5 322E 45C7 F1C9 3945 96EE A9EF D076 FFF1