USBDUMP(8) BSD 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] [-f filter] [-b file] [-h] DESCRIPTION The usbdump utility provides a way to dump USB packets on host con‐ trollers. The following options are accepted: -b file Store data part of the USB trace in binary format to the given file. This option also works with the -r and -f options. -i ifname Listen on USB bus interface ifname. -r file Read the raw packets from file. This option also works with the -f option. -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. This option also works with the -s and -v options. -f filter The filter argument consists of either one or two numbers sepa‐ rated by a dot. The first indicates the device unit number which should be traced. The second number which is optional indicates the endpoint which should be traced. To get all traf‐ fic for the control endpoint, two filters should be created, one for endpoint 0 and one for endpoint 128. If 128 is added to the endpoint number that means IN direction, else OUT direction is implied. A device unit or endpoint value of -1 means ignore this field. If no filters are specified, all packets are passed through using the default -1,-1 filter. This option can be specified multiple times. -h This option displays a summary of the command line options. 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 Dump the USB raw packets of usbus2, but only the control endpoint traffic of device unit number 3: usbdump -i usbus2 -s 0 -f 3.0 -f 3.128 -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: