Go to main content

ONC+ RPC Developer's Guide

Exit Print View

Updated: March 2019
 
 

Add Two Numbers Program (rpcgen)

Example 103  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;