|
|
RPC/XDR programs are declared using the following syntax:
program-definition: program program-ident { version-list } = valueFor example: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
/* * time.x: Get or set the time. Time is represented as seconds * since 0:00, January 1, 1970. */ program TIMEPROG { version TIMEVERS { unsigned int TIMEGET(void) = 1; void TIMESET(unsigned) = 2; } = 1; } = 0x20000044;This file compiles into these definitions in the output header file:
#define TIMEPROG 0x20000044 #define TIMEVERS 1 #define TIMEGET 1 #define TIMESET 2