X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=tests%2Fnsm_client%2Fnlm_sm_inter_svc.c;fp=tests%2Fnsm_client%2Fnlm_sm_inter_svc.c;h=d7ee9e0134dc3b587145b87d371daf2daf8bf685;hp=0000000000000000000000000000000000000000;hb=e0b66eaad419b466ecfac1b82d4802bb5fb676d0;hpb=10fba47663b2f6c695ebe315cbe3b464350b0060 diff --git a/tests/nsm_client/nlm_sm_inter_svc.c b/tests/nsm_client/nlm_sm_inter_svc.c new file mode 100644 index 0000000..d7ee9e0 --- /dev/null +++ b/tests/nsm_client/nlm_sm_inter_svc.c @@ -0,0 +1,99 @@ +/* + * Please do not edit this file. + * It was generated using rpcgen. + */ + +#include "nlm_sm_inter.h" +#include +#include +#include +#include +#include +#include +#include + +#ifndef SIG_PF +#define SIG_PF void(*)(int) +#endif + +void +nlm_sm_prog_3(struct svc_req *rqstp, register SVCXPRT *transp) +{ + union { + struct nlm_sm_notify nlm_sm_notify_3_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 NLM_SM_NOTIFY: + _xdr_argument = (xdrproc_t) xdr_nlm_sm_notify; + _xdr_result = (xdrproc_t) xdr_void; + local = (char *(*)(char *, struct svc_req *)) nlm_sm_notify_3_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; +} + +void +nlm_sm_prog_4(struct svc_req *rqstp, register SVCXPRT *transp) +{ + union { + struct nlm_sm_notify nlm_sm_notify_4_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 NLM_SM_NOTIFY: + _xdr_argument = (xdrproc_t) xdr_nlm_sm_notify; + _xdr_result = (xdrproc_t) xdr_void; + local = (char *(*)(char *, struct svc_req *)) nlm_sm_notify_4_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; +}