PDU: Protocol Data Unit
The PDU contains SDU and PCI. On the transmission side the PDU is passed from the upper layer to the lower layer, which interprets this PDU as its SDU.
SDU: Service Data Unit
It is the data passed by an upper layer, with the request to transmit the data. It is as well the data which is extracted after reception by the lower layer and passed to the upper layer. A SDU is part of a PDU.
PCI: Protocol Control Information
This Information is needed to pass a SDU from one instance of a specific protocol layer to another instance. E.g. it contains source and target information.
The PCI is added by a protocol layer on the transmission side and is removed again on the receiving side.
普通概念
相对专有概念而言,这是一个关于协议(Protocol)的基本概念,每一个协议都有PDU和SDU。比如TCP/IP二层桥有BPDU,802.11中有MSDU/MPDU/PSDU/PPDU。
SDU对于该协议而言只是data(plain bytes),协议规定了PCI,供发送端和接收端进行编解码使用。发送端使用PCI将SDU封装,就是PDU,即:PDU = PCI + SDU。
相对概念
PDU和SDU是相对的概念,上一层的PDU,传到下一层就是SDU。
比如TCP/IP中的各层:
- 在TCP/UDP层是SDU,经过传输层加上TCP/UDP头封装之后是TCP/UDP的PDU;
- TCP/UDP PDU传到IP层,是IP层的SDU,IP层封装加上IP头之后,是IP层的PDU;
- IP PDU传到MAC层,是MAC层的SDU,MAC层加上MAC头之后,是MAC的PDU;
- MAC PDU传到物理层,是物理层的SDU,物理层加上PHY头之后,是PHY PDU;
图示如下:
AUTOSAR中的PDU们
AUTOSAR Communication各层中对PDU的称呼如下表: