Scroll to navigation

NetPacket::USBMon(3) User Contributed Perl Documentation NetPacket::USBMon(3)

NAME

NetPacket::USBMon - Assemble and disassemble USB packets captured via Linux USBMon interface.

VERSION

version 1.7.2

SYNOPSIS

  use NetPacket::USBMon;
  $usb = NetPacket::USBMon->decode($raw_pkt);

DESCRIPTION

"NetPacket::USBMon" is a NetPacket decoder of USB packets captured via Linux USBMon interface.

Methods

"NetPacket::USBMon->decode([RAW PACKET])"
Decode a USB packet.

Instance data

The instance data for the "NetPacket::UDP" object consists of the following fields.

An in-kernel address of the USB Request Block (URB). Stays the same for the transaction submission and completion.

Might be truncatted when reading a 64-bit capture with 32-bit file.

URB type. Character 'S', 'C' or 'E', for constants USB_TYPE_SUBMISSION, USB_TYPE_CALLBACK or USB_TYPE_ERROR.
Transfer type. USB_XFER_TYPE_ISO, USB_XFER_TYPE_INTR, USB_XFER_TYPE_CONTROL or USB_XFER_TYPE_BULK.
Endpoint identification.
Endpoint number.
Transfer direction. "IN" or "OUT".
Device address.
Bus number.
Indicates whether setup is present and makes sense.
Indicates whether data is present and makes sense.
Timestamp seconds since epoch. Subject to truncation with 32-bit Perl, which should be fine until 2038.
Timestamp microseconds.
URB status. Negative errno.
Length of data (submitted or actual).
Delivered length
Only present for packets with setup_flag turned on. Some contents are dependent on actual request type.
Only present for isochronous transfers.
Isochronous packet response rate.
Only applicable to isochronous transfers.
A copy of URB's transfer_flags.
Actual number of isochronous descriptors.
Packet payload.

Exports

none
USB_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
The following tags group together related exportable items.
":types"
USB_TYPE_SUBMISSION, USB_TYPE_CALLBACK, USB_TYPE_ERROR
":xfer_types"
USB_XFER_TYPE_ISO, USB_XFER_TYPE_INTR, USB_XFER_TYPE_CONTROL, USB_XFER_TYPE_BULK
":setup_flags"
USB_FLAG_SETUP_IRRELEVANT, USB_FLAG_SETUP_RELEVANT
":data_flags"
USB_FLAG_DATA_ERROR, USB_FLAG_DATA_INCOMING, USB_FLAG_DATA_OUTGOING, USB_FLAG_DATA_PRESENT
":setup_types"
USB_TYPE_VENDOR
":ALL"
All the above exportable items.

COPYRIGHT

Copyright (c) 2013 Lubomir Rintel.

This module is free software. You can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR

Lubomir Rintel <lkundrak@v3.sk>

2019-07-21 perl v5.40.0