/*     
 * $RCSfile: xrpctest.c,v $
 *
 * x-kernel v3.3
 *
 * Copyright (c) 1993,1991,1990,1996  Arizona Board of Regents
 *
 * $Log: xrpctest.c,v $
 * Revision 1.3  1997/01/07 22:30:27  slm
 * Swapped lines 56 & 57 to fix bug.
 *
 * Revision 1.2  1996/01/29  22:36:24  slm
 * Updated copyright and version.
 *
 * Revision 1.1  1995/08/03  19:23:53  davidm
 * Initial revision
 *
 * Revision 1.7.1.1  1994/03/29  23:30:04  menze
 * Added place-holder definition of TRACE_VAR
 */

/*
 * Ping-pong test of XRPC
 */

#include "xkernel.h"

/*
 * These definitions describe the lower protocol
 */
#define HOST_TYPE IPhost
#define INIT_FUNC xrpctest_init
#define PROT_STRING "xrpc"
#define TRACE_VAR tracexrpctestp

/* 
 * If a host is booted without client/server parameters and matches
 * one of these addresses, it will come up in the appropriate role.
 */
static HOST_TYPE ServerAddr = { 0, 0, 0, 0 };
static HOST_TYPE ClientAddr = { 0, 0, 0, 0 };
static long      serverPort = 1002;

#define TRIPS 100
#define TIMES 1
#define DELAY 3
/*
 * Define to do timing calculations
 */
#define TIME
#define SAVE_SERVER_SESSN
#define RPCTEST
#define CUSTOM_ASSIGN

static void
setServer(p)
Part *p;
{
    partPush(*p, &serverPort, sizeof(long));
    partPush(*p, &ServerAddr, sizeof(IPhost));	/* IP host */
}

static void
serverSetPart(p)
Part *p;
{
    partInit(p, 1);
    setServer(p);
}

static void
clientSetPart(p)
Part *p;
{
    partInit(p, 2);
    setServer(p);
#if 1
    partPush(p[1], ANY_HOST, 0);
#endif    
}

static int lens[] = { 
  1000, 2000, 4000, 8000, 16000
};

#include "common_test.c"

static void
testInit()
{
}
