Donnerstag, 3. März 2011

CS6223 RPC XDR representation

CS6223 RPC XDR representation

1.The XDR representation of ALL data types requires a multiple of 4 bytes, and these bytes are always transmitted in the big-endian byte order. Signed integer values are stored using two's complement notation, and floating point values are stored sing the IEEE format.

2. Variable-length fields always contain up to 3 bytes of padding at the end, so that the next item is on a 4-byte boundary.

3. eg a 5-character ASCII string would be transmitted a 12 bytes. ie., a 4-byte integer count containing the value 5; the 5-byte string, and 3 bytes of 0 for padding.

晚清

Sun Remote Procedure Call Mechanism
http://web.cs.wpi.edu/~rek/DCS/D04/SunRPC.html

excerpted from : Unix network Programming volume 2, ch. 16 by Richard Stevens.


Keine Kommentare: