rpc_svc.c revision 9fb67ea305c66b6a297583b9b0db6796b0dfe497
/*
* 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 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Please do not edit this file.
* It was generated using rpcgen.
* Edit idmap_prot.x and rebuild this file with
* rpcgen -CMNm -o idmap_prot_svc.c.new ../../../uts/common/rpcsvc/idmap_prot.x
* then merge as required. A recent version of rpcgen is needed to
* produce this exact file; when the revised rpcgen is available in the
* build environment this file can be built automatically.
*/
#include "../../../uts/common/rpcsvc/idmap_prot.h"
#include <stdio.h>
#include <stdlib.h> /* getenv, exit */
#include <signal.h>
#include <string.h> /* strcmp */
#include <unistd.h> /* setsid */
#include <memory.h>
#include <stropts.h>
#include <syslog.h>
#ifndef SIG_PF
#define SIG_PF void(*)(int)
#endif
#ifdef DEBUG
#define RPC_SVC_FG
#endif
#define _RPCSVC_CLOSEDOWN 120
extern int _rpcpmstart; /* Started by a port monitor ? */
/* States a server can be in wrt request */
#define _IDLE 0
#define _SERVED 1
/* LINTED static unused if no main */
static int _rpcsvccount = 0; /* Number of requests being serviced */
#if defined(RPC_MSGOUT)
extern void RPC_MSGOUT(const char *, ...);
#else /* defined(RPC_MSGOUT) */
static void
{
#ifdef RPC_SVC_FG
if (_rpcpmstart)
else {
}
#else
#endif
}
#endif /* defined(RPC_MSGOUT) */
/* ARGSUSED */
int
void *argp,
void *result,
{
}
int
{
}
int
{
return (idmap_list_mappings_1_svc(
}
int
{
return (idmap_list_namerules_1_svc(
}
int
{
}
int
{
}
int
{
}
int
{
return (directory_get_common_1_svc(
}
int
{
}
void
{
union {
} argument;
union {
} result;
(void) mutex_lock(&_svcstate_lock);
_rpcsvccount++;
(void) mutex_unlock(&_svcstate_lock);
case IDMAP_NULL:
_xdr_result = (xdrproc_t)
break;
case IDMAP_GET_MAPPED_IDS:
_xdr_result = (xdrproc_t)
break;
case IDMAP_LIST_MAPPINGS:
_xdr_result = (xdrproc_t)
break;
case IDMAP_LIST_NAMERULES:
_xdr_result = (xdrproc_t)
break;
case IDMAP_UPDATE:
_xdr_result = (xdrproc_t)
break;
_xdr_result = (xdrproc_t)
break;
case IDMAP_GET_PROP:
_xdr_result = (xdrproc_t)
break;
case DIRECTORY_GET_COMMON:
_xdr_result = (xdrproc_t)
break;
case IDMAP_FLUSH:
_xdr_result = (xdrproc_t)
break;
default:
(void) mutex_lock(&_svcstate_lock);
_rpcsvccount--;
(void) mutex_unlock(&_svcstate_lock);
return; /* CSTYLED */
}
(void) mutex_lock(&_svcstate_lock);
_rpcsvccount--;
(void) mutex_unlock(&_svcstate_lock);
return; /* CSTYLED */
}
if (_xdr_result && retval > 0 &&
}
RPC_MSGOUT("%s",
"unable to free arguments");
exit(1);
}
if (_xdr_result != NULL) {
RPC_MSGOUT("%s",
"unable to free results");
}
(void) mutex_lock(&_svcstate_lock);
_rpcsvccount--;
(void) mutex_unlock(&_svcstate_lock);
return; /* CSTYLED */
}