ONC+ Developer's Guide

Add Two Numbers Program (rpcgen)


Example D–5 rpcgen program: Add Two Numbers

/* This program contains a procedure to add 2 numbers to
demonstrate
 * some of the features of the new rpcgen. Note that add() takes 2
 * arguments in this case.
 */
program ADDPROG {			/* program number */
	version ADDVER {		/* version number */
		int add ( int, int )  	/* procedure */
			= 1;
	} = 1;
} = 199;