History log of /freebsd-11-stable/usr.sbin/usbdump/usbdump.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 349665 03-Jul-2019 hselasky

MFC r349370:
Fix parsing of corrupt data in usbdump(8). Check that the transfer
type array lookup is within bounds to avoid segfault.

PR: 238801
Sponsored by: Mellanox Technologies


# 330449 05-Mar-2018 eadler

MFC r326276:

various: general adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

No functional change intended.


# 302408 07-Jul-2016 gjb

Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle.
Prune svn:mergeinfo from the new branch, as nothing has been merged
here.

Additional commits post-branch will follow.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


/freebsd-11-stable/MAINTAINERS
/freebsd-11-stable/cddl
/freebsd-11-stable/cddl/contrib/opensolaris
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/zfs
/freebsd-11-stable/cddl/contrib/opensolaris/lib/libzfs
/freebsd-11-stable/contrib/amd
/freebsd-11-stable/contrib/apr
/freebsd-11-stable/contrib/apr-util
/freebsd-11-stable/contrib/atf
/freebsd-11-stable/contrib/binutils
/freebsd-11-stable/contrib/bmake
/freebsd-11-stable/contrib/byacc
/freebsd-11-stable/contrib/bzip2
/freebsd-11-stable/contrib/com_err
/freebsd-11-stable/contrib/compiler-rt
/freebsd-11-stable/contrib/dialog
/freebsd-11-stable/contrib/dma
/freebsd-11-stable/contrib/dtc
/freebsd-11-stable/contrib/ee
/freebsd-11-stable/contrib/elftoolchain
/freebsd-11-stable/contrib/elftoolchain/ar
/freebsd-11-stable/contrib/elftoolchain/brandelf
/freebsd-11-stable/contrib/elftoolchain/elfdump
/freebsd-11-stable/contrib/expat
/freebsd-11-stable/contrib/file
/freebsd-11-stable/contrib/gcc
/freebsd-11-stable/contrib/gcclibs/libgomp
/freebsd-11-stable/contrib/gdb
/freebsd-11-stable/contrib/gdtoa
/freebsd-11-stable/contrib/groff
/freebsd-11-stable/contrib/ipfilter
/freebsd-11-stable/contrib/ldns
/freebsd-11-stable/contrib/ldns-host
/freebsd-11-stable/contrib/less
/freebsd-11-stable/contrib/libarchive
/freebsd-11-stable/contrib/libarchive/cpio
/freebsd-11-stable/contrib/libarchive/libarchive
/freebsd-11-stable/contrib/libarchive/libarchive_fe
/freebsd-11-stable/contrib/libarchive/tar
/freebsd-11-stable/contrib/libc++
/freebsd-11-stable/contrib/libc-vis
/freebsd-11-stable/contrib/libcxxrt
/freebsd-11-stable/contrib/libexecinfo
/freebsd-11-stable/contrib/libpcap
/freebsd-11-stable/contrib/libstdc++
/freebsd-11-stable/contrib/libucl
/freebsd-11-stable/contrib/libxo
/freebsd-11-stable/contrib/llvm
/freebsd-11-stable/contrib/llvm/projects/libunwind
/freebsd-11-stable/contrib/llvm/tools/clang
/freebsd-11-stable/contrib/llvm/tools/lldb
/freebsd-11-stable/contrib/llvm/tools/llvm-dwarfdump
/freebsd-11-stable/contrib/llvm/tools/llvm-lto
/freebsd-11-stable/contrib/mdocml
/freebsd-11-stable/contrib/mtree
/freebsd-11-stable/contrib/ncurses
/freebsd-11-stable/contrib/netcat
/freebsd-11-stable/contrib/ntp
/freebsd-11-stable/contrib/nvi
/freebsd-11-stable/contrib/one-true-awk
/freebsd-11-stable/contrib/openbsm
/freebsd-11-stable/contrib/openpam
/freebsd-11-stable/contrib/openresolv
/freebsd-11-stable/contrib/pf
/freebsd-11-stable/contrib/sendmail
/freebsd-11-stable/contrib/serf
/freebsd-11-stable/contrib/sqlite3
/freebsd-11-stable/contrib/subversion
/freebsd-11-stable/contrib/tcpdump
/freebsd-11-stable/contrib/tcsh
/freebsd-11-stable/contrib/tnftp
/freebsd-11-stable/contrib/top
/freebsd-11-stable/contrib/top/install-sh
/freebsd-11-stable/contrib/tzcode/stdtime
/freebsd-11-stable/contrib/tzcode/zic
/freebsd-11-stable/contrib/tzdata
/freebsd-11-stable/contrib/unbound
/freebsd-11-stable/contrib/vis
/freebsd-11-stable/contrib/wpa
/freebsd-11-stable/contrib/xz
/freebsd-11-stable/crypto/heimdal
/freebsd-11-stable/crypto/openssh
/freebsd-11-stable/crypto/openssl
/freebsd-11-stable/gnu/lib
/freebsd-11-stable/gnu/usr.bin/binutils
/freebsd-11-stable/gnu/usr.bin/cc/cc_tools
/freebsd-11-stable/gnu/usr.bin/gdb
/freebsd-11-stable/lib/libc/locale/ascii.c
/freebsd-11-stable/sys/cddl/contrib/opensolaris
/freebsd-11-stable/sys/contrib/dev/acpica
/freebsd-11-stable/sys/contrib/ipfilter
/freebsd-11-stable/sys/contrib/libfdt
/freebsd-11-stable/sys/contrib/octeon-sdk
/freebsd-11-stable/sys/contrib/x86emu
/freebsd-11-stable/sys/contrib/xz-embedded
/freebsd-11-stable/usr.sbin/bhyve/atkbdc.h
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.c
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.h
/freebsd-11-stable/usr.sbin/bhyve/console.c
/freebsd-11-stable/usr.sbin/bhyve/console.h
/freebsd-11-stable/usr.sbin/bhyve/pci_fbuf.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.h
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.c
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.h
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.c
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.h
/freebsd-11-stable/usr.sbin/bhyve/rfb.c
/freebsd-11-stable/usr.sbin/bhyve/rfb.h
/freebsd-11-stable/usr.sbin/bhyve/sockstream.c
/freebsd-11-stable/usr.sbin/bhyve/sockstream.h
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.c
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.h
/freebsd-11-stable/usr.sbin/bhyve/usb_mouse.c
/freebsd-11-stable/usr.sbin/bhyve/vga.c
/freebsd-11-stable/usr.sbin/bhyve/vga.h
# 298216 18-Apr-2016 pfg

