Visual RFC.
ALL RFCs / RFC 8489
Read the RFC ↗
RFC 8489 / PROTOCOL MECHANISMS

How does the reader find the next piece?

03

Pack a short note into rows of four bytes. Change its length, remove alignment spacers and watch the reader find or lose the next field.

RFC 8489 · § 5EXAMPLE
1 / 4 · Pack a short note

Follow what happens to this one message.

A short note to pack

HELLO

Each letter here fills one byte: a small unit of stored information. This note uses 5 bytes.

What do we need to find out?

How does the reader find the next piece?

Watch one change, then try an alternative.

What happens if you change this?

Change one thing and watch the result. Restart restores the original example.

3 / 3
03
Skip its padding before reading the next attribute.

Skip its padding before reading the next attribute.

How does the reader find the next piece?Pack a short note into rows of four bytes. Change its length, remove alignment spacers and watch the reader find or lose the next field.20-BYTE STUN HEADER · SCHEMATICtype / length0x2112A44296-bit transaction IDtypelengthattribute datapadNext attribute starts after alignment paddingAttribute length excludes its padding

Key idea: Count data separately from alignment space. The next field starts after both.

Terms
ASCII
The character encoding used for these simple Latin-letter notes. Each chosen letter fits in one byte; other writing systems can need more bytes.
Byte / octet
Eight bits. Each letter in these ASCII notes uses one byte; that is not true for all written characters.
Attribute
A field with a type, a two-byte data length, its data and any alignment padding.
Padding
Extra ignored alignment space after data. Attribute lengths exclude it; the message length includes it.
Magic cookie
The fixed STUN marker 0x2112A442 in the 20-byte header. It is a format clue, not a secret.

Look up a term in the glossary ↗

Rules & examples

A length label tells the reader how many data bytes belong to a piece.

  • A length label tells the reader how many data bytes belong to a piece.
  • Alignment spacers fill out a four-byte boundary; they are not part of the attribute’s data length.
  • The message’s own length includes its attributes and their spacers, but excludes its fixed header.

Start with the drawing. The closed explanations introduce the technical names, actual fields and source rules after the idea. These chosen offline examples do not implement a complete STUN, ICE or TURN client.

Fixed header 20 bytes. SOFTWARE data length 5, padding 3, next attribute offset 32. Header message length 20 excludes the fixed header and includes attribute padding and the final FINGERPRINT attribute. This small parser validates the chosen structure, not every method, attribute, multiplexing or credential rule. Extra datagram data is not treated as part of the declared message. Raw chosen bytes: 000100142112a4420102030405060708090a0b0c8022000548454c4c4f000000802800045a1f4f56.

Sources
Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
New to this? Start hereA quick picture + helpful background

Finding a route and sending media are separate jobs.

Some messages set up a conversation or discover a reachable address. Other packets carry the audio or video. Follow those jobs separately.

Helpful first, if these ideas are unfamiliar

These pictures are analogies to help you learn. The linked RFC explains the actual rules.

Related RFCs and changes

“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.

All chapters in RFC 8489

Drawing view

Scroll the drawing to see every part. Playback controls stay above it.

RFC 9700 / CHAPTERS

Chapters

For full details, tables, algorithms, and exceptions, read the original RFC.

RFC status and corrections ↗