DOKK / manpages / debian 10 / libnetpacket-perl / NetPacket::USBMon.3pm.en
NetPacket::USBMon(3pm) User Contributed Perl Documentation NetPacket::USBMon(3pm)

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

version 1.7.0

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

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

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

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.

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 (c) 2013 Lubomir Rintel.

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

Lubomir Rintel <lkundrak@v3.sk>

2019-01-05 perl v5.28.1