Remote Procedure Call (RPC) provides a method for a program on one machine to execute a routine or program on another machine. RPC functions are compiled into the code executed on the client machine. RPC is described by RFC 1057.
The process of performing a remote procedure call is basically as follows:
- The server process is sleeping and waits for a call
- The client process sends a RPC message including procedure parameters to the server process.
- The client then waits for a response but may do other work while waiting.
- The server process wakes up, checks authentication, and runs the procedure and returns results to the client.
- No reliability is implemented with RPC and reliability is left to the application.
- RPC does not rely on a specific transport protocol.
- RPC can run on any operating system.
- Fields for client and server identification and authorization are provided.
RFC 1057 says the following are requirements for the RPC protocol:
- The ability for response messages to be matched with request messages must exist.
- The procedure to be called must have a unique specification.
- The caller must be able to be authenticated by the service and the service must be able to be authenticated by the caller.
Additional items that should be detected according to RFC 1057 are:
- RPC protocol mismatches.
- Remote program protocol version mismatches.
- Protocol errors (such as misspecification of a procedure's parameters).
- Reasons why remote authentication failed must be detected.
- Any additional reasons why the requested procedure call failed.
RPC Call Fields
- Remote program number - A central authority administers the program numbers.
- Remote program version number.
- Remote procedure number - A four byte field with the number of the procedure being called.
- RPC version number.
- Transaction ID
- Sending Direction Indicator
- Remote Protocol Number