1NetPacket::USBMon(3) User Contributed Perl Documentation NetPacket::USBMon(3)
2
3
4
6 NetPacket::USBMon - Assemble and disassemble USB packets captured via
7 Linux USBMon interface.
8
10 version 1.7.2
11
13 use NetPacket::USBMon;
14
15 $usb = NetPacket::USBMon->decode($raw_pkt);
16
18 "NetPacket::USBMon" is a NetPacket decoder of USB packets captured via
19 Linux USBMon interface.
20
21 Methods
22 "NetPacket::USBMon->decode([RAW PACKET])"
23 Decode a USB packet.
24
25 Instance data
26 The instance data for the "NetPacket::UDP" object consists of the
27 following fields.
28
29 id An in-kernel address of the USB Request Block (URB). Stays the same
30 for the transaction submission and completion.
31
32 Might be truncatted when reading a 64-bit capture with 32-bit file.
33
34 type
35 URB type. Character 'S', 'C' or 'E', for constants
36 USB_TYPE_SUBMISSION, USB_TYPE_CALLBACK or USB_TYPE_ERROR.
37
38 xfer_type
39 Transfer type. USB_XFER_TYPE_ISO, USB_XFER_TYPE_INTR,
40 USB_XFER_TYPE_CONTROL or USB_XFER_TYPE_BULK.
41
42 ep Endpoint identification.
43
44 num Endpoint number.
45
46 dir Transfer direction. "IN" or "OUT".
47
48 devnum
49 Device address.
50
51 busnum
52 Bus number.
53
54 flag_setup
55 Indicates whether setup is present and makes sense.
56
57 flag_data
58 Indicates whether data is present and makes sense.
59
60 ts_sec
61 Timestamp seconds since epoch. Subject to truncation with 32-bit
62 Perl, which should be fine until 2038.
63
64 ts_usec
65 Timestamp microseconds.
66
67 status
68 URB status. Negative errno.
69
70 length
71 Length of data (submitted or actual).
72
73 len_cap
74 Delivered length
75
76 setup
77 Only present for packets with setup_flag turned on. Some contents
78 are dependent on actual request type.
79
80 bmRequestType
81 bRequest
82 wValue
83 wIndex
84 wLength
85 iso Only present for isochronous transfers.
86
87 error_count
88 numdesc
89 interval
90 Isochronous packet response rate.
91
92 start_frame
93 Only applicable to isochronous transfers.
94
95 xfer_flags
96 A copy of URB's transfer_flags.
97
98 ndesc
99 Actual number of isochronous descriptors.
100
101 data
102 Packet payload.
103
104 Exports
105 default
106 none
107
108 exportable
109 USB_TYPE_SUBMISSION, USB_TYPE_CALLBACK, USB_TYPE_ERROR,
110 USB_XFER_TYPE_ISO, USB_XFER_TYPE_INTR, USB_XFER_TYPE_CONTROL,
111 USB_XFER_TYPE_BULK, USB_FLAG_SETUP_IRRELEVANT,
112 USB_FLAG_SETUP_RELEVANT, USB_FLAG_DATA_ERROR,
113 USB_FLAG_DATA_INCOMING, USB_FLAG_DATA_OUTGOING,
114 USB_FLAG_DATA_PRESENT, USB_TYPE_VENDOR
115
116 tags
117 The following tags group together related exportable items.
118
119 ":types"
120 USB_TYPE_SUBMISSION, USB_TYPE_CALLBACK, USB_TYPE_ERROR
121
122 ":xfer_types"
123 USB_XFER_TYPE_ISO, USB_XFER_TYPE_INTR, USB_XFER_TYPE_CONTROL,
124 USB_XFER_TYPE_BULK
125
126 ":setup_flags"
127 USB_FLAG_SETUP_IRRELEVANT, USB_FLAG_SETUP_RELEVANT
128
129 ":data_flags"
130 USB_FLAG_DATA_ERROR, USB_FLAG_DATA_INCOMING,
131 USB_FLAG_DATA_OUTGOING, USB_FLAG_DATA_PRESENT
132
133 ":setup_types"
134 USB_TYPE_VENDOR
135
136 ":ALL"
137 All the above exportable items.
138
140 Copyright (c) 2013 Lubomir Rintel.
141
142 This module is free software. You can redistribute it and/or modify it
143 under the same terms as Perl itself.
144
146 Lubomir Rintel <lkundrak@v3.sk>
147
148
149
150perl v5.34.0 2021-07-22 NetPacket::USBMon(3)