/*
* 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.
*/
/*
*
* Memory based rpc for simple testing and timing.
* Interface to create an rpc client and server in the same process.
* This lets us similate rpc and get round trip overhead, without
* any interference from the kernel.
*/
#include "mt.h"
#include "rpc_mt.h"
#include <stdlib.h>
#include <syslog.h>
extern mutex_t clntraw_lock;
#ifndef UDPMSGSIZE
#endif
/*
* This is the "network" we will be moving stuff over.
*/
static struct clnt_raw_private {
} *clnt_raw_private;
static struct clnt_ops *clnt_raw_ops();
extern void svc_getreq_common(int);
extern bool_t xdr_opaque_auth();
/*
* Create a client handle for memory based rpc.
*/
CLIENT *
{
/* VARIABLES PROTECTED BY clntraw_lock: clp */
(void) mutex_lock(&clntraw_lock);
(void) mutex_unlock(&clntraw_lock);
return (NULL);
}
if (_rawcombuf == NULL) {
if (_rawcombuf == NULL) {
"out of memory.");
if (clp)
(void) mutex_unlock(&clntraw_lock);
return (NULL);
}
}
}
/*
* pre-serialize the static part of the call msg and stash it away
*/
(const char *) "clnt_raw_create : \
Fatal header serialization error.");
/*
*/
/*
* create client handle
*/
(void) mutex_unlock(&clntraw_lock);
return (client);
}
/*ARGSUSED*/
static enum clnt_stat
{
(void) mutex_lock(&clntraw_lock);
(void) mutex_unlock(&clntraw_lock);
return (RPC_FAILED);
}
(void) mutex_unlock(&clntraw_lock);
/*
* send request
*/
XDR_SETPOS(xdrs, 0);
/* LINTED pointer alignment */
return (RPC_CANTENCODEARGS);
/*
* We have to call server input routine here because this is
* all going on in one process.
* By convention using FD_SETSIZE as the pseudo file descriptor.
*/
/*
* get results
*/
XDR_SETPOS(xdrs, 0);
return (RPC_CANTDECODERES);
else {
}
if (status == RPC_SUCCESS) {
}
/* end successful completion */
} else {
goto call_again;
/* end of unsuccessful completion */
}
if (status == RPC_SUCCESS) {
}
(void) xdr_opaque_auth(xdrs,
}
}
return (status);
}
/*ARGSUSED*/
static enum clnt_stat
{
(void) mutex_lock(&clntraw_lock);
(void) mutex_unlock(&clntraw_lock);
return (RPC_FAILED);
}
(void) mutex_unlock(&clntraw_lock);
/*
* send request
*/
XDR_SETPOS(xdrs, 0);
/* LINTED pointer alignment */
return (RPC_CANTENCODEARGS);
/*
* We have to call server input routine here because this is
* all going on in one process.
* By convention using FD_SETSIZE as the pseudo file descriptor.
*/
return (RPC_SUCCESS);
}
/*ARGSUSED*/
static void
{
}
/*ARGSUSED*/
static bool_t
{
(void) mutex_lock(&clntraw_lock);
(void) mutex_unlock(&clntraw_lock);
return (FALSE);
}
(void) mutex_unlock(&clntraw_lock);
}
/*ARGSUSED*/
static void
{
}
/*ARGSUSED*/
static bool_t
{
return (FALSE);
}
/*ARGSUSED*/
static void
{
}
static struct clnt_ops *
clnt_raw_ops(void)
{
/* VARIABLES PROTECTED BY ops_lock: ops */
(void) mutex_lock(&ops_lock);
}
(void) mutex_unlock(&ops_lock);
return (&ops);
}