Problem making a RPC server



Hi!

I´m making a RPC server, I´m using the code generated by RPCGen from
a .x file. The client code works ok. But I´m trying to make the serve.
Some function don´t work well, pmap_unset function dosen´t work, it
returns me false. svcudp_create or svctcp_create actually return me a
handler (I think they are ok) but sve_register dosen´t either work, it
returns false. I don´t know why they don´t work ok. Does anyone know
it? The main source code where I create the serve is bellow:

int
main(argc, argv)
int argc;
char *argv[];
{
SVCXPRT *transp = NULL;
(void) pmap_unset(PROG, PROG1);

transp = svcudp_create(RPC_ANYSOCK);
if (transp == NULL)
exit(1);
if (!svc_register(transp, PROG, PROG1, prog_1, IPPROTO_UDP))
exit(1);
transp = svctcp_create(RPC_ANYSOCK, 0, 0);
if (transp == NULL)
exit(1);
if (!svc_register(transp, PROG, PROG1, prog_1,IPPROTO_TCP))
exit(1);
svc_register(transp, PROG, PROG1, prog_1,IPPROTO_TCP);
svc_run();
exit(1);
}

Thanks.

.



Relevant Pages

  • Problem making a RPC server
    ... SVCXPRT *transp = NULL; ... pmap_unset(PROG, PROG1); ... if (!svc_register(transp, PROG, PROG1, prog_1, IPPROTO_UDP)) ...
    (comp.sys.mac.programmer.help)
  • Re: Problem making a RPC server
    ... me a server handler but the svc_register function dosen´t work. ... SVCXPRT *transp = NULL; ... pmap_unset(PROG, PROG1); ... if (!svc_register(transp, PROG, PROG1, prog_1, IPPROTO_UDP)) ...
    (comp.sys.mac.programmer.help)
  • Problem making a RPC server
    ... me a server handler but the svc_register function dosen´t work. ... SVCXPRT *transp = NULL; ... pmap_unset(PROG, PROG1); ... if (!svc_register(transp, PROG, PROG1, prog_1, IPPROTO_UDP)) ...
    (comp.sys.mac.programmer.help)
  • Re: Need help designing a closure properly
    ... > what does the prog1 block do? ... 2- if you suspect it may be a macro, you can macroexpand-1 it. ... (PROG, PROG* and PROGV are something completely different). ... Usually, you'd just use (pop rows), which already contains a PROG1: ...
    (comp.lang.lisp)
  • Re: cmd line pipe
    ... I have 2 progs and need the output-file of the 1st prog as the ... prog1 and prog2 are C-binaries. ... must accept a pipe as a file argument (if, for instance, ...
    (comp.unix.shell)