|
From: Alan S. <st...@ro...> - 2010-07-20 14:59:16
|
On Tue, 20 Jul 2010, Nikolai Kondrashov wrote: > On 07/20/2010 06:09 PM, Alan Stern wrote: > > Why write your own utility? Just use usbmon or wireshark. > Do you mean usbmon AND wireshark? Or is there some tool under that name? > > First of all, the tool is inteded to be used with devices not yet, or > incorrectly supported by the Linux kernel. If the kernel won't communicate > with the device there won't be anything in the trace. Well, of course that's going to be true for any tool or utility. > Next, my focus currently is on HID stuff only and it would need additional > effort to dig through all the USB stuff in the trace. Maybe, although if you can narrow the trace down to the device or interface in question then all the non-HID stuff would be eliminated. > Then the tool is expected to be included in a larger diagnostics toolset > which should be as easy to use as possible and I don't want to force users > to mount debugfs and load the usbmon module. Exactly what you want to do isn't clear. Do you want to dump the traffic sent by a particular program that uses libusb? Do you want to dump all traffic sent to a particular device, whether that traffic comes from a program (possibly using libusb, possibly not) or from a kernel driver? Do you want the dump utility to be a separate program from the one being monitored, or do you want it to take the form of a library routine that can be linked in? Would you be satisfied simply to have an option in libusb for printing out a record of all the data getting sent or received? Alan Stern |