Thanks in advance.
Briefly, XDR is big-endian, NDR and CDR are either-endian (receiver
makes right). XDR is basically 4-byte aligned, with no real padding.
Both NDR and CDR require somewhat complicated padding, as they attempt
to align data as it would be aligned in a C data structure on the
sending machine; this means that the marshalling engine can often copy
data directly from the application memory (more true with NDR than
CDR, and true only if a C/C++ application is being used) to the kernel
TCP/IP buffer. NDR takes pain to marshal fixed-length data first,
then variable-length data, so that malloc calls can be made optimally
by the receiving side; CDR does not. XDR is extremely simple to
implement correctly, and is fairly simple to build special hardware to
decode and process; neither NDR nor CDR have either of those
properties.
Bill
--
Bill Janssen <jan...@parc.xerox.com> (650) 812-4763 FAX: (650) 812-4777
Xerox Palo Alto Research Center, 3333 Coyote Hill Rd, Palo Alto, CA 94304