-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcvstool_svc.c
72 lines (64 loc) · 1.81 KB
/
cvstool_svc.c
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
/*
* Please do not edit this file.
* It was generated using rpcgen.
*/
#include "cvstool.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
extern void
cvstool_program_1(struct svc_req *rqstp, register SVCXPRT *transp)
{
union {
cvstool_ls_args cvstool_ls_1_arg;
cvstool_lsver_args cvstool_lsver_1_arg;
cvstool_update_args cvstool_update_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 CVSTOOL_LS:
_xdr_argument = (xdrproc_t) xdr_cvstool_ls_args;
_xdr_result = (xdrproc_t) xdr_cvstool_ls_resp;
local = (char *(*)(char *, struct svc_req *)) cvstool_ls_1_svc;
break;
case CVSTOOL_LSVER:
_xdr_argument = (xdrproc_t) xdr_cvstool_lsver_args;
_xdr_result = (xdrproc_t) xdr_cvstool_lsver_resp;
local = (char *(*)(char *, struct svc_req *)) cvstool_lsver_1_svc;
break;
case CVSTOOL_UPDATE:
_xdr_argument = (xdrproc_t) xdr_cvstool_update_args;
_xdr_result = (xdrproc_t) xdr_cvstool_update_resp;
local = (char *(*)(char *, struct svc_req *)) cvstool_update_1_svc;
break;
default:
svcerr_noproc (transp);
return;
}
memset ((char *)&argument, 0, sizeof (argument));
if (!svc_getargs (transp, _xdr_argument, (caddr_t) &argument)) {
svcerr_decode (transp);
return;
}
result = (*local)((char *)&argument, rqstp);
if (result != NULL && !svc_sendreply(transp, _xdr_result, result)) {
svcerr_systemerr (transp);
}
if (!svc_freeargs (transp, _xdr_argument, (caddr_t) &argument)) {
fprintf (stderr, "unable to free arguments");
exit (1);
}
return;
}