2 * Please do not edit this file.
3 * It was generated using rpcgen.
6 #include <rpcsvc/sm_inter.h>
12 #include <rpc/pmap_clnt.h>
16 #include <sys/ttycom.h>
19 #endif /* __cplusplus */
21 #include <sys/socket.h>
22 #include <netinet/in.h>
26 #define SIG_PF void(*)(int)
33 #define _RPCSVC_CLOSEDOWN 120
35 /*static char sccsid[] = "from: @(#)sm_inter.x 1.7 87/06/24 Copyr 1987 Sun Micro";*/
36 /*static char sccsid[] = "from: @(#)sm_inter.x 2.2 88/08/01 4.0 RPCSRC";*/
37 static char rcsid
[] = "$Id: sm_inter_svc.c,v 1.2 2002/09/27 05:04:10 lindak Exp $";
40 void sm_prog_1(struct svc_req
*rqstp
, SVCXPRT
*transp
);
43 sm_prog_1(struct svc_req
*rqstp
, SVCXPRT
*transp
)
46 struct sm_name sm_stat_1_arg
;
47 struct mon sm_mon_1_arg
;
48 struct mon_id sm_unmon_1_arg
;
49 struct my_id sm_unmon_all_1_arg
;
50 struct stat_chge sm_notify_1_arg
;
53 xdrproc_t xdr_argument
, xdr_result
;
54 char *(*local
)(char *, struct svc_req
*);
56 switch (rqstp
->rq_proc
) {
58 (void) svc_sendreply(transp
, (xdrproc_t
) xdr_void
, (char *)NULL
);
62 xdr_argument
= (xdrproc_t
) xdr_sm_name
;
63 xdr_result
= (xdrproc_t
) xdr_sm_stat_res
;
64 local
= (char *(*)(char *, struct svc_req
*)) sm_stat_1_svc
;
68 xdr_argument
= (xdrproc_t
) xdr_mon
;
69 xdr_result
= (xdrproc_t
) xdr_sm_stat_res
;
70 local
= (char *(*)(char *, struct svc_req
*)) sm_mon_1_svc
;
74 xdr_argument
= (xdrproc_t
) xdr_mon_id
;
75 xdr_result
= (xdrproc_t
) xdr_sm_stat
;
76 local
= (char *(*)(char *, struct svc_req
*)) sm_unmon_1_svc
;
80 xdr_argument
= (xdrproc_t
) xdr_my_id
;
81 xdr_result
= (xdrproc_t
) xdr_sm_stat
;
82 local
= (char *(*)(char *, struct svc_req
*)) sm_unmon_all_1_svc
;
86 xdr_argument
= (xdrproc_t
) xdr_void
;
87 xdr_result
= (xdrproc_t
) xdr_void
;
88 local
= (char *(*)(char *, struct svc_req
*)) sm_simu_crash_1_svc
;
92 xdr_argument
= (xdrproc_t
) xdr_stat_chge
;
93 xdr_result
= (xdrproc_t
) xdr_void
;
94 local
= (char *(*)(char *, struct svc_req
*)) sm_notify_1_svc
;
98 svcerr_noproc(transp
);
101 (void) memset((char *)&argument
, 0, sizeof (argument
));
102 if (!svc_getargs(transp
, xdr_argument
, (caddr_t
) &argument
)) {
103 svcerr_decode(transp
);
106 result
= (*local
)((char *)&argument
, rqstp
);
107 if (result
!= NULL
&& !svc_sendreply(transp
, xdr_result
, result
)) {
108 svcerr_systemerr(transp
);
110 if (!svc_freeargs(transp
, xdr_argument
, (caddr_t
) &argument
)) {
111 syslog(LOG_ERR
, "unable to free arguments");