ormat that is understood by both systems is required. XDR enables RPC to handle arbitrary data structures, in a machine independent manner regardless of the byte order or structure layout conventions used. This machine dependency is eliminated by con- verting the data structures to XDR before sending (see Figure 27.2). Using XDR, any program running on any machine can create portable data by translating its local representation into the XDR representation and vice versa. Data conversion with XDR involves two tasks. They are: Serializing: This is the process of converting from a particular system format to XDR format. De-serializing: This is the process of converting from a XDR format to a particular system format. Intricate data formats can also be described using XDR language. Using a data description language like XDR provides less ambiguous descriptions of data. Presentation layer Transport layer TCP/UDP Figure 27.2 Sample protocol stack for RPC implementation. RPC Programming Moreover XDR is easy to understand and implement. There is a close analogy between XDR types and types defined in other high level languages. On-the-fly data interpretation can be performed across machines as the language specification itself is an ASCII string. 27.3.3 RPCGEN Compiler The rpcgen compiler automates the process of writing RPC applications. With rpcgen the overall development time involved in coding and debugging low-level routines is reduced. This way the programmer can work on the functionality to be implemented in the remote procedures without worrying about the network inter- face code. The rpcgen accepts remote program interface definitions written in the RPC language and converts them into C language output. The output of rpcgen includes: A header file for the common definitions. A remote proxy of the client routines called the stub. A remote proxy of the server routines called the skeleton. XDR filter routines for parameters and results. Stub routines prototyped in C programming language. In the absence of rpcgen, th