Previous | Table of Contents | Next |
DCE-CIOP messages represent OMG IDL types by using the CDR transfer syntax,
which is defined in Section 15.2.1, “Common Data Representation (CDR),? on
page 15-3. DCE-CIOP message headers and bodies are specified as OMG IDL types.
These are encoded using CDR, and the resulting messages are passed between client and server processes via DCE-RPC pipes or
conformant arrays.
NDR is the transfer syntax used by DCE-RPC for operations defined in DCE IDL. CDR, used to represent messages defined in OMG
IDL on top of DCE RPCs, represents the OMG IDL primitive types identically to the NDR representation of corresponding DCE
IDL primitive types.
The corresponding OMG IDL and DCE IDL primitive types are shown in Table 16-1.
Table 16-1 Relationship between CDR and NDR primitive data types
OMG IDL type | DCE IDL type with NDR representation equivalent to CDR representation of OMG IDL type | ||||
char | byte | ||||
wchar | byte, unsigned short, or unsigned long, depending on transmission code set | ||||
octet | byte | ||||
short | short | ||||
unsigned short | unsigned short | ||||
long | long | ||||
unsigned long | unsigned long |
Table 16-1 Relationship between CDR and NDR primitive data types
OMG IDL type | DCE IDL type with NDR representation equivalent to CDR representation of OMG IDL type | ||||
long long | hyper | ||||
unsigned long long | unsigned hyper | ||||
float | float1 | ||||
double | double2 | ||||
long double | long double3 | ||||
boolean | byte4 |
1. Restricted to IEEE format.
2. Restricted to IEEE format.
3. Restricted to IEEE format.
4. Values restricted to 0 and 1.
The CDR representation of OMG IDL constructed types and pseudo-object types does not correspond to the NDR representation
of types describable in DCE IDL.
A wide string is encoded as a unidimensional conformant array of octets in DCE 1.1 NDR. This consists of an unsigned long
of four octets, specifying the number of octets in the array, followed by that number of octets, with no null terminator.
The NDR representation of OMG IDL fixed-point type, fixed, will be proposed as an addition to the set of DCE IDL types.
As new data types are added to OMG IDL, NDR can be used as a model for their CDR representations.