Visual RFC.
ALL RFCs / RFC 4506
Read the RFC ↗
RFC 4506 / External data representation

Agree on types and four-byte units

01

A shared data description gives byte sequences their meaning. XDR uses a common byte order and four-byte alignment across machines.

RFC 4506 · § 3EXAMPLE
4 / 4
Agree on types and four-byte unitsAn application knowledge gate stops interpretation when the selected value’s intended type is unknown. This is not an XDR error packet or rejection of valid typed data.Types and alignment are shared knowledgeReceived octetsInterpretationMissing intended data descriptionNo type name was encoded with this valueDo not invent a type from these bytesSelected values · XDR is representation, not transport
04
Require the intended type

Without the chosen description, the illustration stops before interpreting the value. This is an application knowledge boundary, not a new XDR error packet.

Source for this drawing: RFC 4506 · Read RFC section 3 ↗

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

First, agree how to read the message.

An encoding tells a reader how to interpret bytes. A format tells it how values fit together. Correctly reading a value does not make that value trustworthy.

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.

KEY POINT

The data description supplies types; encoded values are not a dump of native memory.

  • XDR means External Data Representation. It is a language for describing data and an encoding for its values, used by protocols such as ONC RPC and NFS. It is not itself a transport or an authentication protocol. A shared description, often called a schema, tells an encoder and decoder what types and order to expect (§1).
  • XDR uses implicit typing: the selected example sends encoded values without inserting a type name before every value. The surrounding application already knows the description. An application can explicitly carry a description or introduce type tags using a union, but those are additional choices, not an automatic XDR header (§§1,5 discussion6).
  • Every ordinary encoded item occupies a multiple of four bytes; void occupies zero bytes. Bytes are read in order. Data needing a non-multiple of four is followed by zero to three residual ZERO bytes, enough to reach the next four-byte boundary (§§3,4.16). This is value encoding, not a promise about native memory addresses.
  • Integer encodings put the most significant byte first. The illustrative unsigned integer0x01020304 is sent as 01 02 03 04 regardless of native host byte order (§§4.1–4.2,5). The byte-order discussion is distinct from the physical bit order used by an Ethernet medium (§1).
  • RFC 4506 is the May 2006 Internet Standard, STD 67. It obsoletes RFC 1832 but explicitly makes no technical encoding changes: §2 says it adds IANA/security discussion and distinguishes normative/informative references. Do not invent an XDR version change or change older encoded values.
DETAILS

Illustrative values and bounded offline encoding/decoding models. Not a complete XDR compiler, RPC/NFS implementation, transport, memory allocator or security verifier.

Read the RFC section ↗

All chapters in RFC 4506

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 ↗