/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
/* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/*
* Portions of this source code were derived from Berkeley
* 4.3 BSD under license from the Regents of the University of
* California.
*/
/*
* svc_raw.c, This a toy for simple testing and timing.
* Interface to create an rpc client and server in the same UNIX process.
* This lets us similate rpc and get rpc (round trip) overhead, without
* any interference from the kernal.
*
*/
#include "mt.h"
#include "rpc_mt.h"
#include <stdlib.h>
#include <syslog.h>
#ifndef UDPMSGSIZE
#endif
/*
* This is the "network" that we will be moving data over
*/
static struct svc_raw_private {
} *svc_raw_private;
static struct xp_ops *svc_raw_ops();
extern mutex_t svcraw_lock;
SVCXPRT *
svc_raw_create(void)
{
/* VARIABLES PROTECTED BY svcraw_lock: svc_raw_private, srp */
(void) mutex_lock(&svcraw_lock);
(void) mutex_unlock(&svcraw_lock);
return (NULL);
}
if (_rawcombuf == NULL) {
if (_rawcombuf == NULL) {
"out of memory");
(void) mutex_unlock(&svcraw_lock);
return (NULL);
}
}
}
if (flag2)
if (flag1)
(void) mutex_unlock(&svcraw_lock);
return (NULL);
}
/*
* By convention, using FD_SETSIZE as the pseudo file descriptor
*/
(void) mutex_unlock(&svcraw_lock);
}
/*ARGSUSED*/
static enum xprt_stat
{
return (XPRT_IDLE);
}
/*ARGSUSED*/
static bool_t
{
(void) mutex_lock(&svcraw_lock);
(void) mutex_unlock(&svcraw_lock);
return (FALSE);
}
(void) mutex_unlock(&svcraw_lock);
(void) XDR_SETPOS(xdrs, 0);
}
/*ARGSUSED*/
static bool_t
{
(void) mutex_lock(&svcraw_lock);
(void) mutex_unlock(&svcraw_lock);
return (FALSE);
}
(void) mutex_unlock(&svcraw_lock);
(void) XDR_SETPOS(xdrs, 0);
}
/*ARGSUSED*/
static bool_t
{
(void) mutex_lock(&svcraw_lock);
(void) mutex_unlock(&svcraw_lock);
return (FALSE);
}
(void) mutex_unlock(&svcraw_lock);
}
/*ARGSUSED*/
static bool_t
{
(void) mutex_lock(&svcraw_lock);
(void) mutex_unlock(&svcraw_lock);
return (FALSE);
}
(void) mutex_unlock(&svcraw_lock);
}
/*ARGSUSED*/
static void
{
}
/*ARGSUSED*/
static bool_t
{
switch (rq) {
case SVCGET_XID: /* fall through for now */
default:
return (FALSE);
}
}
static struct xp_ops *
svc_raw_ops(void)
{
/* VARIABLES PROTECTED BY ops_lock: ops */
(void) mutex_lock(&ops_lock);
}
(void) mutex_unlock(&ops_lock);
return (&ops);
}