Reuse our roundup2() macro instead of reinventing the wheel.

Obtained from: DragonflyBSD


# 266803 28-May-2014 hselasky

Remove nop.

MFC after: 1 week


# 266798 28-May-2014 hselasky

Fix for big endian architectures. The "up_address" field is 8-bit and
does not need byte swapping.

MFC after: 1 week


# 260978 21-Jan-2014 hselasky

Add check for "hw.usb.no_pf" sysctl value.

Submitted by: Warren Block <wblock@wonkity.com>
MFC after: 1 week


# 238279 09-Jul-2012 hrs

Make usbusN logging pseudo-interface used by usbdump(8) clonable. One is
now created/destroyed automatically by usbdump(8).

Note that "hw.usb.no_pf" loader tunable is now obsolete.

Reviewed by: hselasky


# 234655 24-Apr-2012 hselasky

Add missing and probably also mandatory -h option.

MFC after: 1 week


# 234636 24-Apr-2012 hselasky

Improve support for USB packet filtering also when reading dumps, and
allow filtered data to be dumped to a binary file.

MFC after: 1 week


# 233039 16-Mar-2012 hselasky

Create new file header format to simplify the endian and cross platform issues.
This patch does not break binary compatibility with previous versions.

MFC after: 1 week


# 233037 16-Mar-2012 hselasky

Fix cross-platform issue about the file-format in which
usbdump stores data. Until this patch it was not possible
to exchange traces between 32-bit, 64-bit, big- and
little endian platforms. The problem is the dynamic nature
of the BPF timestamp in the header. All other fields are
fixed size and little endian.

MFC after: 5 days


# 231835 16-Feb-2012 hselasky

Add support for filtering USB devices and USB endpoints to the usbdump utility
when making software USB traces.

MFC after: 1 week


# 226474 17-Oct-2011 hselasky

Make the usbdump utility work again by using the correct BPF structures.

MFC after: 3 days


# 221604 07-May-2011 hselasky

Minor usbdump update:
- Use memcpy() instead of bcopy().
- Replace all asserts() by standard error messages.
- Update usage().

MFC after: 7 days


# 220314 04-Apr-2011 thompsa

fix printing of tv_usec


# 220301 03-Apr-2011 hselasky

- Improvements to USB PF solution
- Add more fields for USB device and host mode
- Add more information to USB PF header so that decoding
can easily be done by software analyzer tools like
Wireshark.
- Optimise usbdump to display USB streams in text format
more efficiently.
- Software using USB PF must be recompiled after
this commit, due to structure changes.

MFC after: 7 days
Approved by: thompsa (mentor)


# 218010 28-Jan-2011 hselasky

- Remove double semicolon.
- Remove reference to sprintf. Use printf directly. This part of
the code should be optimised further to avoid many small printouts.
Setting a sensible line buffer length could help aswell when printing
out megabytes of data per second.

Approved by: thompsa (mentor)


# 216138 02-Dec-2010 weongyo

Changes the meaning of each characters '<' and '>' that it could be
confused with USB OUT or USB IN packets though it just represents USB
submit or done. To know the USB packet direction, the endpoint address
should be referred.

Requested by: jkim


# 215803 24-Nov-2010 weongyo

As a refection of r215802 it should use BPF interfaces because the
duplication code of USB pf is removed.


# 215651 21-Nov-2010 weongyo

Adds usbdump(8) tool that currently it only supports the very basic
feature set. It's not connected to the build yet.

Reviewed by: hps