]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - tests/nsm_client/nlm_sm_inter_svc.c
Imported Upstream version 1.2.8
[nfs-utils.git] / tests / nsm_client / nlm_sm_inter_svc.c
diff --git a/tests/nsm_client/nlm_sm_inter_svc.c b/tests/nsm_client/nlm_sm_inter_svc.c
new file mode 100644 (file)
index 0000000..d7ee9e0
--- /dev/null
@@ -0,0 +1,99 @@
+/*
+ * Please do not edit this file.
+ * It was generated using rpcgen.
+ */
+
+#include "nlm_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
+
+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;
+}