Home | History | Annotate | Download | only in gen-3200
      1 /*
      2  * Please do not edit this file.
      3  * It was generated using rpcgen.
      4  */
      5 
      6 #include "loc_api_cb.h"
      7 #include <stdio.h>
      8 #include <stdlib.h>
      9 #include <rpc/pmap_clnt.h>
     10 #include <string.h>
     11 #include <memory.h>
     12 #include <sys/socket.h>
     13 #include <netinet/in.h>
     14 
     15 #ifndef SIG_PF
     16 #define SIG_PF void(*)(int)
     17 #endif
     18 
     19 void
     20 loc_apicbprog_0x00010001(struct svc_req *rqstp, register SVCXPRT *transp)
     21 {
     22 	union {
     23 		rpc_loc_event_cb_f_type_args rpc_loc_event_cb_f_type_0x00010001_arg;
     24 	} argument;
     25 	union {
     26 		rpc_loc_event_cb_f_type_rets rpc_loc_event_cb_f_type_0x00010001_res;
     27 	} result;
     28 	bool_t retval;
     29 	xdrproc_t _xdr_argument, _xdr_result;
     30 	bool_t (*local)(char *, void *, struct svc_req *);
     31 
     32 	switch (rqstp->rq_proc) {
     33 	case NULLPROC:
     34 		(void) svc_sendreply (transp, (xdrproc_t) xdr_void, (char *)NULL);
     35 		return;
     36 
     37 	case rpc_loc_event_cb_f_type:
     38 		_xdr_argument = (xdrproc_t) xdr_rpc_loc_event_cb_f_type_args;
     39 		_xdr_result = (xdrproc_t) xdr_rpc_loc_event_cb_f_type_rets;
     40 		local = (bool_t (*) (char *, void *,  struct svc_req *))rpc_loc_event_cb_f_type_0x00010001_svc;
     41 		break;
     42 
     43 	default:
     44 		svcerr_noproc (transp);
     45 		return;
     46 	}
     47 	memset ((char *)&argument, 0, sizeof (argument));
     48 	if (!svc_getargs (transp, (xdrproc_t) _xdr_argument, (caddr_t) &argument)) {
     49 		svcerr_decode (transp);
     50 		return;
     51 	}
     52 	retval = (bool_t) (*local)((char *)&argument, (void *)&result, rqstp);
     53 	if (retval > 0 && !svc_sendreply(transp, (xdrproc_t) _xdr_result, (char *)&result)) {
     54 		svcerr_systemerr (transp);
     55 	}
     56 	if (!svc_freeargs (transp, (xdrproc_t) _xdr_argument, (caddr_t) &argument)) {
     57 		fprintf (stderr, "%s", "unable to free arguments");
     58 		exit (1);
     59 	}
     60 	if (!loc_apicbprog_0x00010001_freeresult (transp, _xdr_result, (caddr_t) &result))
     61 		fprintf (stderr, "%s", "unable to free results");
     62 
     63 	return;
     64 }
     65