Using the Lowest Layer of RPC

For the higher layers, RPC takes care of many details automatically. However, the lowest layer of the RPC library allows the programmer to change the default values for these details.

The lowest layer of RPC requires familiarity with sockets and their system calls. For more information, see Using the Lowest Layer of RPC Example and Using Multiple Program Versions Example.

The lowest layer of RPC may be necessary in the following situations:

  • The programmer needs to use Transmission Control Protocol/Internet Protocol (TCP/IP). Higher layers use UDP, which restricts RPC calls to 8KB of data. TCP/IP permits calls to send long streams of data.
  • The programmer wants to allocate and free memory while serializing or deserializing messages with XDR routines. No system call at the higher levels explicitly permits freeing memory. XDR routines are used for memory allocation as well as for input and output.
  • The programmer needs to perform authentication on the client or server side by supplying credentials or verifying them, respectively.