Version 4 RPC Messages

#FNF_RPC

The message field consists of one or more "elements". An element contains either a complete RPC or a fragment of an RPC. The message may contain any combination of these. Elements are interpreted in the strict order that they appear in the message, from first received to last received.

The format of an element is

RPC Message Header

Packed parameters

variable

variable

The header description follows.

The Packed Parameters field is described in the section "Packed Parameters" and is a common encoding with version 3 protocol.

RPC Message Header

Flags RPC Length Mode Cut-off Dest GUID Source GUID RPC Type Service Name or IP/Machine Module Name Context Fragment ID
1 byte 4 bytes 1 byte 16 bytes 16 bytes 1 byte CR terminated CR terminated CR terminated 4 bytes

Flags

The Flags byte contains routing flags that tell RPCManager how to process the message and flags that determine the format of the body:

Bit Number Meaning
0 - 4 Routing Flags. Identical to those defined for previous versions of the RPC protocol, with the addition of the #FNR_EXSERVERS (24) flag for routing to potential server clients only.
5 Dual GUID. When set, a Source GUID field is present in the body. The Source GUID field is only present in cross-application RPCs.
6 - 7 Fragment Flags. This indicates:
ValueMeaning
0The body is a fragment of an RPC spanning multiple bodies.
1The body is the first fragment of an RPC spanning multiple bodies.
2The body is the final fragment of an RPC spanning multiple bodies.
3The body holds a complete RPC.

Mode Cut-off

The Mode Cut-Off field contains the mode cut-off value that was supplied to the original \RPCManager\Send() call.

Dest GUID

This field is the same as the version 3 protocol header field of the same name and contains the application GUID that the RPC is intended for, with an all-zero GUID conventionally meaning the system root.

Source GUID

This field is optional and only present if the Dual-GUID flag is set in the Flags byte. If present it contains the application GUID that sourced the message. If absent, the sourcing application GUID is the same as the Dest GUID.

RPC Type

This field indicates if the RPC is a service (1) or a directed (2) type

Service Name or IP/Machine

This field contains the service name, if the RPC is a service RPC or the target machine name if the RPC is a directed RPC.

Module Name

This field contains the name of the module to be invoked as the target of the RPC.

Context

This field contains the scope in which to find the module to be invoked. This is specified as a scope string, with the starting point of the scope being determined by the Dest GUID and Service Name (if a service RPC).

Fragment ID

This field is optional and only present if the RPC is fragmented. If the RPC is fragmented the Flags byte will not have both the first and last fragment flags set. A complete RPC will have both flags set and will not have a Fragment ID field.

The fragments are concatenated together at the receiver and processed after the final fragment is received. The existing algorithm in the SocketNode receiver is used to maintain the stream of fragments in a temporary disk file stream, rather than a memory stream after the fragment concatenation becomes too large.