scapy.layers.usb

Default USB frames & Basic implementation

class scapy.layers.usb.USBpcap(_pkt, /, *, headerLen=None, res=0, irpId=0, usbd_status=0, function=0, info=0, bus=0, device=0, endpoint=0, transfer=0, dataLength=None)[source]

Bases: Packet

aliastypes = [<class 'scapy.layers.usb.USBpcap'>, <class 'scapy.packet.Packet'>]
fields_desc: ClassVar[List[Field[Any, Any] | _FieldContainer]] = [<ByteField (USBpcap).headerLen>, <ByteField (USBpcap).res>, <XLELongField (USBpcap).irpId>, <LEIntEnumField (USBpcap).usbd_status>, <LEShortEnumField (USBpcap).function>, <XByteField (USBpcap).info>, <LEShortField (USBpcap).bus>, <LEShortField (USBpcap).device>, <XByteField (USBpcap).endpoint>, <ByteEnumField (USBpcap).transfer>, <LenField (USBpcap).dataLength>]
guess_payload_class(payload)[source]
post_build(p, pay)[source]
class scapy.layers.usb.USBpcapTransferControl(_pkt, /, *, stage=0)[source]

Bases: Packet

aliastypes = [<class 'scapy.layers.usb.USBpcapTransferControl'>, <class 'scapy.packet.Packet'>]
fields_desc: ClassVar[List[Field[Any, Any] | _FieldContainer]] = [<ByteField (USBpcapTransferControl).stage>]
class scapy.layers.usb.USBpcapTransferInterrupt(_pkt, /, *, startFrame=0, numberOfPackets=0, errorCount=0)[source]

Bases: Packet

aliastypes = [<class 'scapy.layers.usb.USBpcapTransferInterrupt'>, <class 'scapy.packet.Packet'>]
fields_desc: ClassVar[List[Field[Any, Any] | _FieldContainer]] = [<LEIntField (USBpcapTransferInterrupt).startFrame>, <LEIntField (USBpcapTransferInterrupt).numberOfPackets>, <LEIntField (USBpcapTransferInterrupt).errorCount>]
class scapy.layers.usb.USBpcapTransferIsochronous(_pkt, /, *, offset=0, length=0, usbd_status=0)[source]

Bases: Packet

aliastypes = [<class 'scapy.layers.usb.USBpcapTransferIsochronous'>, <class 'scapy.packet.Packet'>]
fields_desc: ClassVar[List[Field[Any, Any] | _FieldContainer]] = [<LEIntField (USBpcapTransferIsochronous).offset>, <LEIntField (USBpcapTransferIsochronous).length>, <LEIntEnumField (USBpcapTransferIsochronous).usbd_status>]