USB Stack Hooking

Hans Petter Selasky hselasky at c2i.net
Thu Aug 25 12:00:45 UTC 2011


On Thursday 25 August 2011 13:04:26 Daniel Grech wrote:
> Hi, I need to write a kernel module that would hook onto some function at a
> low level in the USB stack in order to have direct access to the raw data
> that is received from the USB Controller Hardware. Has this ever been done
> before ? Any ideas as to which function I could hook onto to have access to
> this data ?

Hi,

Recently there was an USB Packet Filter solution added, which can TAP data at 
the most common places.

See /sys/dev/usb/usb_pf.c

And: usbpf_xfertap()

If you want to grab information lower than this, there is no formal API at the 
present moment.

Are you thinking about USB Gadget/Device or USB Host data grabbing?

--HPS


More information about the freebsd-hackers mailing list