䢇COMMUNICATIONS PROTOCOLS
Datacom and Telecom
Protocol Structures
ll forms of digital communica-
A tion require some structure,
for a receiver has to know
how to decode incoming mes-
sages. Communications systems from
the Universal Serial Bus (USB) on
16 bits
Destination ID
IEEE 1394 (Firewire) Protocol
6 bits
Transaction
Label
2 bits 4 bits
Retry Transaction
Code Code
4 bits
Priority
your PC to the Internet contain pro- 16 bits
tocols that send data in groups. These Source ID
Source ID
groups are called packets, frames, or
cells. Each contains a header that tells
32 bits
the receiver how to decode the incom-
ing data. Headers also tell networks Destination Offset
where to route each group so the data
reaches its proper destination. The 16 bits 16 bits
following pages contain the structure Data Length Extended Code
for several communications protocols.
We’ve included the following: 32 bits
• IEEE 1394
• I2C bus Header CRC
• TCP/IP (used on the Internet)
• Asynchronous Transfer Mode (ATM) 8 bits 8 bits 8 bits 8 bits
• Universal Serial Bus (USB) Byte 0 Byte 1 Byte 2 Byte 3
• Ethernet
• ISDN 8 bits 8–24 bits
• MPEG-2 Transport Stream
Byte N-1 Zero-Pad bytes (if necessary to get data to multiples of 32 bits)
• Frame Relay
We will post these charts on our
Web site; if you want to suggest other 32 bits
protocols for us to add, please e-mail Data CRC
us at
[email protected].
l2C Bus, 7-bit Address
1 bit 7 bits 1 bit 1 bit 7 bits 1 bit 7 bits 1 bit 1 bit
ACK/
Start Slave Address R/W ACK Data ACK Data Stop
ACK
l2C Bus, 10-bit Address
1 bit 1 1 1 1 0 X X 1 bit 1 bit 7 bits 1 bit 7 bits 1 bit 1 bit
ACK ACK ACK/
Start Slave Address, first 7 bits R/W Slave Address, second byte Data Stop
1 2 ACK
Source: I2C Specification, Philips Semiconductor
䊳
TEST & MEASUREMENT WORLD/JULY 2000 www.tmworld.com 167
䢇 COMMUNICATIONS PROTOCOLS
TCP Header Structure Universal Serial Bus (USB)
16 bits 16 bits Start of Frame Packet (sent every 1 ms by host computer)
8 bits 11 bits 5 bits
Source Port Destination Port
Packet ID (PID) Frame Number CRC
Sequence Number
Acknowledgement Number
Token Packet—establishes the type and direction of an upcoming transmission
Offset Reserved
U A P R S F Window 8 bits 7 bits 4 bits 5 bits
(4 bits) (6 bits)
PID Source Address Endpoint CRC
Checksum Urgent Pointer
Option + Padding
Data Packet—carries the information you want to send to another USB device
Data
8 bits 1–1023 bytes 16 bits
PID Data CRC
Control Bits--6 bits. The control bits may be:
U (URG) Urgent pointer field significant R (RST) Reset the connection
A (ACK) Acknowledgement field significant S (SYN) Synchronize sequence numbers
P (PSH) Push function F (FIN) No more data from s Handshake Packet—follows a data packet, traveling from recipient to sender
8 bits
PID
IP Header Structure
Source: USB Complete, by Jan Axelson, Lakeview Research, Madison, WI, 1999.
4 bits 4 bits 8 bits 16 bits
Type of
Version IHL Total Length
Service
Identification Flags Fragment Offset
Time to Live Protocol Header Checksum Ethernet Header Structure
Source Address 6 bytes 6 bytes 2 bytes 46–1500 bytes 4 bytes
Destination Address Data Unit
Destination Source Length & Pad FCS
Option + Padding
Data
Key I/G U/L Address bits 0 U/L Address bits
IHL: IP Header Length
Key
Source: www.protocols.com FCS: Frame Check Sequence
I/G: Individual/Group Address
U/L: Universal/Local Address
Source: www.protocols.com/pbook/ian.htm
ATM Cell Structure
5 bytes 48 bytes
Header Payload
ISDN Link Access Protocol-D (LAPD)
UNI NNI 16 bits 16 bits 16 bits Variable 16 bits 16 bits
Generic Virtual Path Flag Frame Check Flag
Virtual Path Identifier Address Control
Flow Control Identifier 1 1
(0x7F)
Data Sequence
(FCS) (0x7F)
Virtual Path Virtual Channel 2
Identifier Identifier 6 bits 2 bits 1 bit 7 bits 1 bit
Virtual Channel Identifier 3 Service Access Point Command Terminal End Point
Identifier (SAP) Response Identifier (TEI)
Virtual Channel Payload Cell Loss
4
Identifier Type Priority Address Address
Extension Extension
Header Error Control 5
Bit 1 Bit 2
Key
UNI: User-to-Network Interface
NNI: Network-to-User Interface Source: www.protocols.com
䊳
168 www.tmworld.com TEST & MEASUREMENT WORLD/JULY 2000
䢇 COMMUNICATIONS PROTOCOLS
MPEG-2 Transport Stream Packet
188 bytes
Header Payload Header Payload ... Header Payload
Transport Adaptation
Sync Start Transport Scrambling Continuity Adaptation Key
Error PID Field Payload
Byte Indicator Priority Control Counter Field
Indicator Control PID: Protocol Identifier
8 1 1 1 13 2 2 4 n1 Governing Connection Types
PCR: Program Clock Reference
Adaptation Discontinuity Random Elem. Stream Optional Stuffing OPCR: Original Program
Access Priority 5 Flags Clock Reference
Field Length Indicator Fields Bytes
Indicator Indicator
8 1 1 1 5 n2
Transport Adaptation
Splice
PCR OPCR Private Field
Countdown
Data Extension
Source: Tektronix
48 48 8 8+n3 8+n4
Frame Relay Header
2 bytes 2 bytes 2 bytes 2 bytes Key
BECN: Backward Explicit Congestion Notification
Frame Relay C/R: Command/Response Field Bit
Flag Information FCS Flag
Header (application specific—not modified by network)
DE: Discard Eligibility Indicator
DLCI: Data Link Connection Identifier
Byte 1 Byte 2 EA: Extension Bit
(allows indication of 3- or 4- byte header)
DLCI C/R EA DLCI FECN BECN DE EA FCS: Frame Check Sequence
FECN: Forward Explicit Congestion Notification
Bit 8 7 6 5 4 3 2 1 8 7 6 5 4 3 2 1 Source: www.frforum.com/basicguide/basics.pdf
170