tcpdump mailing list archives
[PATCH] enable sniff on USB ports on linux
From: abeni <paolo.abeni () email it>
Date: Thu, 28 Sep 2006 09:48:08 +0200
hi all, The attached patch enables sniffing on USB buses on linux box. It use the usbmon infrastructure present in recent 2.6 linux kernels (I think that was introduced in 2.6.9) and requires debugfs to be mounted into /sys/kernel/debug. The code add an interface for each usb bus present on the host to the list returned from pcap_findalldevs. Capturing the URB is just a matter of parsing the information provided by the files /sys/kernel/debug/usbmon/<usb bus number>t. An USB pseudo header is prepended to the captured URB to give additional information on URB (type, sender, ecc.). I used linktype DLT_USER0 for usb devices, but I suppose that should be changed to something new/different. The patch is against current [ Thu Sep 28 09:39:26 CEST 2006 ] CVS. Best regards, Paolo -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Ti piace la chitarra? Impara a suonarla senza fatica ed evitando tutti gli errori, con l'aiuto di un maestro professionista Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=5144&d=28-9
Attachment:
usb-sniff-linux-v2.patch
Description:
- This is the tcpdump-workers list. Visit https://cod.sandelman.ca/ to unsubscribe.
Current thread:
- [PATCH] enable sniff on USB ports on linux abeni (Sep 28)
- Re: [PATCH] enable sniff on USB ports on linux Guy Harris (Sep 28)
- Re: [PATCH] enable sniff on USB ports on linux Michael Richardson (Sep 28)
- Re: [PATCH] enable sniff on USB ports on linux Joerg Mayer (Sep 29)
- Re: [PATCH] enable sniff on USB ports on linux Joerg Mayer (Sep 29)
- Re: [PATCH] enable sniff on USB ports on linux Michael Richardson (Sep 28)
- Re: [PATCH] enable sniff on USB ports on linux Guy Harris (Sep 28)