scapy.contrib.automotive.autosar.pdu

class scapy.contrib.automotive.autosar.pdu.PDU(_pkt, /, *, pdu_id=0, pdu_payload_len=0)[source]

Bases: Packet

Single PDU Packet inside PDUTransport list. Contains ID and payload length, and later - raw load. It’s free to interpret using bind_layers/bind_bottom_up method

Based off this document:

https://www.autosar.org/fileadmin/standards/classic/22-11/AUTOSAR_SWS_IPDUMultiplexer.pdf # noqa: E501

aliastypes
extract_padding(s: bytes) Tuple[bytes, bytes | None][source]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             PDU ID                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        PDU PAYLOAD LEN                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                             Fig. PDU                             
PDU fields

pdu_id

XIntField

0

pdu_payload_len

IntField

0

class scapy.contrib.automotive.autosar.pdu.PDUTransport(_pkt, /, *, pdus=[<PDU  |>])[source]

Bases: Packet

Packet representing PDUTransport containing multiple PDUs FIXME: Support CAN messages as well.

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              PDUS             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                        Fig. PDUTransport                         
PDUTransport fields

pdus

PacketListField

[<PDU  |>]