1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
|
/*
* Please do not edit this file.
* It was generated using rpcgen.
*/
#include "sm_inter.h"
#include <stdio.h>
#include <stdlib.h>
#include <rpc/pmap_clnt.h>
#include <string.h>
#include <memory.h>
#include <sys/socket.h>
#include <netinet/in.h>
#ifndef SIG_PF
#define SIG_PF void(*)(int)
#endif
#define SM_INTER_X
void
sm_prog_1(struct svc_req *rqstp, register SVCXPRT *transp)
{
union {
struct sm_name sm_stat_1_arg;
struct mon sm_mon_1_arg;
struct mon_id sm_unmon_1_arg;
struct my_id sm_unmon_all_1_arg;
struct stat_chge sm_notify_1_arg;
} argument;
char *result;
xdrproc_t _xdr_argument, _xdr_result;
char *(*local)(char *, struct svc_req *);
switch (rqstp->rq_proc) {
case NULLPROC:
(void) svc_sendreply (transp, (xdrproc_t) xdr_void, (char *)NULL);
return;
case SM_STAT:
_xdr_argument = (xdrproc_t) xdr_sm_name;
_xdr_result = (xdrproc_t) xdr_sm_stat_res;
local = (char *(*)(char *, struct svc_req *)) sm_stat_1_svc;
break;
case SM_MON:
_xdr_argument = (xdrproc_t) xdr_mon;
_xdr_result = (xdrproc_t) xdr_sm_stat_res;
local = (char *(*)(char *, struct svc_req *)) sm_mon_1_svc;
break;
case SM_UNMON:
_xdr_argument = (xdrproc_t) xdr_mon_id;
_xdr_result = (xdrproc_t) xdr_sm_stat;
local = (char *(*)(char *, struct svc_req *)) sm_unmon_1_svc;
break;
case SM_UNMON_ALL:
_xdr_argument = (xdrproc_t) xdr_my_id;
_xdr_result = (xdrproc_t) xdr_sm_stat;
local = (char *(*)(char *, struct svc_req *)) sm_unmon_all_1_svc;
break;
case SM_SIMU_CRASH:
_xdr_argument = (xdrproc_t) xdr_void;
_xdr_result = (xdrproc_t) xdr_void;
local = (char *(*)(char *, struct svc_req *)) sm_simu_crash_1_svc;
break;
case SM_NOTIFY:
_xdr_argument = (xdrproc_t) xdr_stat_chge;
_xdr_result = (xdrproc_t) xdr_void;
local = (char *(*)(char *, struct svc_req *)) sm_notify_1_svc;
break;
default:
svcerr_noproc (transp);
return;
}
memset ((char *)&argument, 0, sizeof (argument));
if (!svc_getargs (transp, (xdrproc_t) _xdr_argument, (caddr_t) &argument)) {
svcerr_decode (transp);
return;
}
result = (*local)((char *)&argument, rqstp);
if (result != NULL && !svc_sendreply(transp, (xdrproc_t) _xdr_result, result)) {
svcerr_systemerr (transp);
}
if (!svc_freeargs (transp, (xdrproc_t) _xdr_argument, (caddr_t) &argument)) {
fprintf (stderr, "%s", "unable to free arguments");
exit (1);
}
return;
}
|