kopia lustrzana https://github.com/Hamlib/Hamlib
72 wiersze
1.6 KiB
C
72 wiersze
1.6 KiB
C
![]() |
/*
|
||
|
* Please do not edit this file.
|
||
|
* It was generated using rpcgen.
|
||
|
*/
|
||
|
|
||
|
#include "rpcrig.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
|
||
|
rigprog_1(struct svc_req *rqstp, register SVCXPRT *transp)
|
||
|
{
|
||
|
union {
|
||
|
freq_arg setfreq_1_arg;
|
||
|
vfo_x getfreq_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 GETMODEL:
|
||
|
_xdr_argument = (xdrproc_t) xdr_void;
|
||
|
_xdr_result = (xdrproc_t) xdr_model_x;
|
||
|
local = (char *(*)(char *, struct svc_req *)) getmodel_1_svc;
|
||
|
break;
|
||
|
|
||
|
case SETFREQ:
|
||
|
_xdr_argument = (xdrproc_t) xdr_freq_arg;
|
||
|
_xdr_result = (xdrproc_t) xdr_int;
|
||
|
local = (char *(*)(char *, struct svc_req *)) setfreq_1_svc;
|
||
|
break;
|
||
|
|
||
|
case GETFREQ:
|
||
|
_xdr_argument = (xdrproc_t) xdr_vfo_x;
|
||
|
_xdr_result = (xdrproc_t) xdr_freq_res;
|
||
|
local = (char *(*)(char *, struct svc_req *)) getfreq_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, "%s", "unable to free arguments");
|
||
|
exit (1);
|
||
|
}
|
||
|
return;
|
||
|
}
|