netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Borkmann <dborkman@redhat.com>
To: davem@davemloft.net
Cc: tgraf@suug.ch, netdev@vger.kernel.org
Subject: [RFC PATCH net-next 0/3] Virtual netlink device for packet sockets
Date: Wed, 19 Jun 2013 20:04:43 +0200	[thread overview]
Message-ID: <1371665086-19677-1-git-send-email-dborkman@redhat.com> (raw)

This set allows for a virtual netlink device that can be easily used
without modification by tools like tcpdump, Wireshark et al. to debug
and troubleshoot netlink traffic that is exchanged between user and
kernel space. We could even record pcap files for a later analysis.
No code change would be needed on the side of such analyzers, except
adding a simple protocol dissector, for example.

Please have a look at the main description in patch 3. Patch 1 and 2
are just prerequisits for the actual 3rd patch. In the cover letter I
just want to bring up one design item we could discuss, if needed.

The current design is pluggable, which means we have a simple module
that can be used when we want to debug netlink issues and that can be
unloaded when done. By that, we can place the driver under drivers/net/
just like many others (lo, veth, ..., usbmon, etc.) and leave the core
mostly untouched, besides patch 2. If we do not want to allow for
pluggable modules, we would need to migrate this code into net/netlink/
and directly integrate it with af_netlink. That's another option. Then,
we can only compile it as built-in, or not.

This is posted as an RFC, so if you have any feedback, I'm happy to
apply it to the set before posting it as a non-RFC.

Thanks !

Daniel Borkmann (3):
  net: if_arp: add ARPHRD_NETLINK type
  net: netlink: add registration/unregistration of virtual tap devices
  packet: nlmon: virtual netlink monitoring device for packet sockets

 drivers/net/Kconfig         |  11 +++
 drivers/net/Makefile        |   1 +
 drivers/net/nlmon.c         | 169 ++++++++++++++++++++++++++++++++++++++++++++
 include/linux/netlink.h     |  11 +++
 include/uapi/linux/if_arp.h |   1 +
 net/netlink/af_netlink.c    |  72 +++++++++++++++++++
 6 files changed, 265 insertions(+)
 create mode 100644 drivers/net/nlmon.c

-- 
1.7.11.7

             reply	other threads:[~2013-06-19 18:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-19 18:04 Daniel Borkmann [this message]
2013-06-19 18:04 ` [RFC PATCH net-next 1/3] net: if_arp: add ARPHRD_NETLINK type Daniel Borkmann
2013-06-19 18:04 ` [RFC PATCH net-next 2/3] net: netlink: add registration/unregistration of virtual tap devices Daniel Borkmann
2013-06-19 18:04 ` [RFC PATCH net-next 3/3] packet: nlmon: virtual netlink monitoring device for packet sockets Daniel Borkmann
2013-06-19 18:59   ` Stephen Hemminger
2013-06-20  8:07     ` Daniel Borkmann
2013-06-20 15:46       ` Stephen Hemminger
2013-06-20 17:09         ` Daniel Borkmann

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=1371665086-19677-1-git-send-email-dborkman@redhat.com \
    --to=dborkman@redhat.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=tgraf@suug.ch \
    /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).