Re: Patch to add usbmon

From: Pete Zaitcev
Date: Wed Feb 02 2005 - 14:28:36 EST


On Wed, 02 Feb 2005 17:40:17 +0100, Marcel Holtmann <marcel@xxxxxxxxxxxx> wrote:

> While I am really thinking about starting usbdump, I may ask why you
> have choosen to use debugfs as interface. This will not be available in
> normal distribution kernels and I think a general USB monitoring ability
> would be great. For example like we have it for Ethernet, Bluetooth and
> IrDA. So my idea is to create some /dev/usbmonX (for each bus one) where
> usbdump can read its information from. What do you think?

The debugfs will be available in distributions. And it's no different from
having SOCK_PACKET enabled before tcpdump can work. There's no practical
disadvantage, unless we consider a backport of usbmon into a legacy distribution
such as RHEL 4 or SuSE 9.1.

Since usbmon rides raw file_operations, it can use a chardev interface with
a minimal change. The advantage of debugfs is only not needing to allocate
a major and dealing with minor partitioning. I also thought it would help
to shut up the namespace pollution whiners (the debate of /dbg versus
/sys/kernel/debug was rather mild by comparison).

It should make little difference for the tool anyway, the base path ought to
be configurable. The biggest difference would be to scripts which launch the
tool: in one case they need to mount debugfs if not mounted (if initscripts
haven't), in other case they mknod if necessary (if hal hasn't done it).
It is too early to care about this anyway.

-- Pete
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/