netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Johnson <johnsonzjo@gmail.com>
To: netdev@vger.kernel.org
Subject: Rtnelink and notifcations: a question.
Date: Wed, 22 May 2013 09:13:36 +0300	[thread overview]
Message-ID: <CAF0Lin08QxdKRTXUJOuHeRBwfueUks0Scrx+c5FjZmA_4+FNSA@mail.gmail.com> (raw)

Hello,

This is a theoretical question (sorry,-)). I was wondering why do we
need both rtnetlink
kernel sockets and the notification API ?
For example,
in net/core/dev.c,
we use notification to send NETDEV_REGISTER event notification in:
call_netdevice_notifiers(NETDEV_REGISTER, dev);
and we use the rtnetlink to send RTM_NEWLINK message:
rtmsg_ifinfo(RTM_NEWLINK,...);


Is it possible to use only the rtnetlink API and to send events like
NETDEV_REGISTER with rtnetlink methods ?

Or is there something inherent with rtnetlink/notification that
prevents implementing in
this way ?

I believe that the other way (solely using notification API) is not
possible because
we need to support getting messages
from userspace (for example, with the iproute package).



Regards,
Andy

                 reply	other threads:[~2013-05-22  6:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=CAF0Lin08QxdKRTXUJOuHeRBwfueUks0Scrx+c5FjZmA_4+FNSA@mail.gmail.com \
    --to=johnsonzjo@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).