External Data Representation (XDR) is a
standard Standard may refer to:
Symbols
* Colours, standards and guidons, kinds of military signs
* Standard (emblem), a type of a large symbol or emblem used for identification
Norms, conventions or requirements
* Standard (metrology), an object th ...
data serialization
In computing, serialization (or serialisation) is the process of translating a data structure or object state into a format that can be stored (e.g. files in secondary storage devices, data buffers in primary storage devices) or transmitted (e ...
format, for uses such as
computer network
A computer network is a set of computers sharing resources located on or provided by network nodes. The computers use common communication protocols over digital interconnections to communicate with each other. These interconnections are ...
protocols. It allows data to be transferred between different kinds of computer systems. Converting from the local representation to XDR is called ''encoding''. Converting from XDR to the local representation is called ''decoding''. XDR is implemented as a software library of functions which is portable between different
operating system
An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs.
Time-sharing operating systems schedule tasks for efficient use of the system and may also in ...
s and is also independent of the
transport layer
In computer networking, the transport layer is a conceptual division of methods in the layered architecture of protocols in the network stack in the Internet protocol suite and the OSI model. The protocols of this layer provide end-to-end ...
.
XDR uses a base unit of 4 bytes, serialized in
big-endian
In computing, endianness, also known as byte sex, is the order or sequence of bytes of a word of digital data in computer memory. Endianness is primarily expressed as big-endian (BE) or little-endian (LE). A big-endian system stores the most sig ...
order; smaller data types still occupy four bytes each after encoding. Variable-length types such as string and opaque are padded to a total divisible by four bytes.
Floating-point number
In computing, floating-point arithmetic (FP) is arithmetic that represents real numbers approximately, using an integer with a fixed precision, called the significand, scaled by an integer exponent of a fixed base. For example, 12.345 can be r ...
s are represented in
IEEE 754
The IEEE Standard for Floating-Point Arithmetic (IEEE 754) is a technical standard for floating-point arithmetic established in 1985 by the Institute of Electrical and Electronics Engineers (IEEE). The standard addressed many problems found i ...
format.
History
XDR was developed in the mid 1980s at
Sun Microsystems
Sun Microsystems, Inc. (Sun for short) was an American technology company that sold computers, computer components, software, and information technology services and created the Java programming language, the Solaris operating system, ZFS, the ...
, and first widely published in 1987.
XDR became an
IETF
The Internet Engineering Task Force (IETF) is a standards organization for the Internet and is responsible for the technical standards that make up the Internet protocol suite (TCP/IP). It has no formal membership roster or requirements and a ...
standard Standard may refer to:
Symbols
* Colours, standards and guidons, kinds of military signs
* Standard (emblem), a type of a large symbol or emblem used for identification
Norms, conventions or requirements
* Standard (metrology), an object th ...
in 1995.
The XDR data format is in use by many systems, including:
*
Network File System (protocol)
Network File System (NFS) is a distributed file system protocol originally developed by Sun Microsystems (Sun) in 1984, allowing a user on a client computer to access files over a computer network much like local storage is accessed. NFS, like ...
*
ZFS
ZFS (previously: Zettabyte File System) is a file system with volume management capabilities. It began as part of the Sun Microsystems Solaris operating system in 2001. Large parts of Solaris – including ZFS – were published under an ope ...
File System
*
NDMP NDMP, or Network Data Management Protocol, is a protocol meant to transport data between network attached storage (NAS) devices and backup devices. This removes the need for transporting the data through the backup server itself, thus enhancing spe ...
Network Data Management Protocol
*
Open Network Computing Remote Procedure Call
__NOTOC__
Open Network Computing (ONC) Remote Procedure Call (RPC), commonly known as Sun RPC is a remote procedure call system. ONC was originally developed by Sun Microsystems in the 1980s as part of their Network File System project.
ONC is ba ...
*
Legato NetWorker backup software (later sold by EMC)
*
NetCDF
NetCDF (Network Common Data Form) is a set of software libraries and self-describing, machine-independent data formats that support the creation, access, and sharing of array-oriented scientific data. The project homepage is hosted by the Unidata ...
(a scientific data format)
* The
R language and environment for statistical computing
* Th
HTTP-NG Binary Wire Protocol
* The
SpiderMonkey
SpiderMonkey is the first JavaScript engine, written by Brendan Eich at Netscape Communications, later released as open source and currently maintained by the Mozilla Foundation. It is used in the Firefox web browser.
History
Eich "wrote Jav ...
JavaScript engine, to serialize/deserialize compiled JavaScript code
* The
Ganglia
A ganglion is a group of neuron cell bodies in the peripheral nervous system. In the somatic nervous system this includes dorsal root ganglia and trigeminal ganglia among a few others. In the autonomic nervous system there are both sympatheti ...
distributed monitoring system
* The
sFlow
sFlow, short for "sampled flow", is an industry standard for packet export at Layer 2 of the OSI model. sFlow was originally developed by InMon Corp. It provides a means for exporting truncated packets, together with interface counters for the purp ...
network monitoring standard
* The
libvirt
libvirt is an open-source API, daemon and management tool for managing platform virtualization. It can be used to manage KVM, Xen, VMware ESXi, QEMU and other virtualization technologies. These APIs are widely used in the orchestration laye ...
virtualization library,
API
An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how ...
and
UI
*The
Firebird (database server)
Firebird is an open-source SQL relational database management system that supports Linux, Microsoft Windows, macOS and other Unix platforms. The database forked from Borland's open source edition of InterBase in 2000 but the code has been lar ...
for Remote Binary Wire Protocol
*
Stellar Payment Network
XDR data types
*
boolean
* int – 32-bit
integer
An integer is the number zero (), a positive natural number (, , , etc.) or a negative integer with a minus sign (−1, −2, −3, etc.). The negative numbers are the additive inverses of the corresponding positive numbers. In the language ...
* unsigned int – unsigned 32-bit
integer
An integer is the number zero (), a positive natural number (, , , etc.) or a negative integer with a minus sign (−1, −2, −3, etc.). The negative numbers are the additive inverses of the corresponding positive numbers. In the language ...
* hyper – 64-bit
integer
An integer is the number zero (), a positive natural number (, , , etc.) or a negative integer with a minus sign (−1, −2, −3, etc.). The negative numbers are the additive inverses of the corresponding positive numbers. In the language ...
* unsigned hyper – unsigned 64-bit
integer
An integer is the number zero (), a positive natural number (, , , etc.) or a negative integer with a minus sign (−1, −2, −3, etc.). The negative numbers are the additive inverses of the corresponding positive numbers. In the language ...
*
IEEE
The Institute of Electrical and Electronics Engineers (IEEE) is a 501(c)(3) professional association for electronic engineering and electrical engineering (and associated disciplines) with its corporate office in New York City and its operation ...
float
Float may refer to:
Arts and entertainment Music Albums
* ''Float'' (Aesop Rock album), 2000
* ''Float'' (Flogging Molly album), 2008
* ''Float'' (Styles P album), 2013
Songs
* "Float" (Tim and the Glory Boys song), 2022
* "Float", by Bush ...
* IEEE
double
A double is a look-alike or doppelgänger; one person or being that resembles another.
Double, The Double or Dubble may also refer to:
Film and television
* Double (filmmaking), someone who substitutes for the credited actor of a character
* Th ...
*
quadruple
Quadruple may refer to:
* 4-tuple, an ordered list of elements, with four elements
* Quad (figure skating), a figure skating jump
* Quadruple (computing), a term used as alternative for nibble in some contexts
* Quadruple-precision floating-point ...
(new in RFC1832)
*
enumeration
An enumeration is a complete, ordered listing of all the items in a collection. The term is commonly used in mathematics and computer science to refer to a listing of all of the elements of a set. The precise requirements for an enumeration (fo ...
*
structure
A structure is an arrangement and organization of interrelated elements in a material object or system, or the object or system so organized. Material structures include man-made objects such as buildings and machines and natural objects such as ...
*
string
* fixed length
array
An array is a systematic arrangement of similar objects, usually in rows and columns.
Things called an array include:
{{TOC right
Music
* In twelve-tone and serial composition, the presentation of simultaneous twelve-tone sets such that the ...
* variable length
array
An array is a systematic arrangement of similar objects, usually in rows and columns.
Things called an array include:
{{TOC right
Music
* In twelve-tone and serial composition, the presentation of simultaneous twelve-tone sets such that the ...
*
union
Union commonly refers to:
* Trade union, an organization of workers
* Union (set theory), in mathematics, a fundamental operation on sets
Union may also refer to:
Arts and entertainment
Music
* Union (band), an American rock group
** ''Un ...
– discriminated union
* fixed length
opaque
Opacity or opaque may refer to:
* Impediments to (especially, visible) light:
** Opacities, absorption coefficients
** Opacity (optics), property or degree of blocking the transmission of light
* Metaphors derived from literal optics:
** In lingu ...
data
* variable length
opaque
Opacity or opaque may refer to:
* Impediments to (especially, visible) light:
** Opacities, absorption coefficients
** Opacity (optics), property or degree of blocking the transmission of light
* Metaphors derived from literal optics:
** In lingu ...
data
*
void
Void may refer to:
Science, engineering, and technology
* Void (astronomy), the spaces between galaxy filaments that contain no galaxies
* Void (composites), a pore that remains unoccupied in a composite material
* Void, synonym for vacuum, a ...
– zero byte quantity
* optional – optional data is notated similarly to C pointers, but is represented as the data type "pointed to" with a boolean "present or not" flag. Semantically this is
option type
In programming languages (especially functional programming languages) and type theory, an option type or maybe type is a polymorphic type that represents encapsulation of an optional value; e.g., it is used as the return type of functions whic ...
.
See also
* Structured Data eXchange Format (
SDXF)
*
Remote Procedure Call
In distributed computing, a remote procedure call (RPC) is when a computer program causes a procedure (subroutine) to execute in a different address space (commonly on another computer on a shared network), which is coded as if it were a normal (l ...
*
Abstract Syntax Notation One
Abstract Syntax Notation One (ASN.1) is a standard interface description language for defining data structures that can be serialized and deserialized in a cross-platform way. It is broadly used in telecommunications and computer networking, and ...
*
Data Format Description Language Data Format Description Language (DFDL, often pronounced ''daff-o-dil''), published as an Open Grid Forum Recommendation in February 2021, is a modeling language for describing general text and binary data in a standard way. A DFDL model or schema ...
*
Comparison of data serialization formats
This is a comparison of data serialization formats, various ways to convert complex objects to sequences of bits. It does not include markup languages used exclusively as document file formats.
Overview
Syntax comparison of human-readable form ...
References
External links
The XDR standard exists in three different versions in the following RFCs:
* 2006 This document makes no technical changes to RFC 1832 and is published for the purposes of noting IANA considerations, augmenting security considerations, and distinguishing normative from informative references.
* 1995 version. Added Quadruple precision floating point to .
Cisco's XDR: Technical Notesjsxdrapi.c the main source file of SpiderMonkey that uses XDR
protocol.cppmain xdr source file used in Firebird remote protocol
The GNU Libc implementation of rpcgen, the XDR parser.Mu Dynamics Research Labs racc grammar for XDRIvmaiAsn ASN1/ECN/XDR Tools(a collection of tools containing an XDR/RPC-to-ASN.1 converter)
{{Data Exchange
Networking standards
Internet Standards
Internet protocols
Data modeling languages
Data serialization formats
Data transmission
Sun Microsystems software