Re: usbmon info

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 28, 2008 at 11:15:05AM +0530, ravikumar wrote:
> Hi All,
> I'm writing usbsniffer using the usbmon module.
> Basically i need to  detect and inform to some network monitoring 
> application regarding new usb devices on the network nodes.

It would probably be easier to just watch the network connections, as
the usb data packets don't always corrispond to the network data you are
looking for (control and other kinds of information go across the usb
connection, in a device-specific format, unique to every usb network
device, which will be quite hard to distinguish.)

> This i'm doing by polling  /proc/bus/usb/devices file as mentioned in the 
> usbmon.txt documentation.
> Second thing is to inform about the data transfer viz the leangth 
> ,flow(in/out) of data.
> From documentation i understood that  /sys/kernel/debug/usbmon , we can 
> capture the data transfer.
> But i'm unable to undserstand the documentation for parsing data.
> I need only two things data length and flow.

data length is in the usbmon packets directly.  See the binary mode if
you want to easily read it from a program, it is  in the "unsigned int
length" field.

Open up the /dev/usbmon0 character device, mmap it and read away, should
be quite simple.

What do you mean by "flow"?

thanks,

greg k-h

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux