From: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
To: Daniel Borkmann <dborkman@redhat.com>
Cc: <netdev@vger.kernel.org>, Jiri Pirko <jpirko@redhat.com>
Subject: Re: [patch net-next v2] nlmon: use standard rtnetlink link api for add/del devices
Date: Tue, 16 Jul 2013 18:59:36 +0300 [thread overview]
Message-ID: <1561418.Jq9drZzso6@lx-vladimir> (raw)
In-Reply-To: <51E55D91.5050000@redhat.com>
On Tuesday, July 16, 2013 04:49:53 PM Daniel Borkmann wrote:
> On 07/16/2013 04:08 PM, Vladimir Kondratiev wrote:
> > Jiri Pirko <jiri <at> resnulli.us> writes:
> >
> >> It is not nice when netdev is created right after module load and with
> >> some implicit name. So rather change nlmon to use standard rtnl link API.
> >
> > Could you please elaborate a bit - how to capture netlink skb's after your
> > patch? Before, it was netdev that may be used with tcpdump. Now, there is
> > no such netdev. How to create it?
>
> modprobe nlmon
> ip link add type nlmon
> ip link set nlmon0 up
>
> tcpdump -i nlmon0 ....
>
> ip link set nlmon0 down
> ip link del dev nlmon0
> rmmod nlmon
Thanks a lot! I guess it is worth to have this mentioned somewhere.
It will save lots of questions. For example, in Kconfig:
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index b45b240..13acea2 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -247,8 +247,18 @@ config NLMON
purpose of this is to analyze netlink messages with packet sockets.
Thus applications like tcpdump will be able to see local netlink
messages if they tap into the netlink device, record pcaps for further
- diagnostics, etc. This is mostly intended for developers or support
- to debug netlink issues. If unsure, say N.
+ diagnostics, etc. Typical flow is:
+
+ modprobe nlmon
+ ip link add type nlmon
+ ip link set nlmon0 up
+ tcpdump -i nlmon0 ....
+ ip link set nlmon0 down
+ ip link del dev nlmon0
+ rmmod nlmon
+
+ This is mostly intended for developers or support to debug netlink
+ issues. If unsure, say N.
endif # NET_CORE
next prev parent reply other threads:[~2013-07-16 15:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-02 8:55 [patch net-next v2] nlmon: use standard rtnetlink link api for add/del devices Jiri Pirko
2013-07-02 19:47 ` Daniel Borkmann
2013-07-02 19:53 ` David Miller
2013-07-16 14:08 ` Vladimir Kondratiev
2013-07-16 14:49 ` Daniel Borkmann
2013-07-16 15:59 ` Vladimir Kondratiev [this message]
2013-07-16 16:10 ` Daniel Borkmann
2013-07-16 16:41 ` Jiri Pirko
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=1561418.Jq9drZzso6@lx-vladimir \
--to=qca_vkondrat@qca.qualcomm.com \
--cc=dborkman@redhat.com \
--cc=jpirko@redhat.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