usbmon.h (866B)
1 /* Based on Documentation/usbmon.txt in the Linux Kernel */ 2 3 #ifndef _USBMON_H_ 4 #define _USBMON_H_ 5 6 struct usbmon_packet { 7 u64 id; /* URB ID */ 8 unsigned char type; /* 'S'ubmit 'C'allback 'E'rror */ 9 unsigned char xfer; /* ISO=0 INT=1 CTRL=2 BULK=3 */ 10 unsigned char epnum; 11 unsigned char devnum; 12 u16 busnum; 13 char flag_setup; 14 char flag_data; 15 s64 ts_sec; 16 s32 ts_usec; 17 int status; 18 unsigned int length; 19 unsigned int len_cap; 20 union { 21 unsigned char setup[8]; 22 struct iso_rec { 23 int error_count; 24 int numdesc; 25 } iso; 26 } s; 27 int interval; 28 int start_frame; 29 unsigned int xfer_flags; 30 unsigned int ndesc; 31 }; 32 33 struct usbmon_get { 34 struct usbmon_packet *hdr; 35 void *data; 36 size_t alloc; 37 }; 38 39 #define MON_IOC_MAGIC 0x92 40 41 #define MON_IOCX_GET _IOW(MON_IOC_MAGIC, 6, struct usbmon_get) 42 #define MON_IOCX_GETX _IOW(MON_IOC_MAGIC, 10, struct usbmon_get) 43 44 #endif