RPC Messages
This section explains the RPC messages.
The initial structure of an RPC message is as follows:
struct rpc_msg {
unsigned int xid;
union switch (enum msg_type mtype) {
case CALL:
call_body cbody;
case REPLY;
reply_body rbody;
} body;
};
All RPC call and reply messages start with a transaction identifier, xid,
which is followed by a two-armed discriminated union. The union's
discriminant is msg_type, which switches to one of the following
message types: CALL or REPLY. The msg_type has the following
enumeration:
enum msg_type {
CALL = 0,
REPLY = 1
};
The xid parameter is used by clients matching a reply message to a call message or by servers detecting retransmissions. The server side does not treat the xid parameter as a sequence number.
The initial structure of an RPC message is followed by the body of the message. The body of a call message has one form. The body of a reply message, however, takes one of two forms, depending on whether a call is accepted or rejected by the server.