All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fernando Gont <fernando@gont.com.ar>
To: netdev <netdev@vger.kernel.org>
Subject: Question about reading the routing table with netlink
Date: Tue, 10 Sep 2013 11:21:44 -0300	[thread overview]
Message-ID: <522F2AF8.9080106@gont.com.ar> (raw)

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

             reply	other threads:[~2013-09-10 14:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-10 14:21 Fernando Gont [this message]
2013-09-10 23:13 ` Question about reading the routing table with netlink Hannes Frederic Sowa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=522F2AF8.9080106@gont.com.ar \
    --to=fernando@gont.com.ar \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.