Connected: An Internet Encyclopedia
RFC 1832 - 3.9 Fixed-length Opaque Data

Top: Connected: An Internet Encyclopedia
Up: Requests For Comments
Up: RFC 1832
Up: 3. XDR DATA TYPES
Prev: 3.8 Quadruple-precision Floating-point
Next: 3.10 Variable-length Opaque Data

### 3.9 Fixed-length Opaque Data

At times, fixed-length uninterpreted data needs to be passed among machines. This data is called "opaque" and is declared as follows:

             opaque identifier[n];

where the constant n is the (static) number of bytes necessary to contain the opaque data. If n is not a multiple of four, then the n bytes are followed by enough (0 to 3) residual zero bytes, r, to make the total byte count of the opaque object a multiple of four.

              0        1     ...
          +--------+--------+...+--------+--------+...+--------+
          | byte 0 | byte 1 |...|byte n-1|    0   |...|    0   |
          +--------+--------+...+--------+--------+...+--------+
          |<-----------n bytes---------->|<------r bytes------>|
          |<-----------n+r (where (n+r) mod 4 = 0)------------>|
                                                       FIXED-LENGTH OPAQUE

Next: 3.10 Variable-length Opaque Data

Connected: An Internet Encyclopedia
RFC 1832 - 3.9 Fixed-length Opaque Data