
/*
 * common.h - Common definitions used by client.c, server.c, RPCdg.c & RPCst.c.
 *
 * CSc 645 Spring 1995  Jim Warhol
 *
 * common.h is a header file used to define various compile-time constants,
 * function prototypes and data definitions used by the client.c & server.c 
 * network programs and by the related library routines RPCdg.c & RPCst.c.
 * 
 */

/* common compile-time constants */

#define TRUE	1
#define FALSE	0

#define	RCVLEN	256			/* maximum receive buffer size */

/* common function prototypes */

void error(char errmsg[]);		/* print error message and abort */
int myserver(char *clientmsg, char **response);	/* process server function */
void print(char msg[]);			/* write line to standard output */
void printn(char msg[], int n);	/* write line with integer to standard output */
void prints(char msg[], char string[]);	/* write line with string to std. out */
int RPC_client_init(char *machine, int port); /* init. client communication */
void RPC_client_term();			/* terminate client communication */
char *RPC_send(char *message);		/* send message to server */
int RPC_server_init(int (*funcp)(char *clientmsg, char **response));
					/* initialize & execute server */

/* common data definitions */

int st;					/* return status */
int i;					/* scratch variable */


