eXternal Data Representation (XDR) APIs

 

These APIs allow RPC applications to handle arbitrary data structures, regardless of their different hosts' byte orders or structure layout conventions.

API Description
xdr_array() A filter primitive that translates between variable-length arrays and their corresponding external representations. This function is called to encode or decode each element of the array
xdr_bool() A filter primitive that translates between Booleans (C integers) and their external representations. When encoding data, this filter produces values of either 1 or 0.
xdr_bytes() A filter primitive that translates between counted byte arrays and their external representations. This function treats a subset of generic arrays in which the size of array elements is known to be 1 and the external description of each element is built-in. The length of the byte sequence is explicitly located in an unsigned integer. The byte sequence is not ended by a null character. The external representation of the bytes is the same as their internal representation.
xdr_char() A filter primitive that translates between C-language characters and their external representation
xdr_double() A filter primitive that translates between C-language double-precision numbers and their external representations
xdr_double_char() A filter primitive that translates between C-language 2-byte characters and their external representation
xdr_enum() A filter primitive that translates between C-language enumeration (enum) and its external representation
xdr_free() Recursively frees the object pointed to by the pointer passed in
xdr_float() A filter primitive that translates between C-language floating-point numbers (normalized single floating-point numbers) and their external representations
xdr_int() A filter primitive that translates between C-language integers and their external representation
xdr_long() A filter primitive that translates between C-language long integers and their external representations
xdr_netobj() A filter primitive that translates between variable-length opaque data and its external representation
xdr_opaque() A filter primitive that translates between fixed-size opaque data and its external representation
xdr_pointer() Provides pointer chasing within structures and serializes null pointers. Can represent recursive data structures, such as binary trees or linked lists.
xdr_reference() a filter primitive that provides pointer chasing within structures. This primitive allows the serializing, deserializing, and freeing of any pointers within one structure that are referenced by another structure. The xdr_reference() function does not attach special meaning to a null pointer during serialization, and passing the address of a null pointer may cause a memory error. Therefore, the programmer must describe data with a two-sided discriminated union. One side is used when the pointer is valid; the other side, when the pointer is null.
xdr_short() A filter primitive that translates between C-language short integers and their external representation
xdr_string() A filter primitive that translates between C-language strings and their corresponding external representations
xdr_u_char() A filter primitive that translates between unsigned C-language characters and their external representations
xdr_u_int() A filter primitive that translates between C-language unsigned integers and their external representations
xdr_u_long() A filter primitive that translates between C-language unsigned long integers and their external representations
xdr_u_short() A filter primitive that translates between C-language unsigned short integers and their external representations
xdr_union() A filter primitive that translates between discriminated C unions and their corresponding external representations
xdr_vector() A filter primitive that translates between fixed-length arrays and their corresponding external representations
xdr_void() Has no parameters. It is passed to other RPC functions that require a parameter, but does not transmit data
xdr_wrapstring() A primitive that calls the xdr_string(xdr, sp, maxuint) API, where maxuint is the maximum value of an unsigned integer. The xdr_wrapstring() is useful because the RPC package passes a maximum of two XDR functions as parameters, and the xdr_string() function requires three.

 

Parent topic:

Transport-independent remote procedure call

 

Related information


API finder