ONC+ Developer's Guide

RPCL Syntax

The RPC language (RPCL) is similar to C. This section describes the syntax of the RPC language, and includes examples. It also shows how RPC and XDR type definitions are compiled into C type definitions in the output header file.

An RPC language file consists of a series of definitions.

   definition-list:
      definition;
      definition; definition-list 

The file recognizes six types of definitions:

definition:
      enum-definition
 		const-definition
 		typedef-definition
 		struct-definition
 		union-definition
 		program-definition  

Definitions are not the same as declarations. No space is allocated by a definition, only the type definition of a single or series of data elements. This behavior means that variables still must be declared.

The RPC language is identical to the XDR language, except for the added definitions described in the following table.

Table B–2 RPC Language Definitions

Term 

Definition 

program-definition

program program-ident {version-list} = value

version-list

version;

version; version-list

version

version version-ident {procedure-list} = value

procedure-list

procedure;

procedure; procedure-list

procedure

type-ident procedure-ident (type-ident) = value

In the RPC language: