.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "NetPacket::USBMon 3pm" .TH NetPacket::USBMon 3pm "2022-11-19" "perl v5.36.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" NetPacket::USBMon \- Assemble and disassemble USB packets captured via Linux USBMon interface. .SH "VERSION" .IX Header "VERSION" version 1.7.2 .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use NetPacket::USBMon; \& \& $usb = NetPacket::USBMon\->decode($raw_pkt); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\f(CW\*(C`NetPacket::USBMon\*(C'\fR is a NetPacket decoder of \s-1USB\s0 packets captured via Linux USBMon interface. .SS "Methods" .IX Subsection "Methods" .ie n .IP """NetPacket::USBMon\->decode([RAW PACKET])""" 4 .el .IP "\f(CWNetPacket::USBMon\->decode([RAW PACKET])\fR" 4 .IX Item "NetPacket::USBMon->decode([RAW PACKET])" Decode a \s-1USB\s0 packet. .SS "Instance data" .IX Subsection "Instance data" The instance data for the \f(CW\*(C`NetPacket::UDP\*(C'\fR object consists of the following fields. .IP "id" 4 .IX Item "id" An in-kernel address of the \s-1USB\s0 Request Block (\s-1URB\s0). Stays the same for the transaction submission and completion. .Sp Might be truncatted when reading a 64\-bit capture with 32\-bit file. .IP "type" 4 .IX Item "type" \&\s-1URB\s0 type. Character 'S', 'C' or 'E', for constants \s-1USB_TYPE_SUBMISSION, USB_TYPE_CALLBACK\s0 or \s-1USB_TYPE_ERROR.\s0 .IP "xfer_type" 4 .IX Item "xfer_type" Transfer type. \s-1USB_XFER_TYPE_ISO, USB_XFER_TYPE_INTR, USB_XFER_TYPE_CONTROL\s0 or \s-1USB_XFER_TYPE_BULK.\s0 .IP "ep" 4 .IX Item "ep" Endpoint identification. .RS 4 .IP "num" 8 .IX Item "num" Endpoint number. .IP "dir" 8 .IX Item "dir" Transfer direction. \*(L"\s-1IN\*(R"\s0 or \*(L"\s-1OUT\*(R".\s0 .RE .RS 4 .RE .IP "devnum" 4 .IX Item "devnum" Device address. .IP "busnum" 4 .IX Item "busnum" Bus number. .IP "flag_setup" 4 .IX Item "flag_setup" Indicates whether setup is present and makes sense. .IP "flag_data" 4 .IX Item "flag_data" Indicates whether data is present and makes sense. .IP "ts_sec" 4 .IX Item "ts_sec" Timestamp seconds since epoch. Subject to truncation with 32\-bit Perl, which should be fine until 2038. .IP "ts_usec" 4 .IX Item "ts_usec" Timestamp microseconds. .IP "status" 4 .IX Item "status" \&\s-1URB\s0 status. Negative errno. .IP "length" 4 .IX Item "length" Length of data (submitted or actual). .IP "len_cap" 4 .IX Item "len_cap" Delivered length .IP "setup" 4 .IX Item "setup" Only present for packets with setup_flag turned on. Some contents are dependent on actual request type. .RS 4 .IP "bmRequestType" 8 .IX Item "bmRequestType" .PD 0 .IP "bRequest" 8 .IX Item "bRequest" .IP "wValue" 8 .IX Item "wValue" .IP "wIndex" 8 .IX Item "wIndex" .IP "wLength" 8 .IX Item "wLength" .RE .RS 4 .RE .IP "iso" 4 .IX Item "iso" .PD Only present for isochronous transfers. .RS 4 .IP "error_count" 8 .IX Item "error_count" .PD 0 .IP "numdesc" 8 .IX Item "numdesc" .RE .RS 4 .RE .IP "interval" 4 .IX Item "interval" .PD Isochronous packet response rate. .IP "start_frame" 4 .IX Item "start_frame" Only applicable to isochronous transfers. .IP "xfer_flags" 4 .IX Item "xfer_flags" A copy of \s-1URB\s0's transfer_flags. .IP "ndesc" 4 .IX Item "ndesc" Actual number of isochronous descriptors. .IP "data" 4 .IX Item "data" Packet payload. .SS "Exports" .IX Subsection "Exports" .IP "default" 4 .IX Item "default" none .IP "exportable" 4 .IX Item "exportable" \&\s-1USB_TYPE_SUBMISSION, USB_TYPE_CALLBACK, USB_TYPE_ERROR, USB_XFER_TYPE_ISO, USB_XFER_TYPE_INTR, USB_XFER_TYPE_CONTROL, USB_XFER_TYPE_BULK, USB_FLAG_SETUP_IRRELEVANT, USB_FLAG_SETUP_RELEVANT, USB_FLAG_DATA_ERROR, USB_FLAG_DATA_INCOMING, USB_FLAG_DATA_OUTGOING, USB_FLAG_DATA_PRESENT, USB_TYPE_VENDOR\s0 .IP "tags" 4 .IX Item "tags" The following tags group together related exportable items. .RS 4 .ie n .IP """:types""" 4 .el .IP "\f(CW:types\fR" 4 .IX Item ":types" \&\s-1USB_TYPE_SUBMISSION, USB_TYPE_CALLBACK, USB_TYPE_ERROR\s0 .ie n .IP """:xfer_types""" 4 .el .IP "\f(CW:xfer_types\fR" 4 .IX Item ":xfer_types" \&\s-1USB_XFER_TYPE_ISO, USB_XFER_TYPE_INTR, USB_XFER_TYPE_CONTROL, USB_XFER_TYPE_BULK\s0 .ie n .IP """:setup_flags""" 4 .el .IP "\f(CW:setup_flags\fR" 4 .IX Item ":setup_flags" \&\s-1USB_FLAG_SETUP_IRRELEVANT, USB_FLAG_SETUP_RELEVANT\s0 .ie n .IP """:data_flags""" 4 .el .IP "\f(CW:data_flags\fR" 4 .IX Item ":data_flags" \&\s-1USB_FLAG_DATA_ERROR, USB_FLAG_DATA_INCOMING, USB_FLAG_DATA_OUTGOING, USB_FLAG_DATA_PRESENT\s0 .ie n .IP """:setup_types""" 4 .el .IP "\f(CW:setup_types\fR" 4 .IX Item ":setup_types" \&\s-1USB_TYPE_VENDOR\s0 .ie n .IP """:ALL""" 4 .el .IP "\f(CW:ALL\fR" 4 .IX Item ":ALL" All the above exportable items. .RE .RS 4 .RE .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (c) 2013 Lubomir Rintel. .PP This module is free software. You can redistribute it and/or modify it under the same terms as Perl itself. .SH "AUTHOR" .IX Header "AUTHOR" Lubomir Rintel