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的稱呼如下表: