Parse the STUN header and attributes
03A 20-byte header contains type, message length, magic cookie, and transaction ID, followed by padded attributes.
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.
DIAGRAM§ 5 ↗
RFC 8489 · § 5EXAMPLE
3 / 3
03
Skip its padding before reading the next attribute.
Skip its padding before reading the next attribute.
Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
Read the updated RFC section ↗
The magic cookie is 0x2112A442; the leading message bits distinguish the format.
- The magic cookie is 0x2112A442; the leading message bits distinguish the format.
- Attribute lengths exclude padding; alignment still affects where the next attribute begins.
The drawing is a simplified worked example. Follow the linked RFC and its updates for implementation requirements.
Read the RFC section ↗Diagrams simplify the RFC. Read the linked sections for complete requirements.
Privacy