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

Structures

An RPC/XDR struct is declared almost exactly like its C counterpart:

   struct-definition:
   	struct struct-ident {
   		declaration-list
   	}
   

declaration-list: declaration ; declaration ; declaration-list

As an example, this is an RPC/XDR structure for a two-dimensional coordinate, and the C structure that it gets compiled into in the output header file.
   struct coord {
   	int x;
   	int y;
   };
The output is identical to the input, except for the added typedef at the end of the output:
   struct coord {
   	int x;
   	int y;
   };
   typedef struct coord coord;
This allows one to use coord instead of struct coord when declaring items.
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004