Generating XDR Routines
The rpcgen compiler can be used to generate the XDR routines necessary to convert local data structures into network format, and vice versa. Some types can be defined using the struct, union, and enum keywords.
However, these keywords should not be used in subsequent declarations of variables of these same types. The rpcgen compiler compiles RPC unions into C structures. It is an error to declare these unions using the union keyword. For more information, see Generating XDR Routines Example.