DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Programming with Remote Procedure Calls (RPC)

Programs

RPC/XDR programs are declared using the following syntax:

   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

For example:
   /*
    * 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

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004