netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jon Loeliger <jdl@bigfootnetworks.com>
To: netdev@vger.kernel.org
Subject: Using netlink for intra-kernel requests?
Date: Tue, 08 Dec 2009 15:42:26 -0600	[thread overview]
Message-ID: <1260308546.29528.27.camel@jdl-desktop> (raw)

Guys,

I am looking for some documentation or an example that explains
how to use the Netlink interface to generate a message, send it,
and receive and process a reply all within the kernel.  I can
find lots of examples how to do this from user space, and even
the RFC shirks off talking about intra-kernel netlink messages.

Specifically, I would like to generate a RTM_GETQDISC message,
send it to the RTNL socket, and set up a listner to receive a reply.

I think I can create the netlink message in an skb.  And I think
I should call rtnl_notify() to deliver it (on the init_net namespace
with pid == 0, right?).  But where or how do I establish a means to
get the response?

I tried to read through some of the similar routing bits, but
even they confess that they "should use netlink", but then doesn't.

I feel like I am missing or don't know where to find the
documentation for the intra-kernel netlink messaging.

Thanks,
jdl



             reply	other threads:[~2009-12-08 21:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-08 21:42 Jon Loeliger [this message]
2009-12-09 13:33 ` Using netlink for intra-kernel requests? Andi Kleen
2009-12-09 16:41   ` Jon Loeliger

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=1260308546.29528.27.camel@jdl-desktop \
    --to=jdl@bigfootnetworks.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).