home | help
USBDUMP(8)		     System Manager's Manual		      USBDUMP(8)

NAME
     usbdump -- dump traffic on USB host controller

SYNOPSIS
     usbdump [-i ifname] [-r file] [-s snaplen] [-v] [-w file]

DESCRIPTION
     The usbdump utility provides a way to dump USB packets on host controllers.

     The following options are accepted:

     -i ifname
	      Listen on USB bus interface ifname.

     -r file  Read the raw packets from file.

     -s snaplen
	      Snapshot snaplen bytes from each packet.

     -v       Enable  debugging  messages.  When defined multiple times the ver-
	      bosity level increases.

     -w file  Write the raw packets to file.

EXAMPLES
     Capture the USB raw packets on usbus2:

	   usbdump -i usbus2 -s 256 -v

     Dump the USB raw packets of usbus2 into the file without packet size limit:

	   usbdump -i usbus2 -s 0 -w /tmp/dump_pkts

     Read and display the USB raw packets from previous file:

	   usbdump -r /tmp/dump_pkts -v

OUTPUT FORMAT
     The output format of usbdump is as follows:

	   <time> <bus>.<addr> <ep> <xfertype> <S/D> (<frames>/<length>) <...>

     The meaning of the output format elements is as follows:

     <time>	 A timestamp preceding all output lines.  The timestamp has  the
		 format  "hh:mm:ss.frac"  and  is  as  accurate  as the kernel's
		 clock.

     <bus>	 The USB host controller's bus unit number.

     <addr>	 The unique number of the USB device as allocated  by  the  host
		 controller driver.

     <ep>	 The  USB endpoint address that indicates whether the address is
		 OUT or IN.

     <xfertype>  The USB transfer type.  Can be CTRL, ISOC, BULK or INTR.

     <S/D>	 `S' indicates a USB submit.  `D' indicates a USB transfer done.

     <frames>	 Numbers of frames in this packets.  If this is  a  USB  submit,
		 its  value is xfer->nframes which means how many frames are ac-
		 ceptable or registered to transfer.  If this  is  a  USB  done,
		 xfer->aframes is the actual number of frames.

     <length>	 Total	packet	size.	If  this  is  a USB submit, its value is
		 xfer->sumlen.	 If  this  is  a  USB	done,	its   value   is
		 xfer->actlen.

     <...>	 Optional  field used for printing an error string if the packet
		 is from USB done.

SEE ALSO
     usbconfig(8)

AUTHORS
     Weongyo Jeong <weongyo@FreeBSD.org>

FreeBSD 8.3			  May 31, 2011			      USBDUMP(8)

home | help