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

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005