Skip to contentSkip to conversation

Dumping USB packets

Qemu-devel Jordan Bouyat 1 participant 1 message Jun 27, 2013

lore
Share & tools
lore
#0 lore raw

Hi !
I recently grab a dummy usb driver(https://github.com/pkt/qemu-dummyusb/commit/c5f61398dcebc9831f4ca409553ae85b438f27a2) and modified it to behave like an HID mouse with the help of (hw/usb/dev-hid.c).

It works, but my goal is to dump the whole USB packet in order to modify it or replaying it.
I spend some hours to search in the source code, but the only data I succeeded to dump are the content data of the USB packet in the usb_dummy_handle_data() with the uint8_t buf[p->iov.size] variable.

I also search in the USBPacket strucure (include/hw/usb.h) with the attribute data-buf[4096], but didn't succeed.

Could someone help me ?

Regards,

lafouine.