Lines Matching defs:svc
33 * svc.c, Server-side remote procedure call interface.
36 * for handling transport handles. The svc routines handle the
106 void svc_dispatch(registered_server *svc, SVCXPRT *xprt);
200 registered_server *svc = svc_find_nosync(xprt, prog, vers, NULL);
202 return svc;
210 registered_server* svc;
216 svc = svc_find_nosync(xprt, prog, vers, NULL);
218 if (svc) {
221 return svc->dispatch == dispatch;
224 svc = malloc(sizeof(registered_server));
237 svc->xdr = NULL;
238 svc->x_prog = prog;
239 svc->x_vers = vers;
242 svc->xdr = xdr_init_common("/dev/oncrpc/00000000:0",
244 if (svc->xdr == NULL) {
246 free(svc);
255 if (r_control(svc->xdr->fd,
260 xdr_destroy_common(svc->xdr);
261 free(svc);
266 FD_SET(svc->xdr->fd, &xprt->fdset);
267 if (svc->xdr->fd > xprt->max_fd) xprt->max_fd = svc->xdr->fd;
268 svc->x_prog = svc->xdr->x_prog = prog;
269 svc->x_vers = svc->xdr->x_vers = vers;
272 svc->dispatch = dispatch;
273 svc->next = xprt->servers;
274 xprt->servers = svc;
278 svc->xprt = xprt;
362 void svc_dispatch(registered_server *svc, SVCXPRT *xprt)
372 svc->xdr->fd, svc->x_prog, svc->x_vers);
374 uint32 prog = ntohl(((uint32 *)(svc->xdr->in_msg))[RPC_OFFSET+3]);
375 uint32 vers = ntohl(((uint32 *)(svc->xdr->in_msg))[RPC_OFFSET+4]);
376 uint32 proc = ntohl(((uint32 *)(svc->xdr->in_msg))[RPC_OFFSET+5]);
378 if (ntohl(((uint32 *)svc->xdr->in_msg)[RPC_OFFSET+1]) != RPC_MSG_CALL) {
383 if (prog != svc->x_prog) {
385 (unsigned)prog, (unsigned)svc->x_prog);
389 if (vers != svc->xdr->x_vers) {
391 vers, svc->xdr->x_vers);
400 D("START: SVC DISPATCH %08x:%08x --> %08x\n",
407 svc->xdr->in_next = (RPC_OFFSET + 6 + 4)*sizeof(uint32);
409 svc->active = getpid();
410 svc->xdr->x_op = XDR_DECODE;
411 svc->dispatch(&req, (SVCXPRT *)svc);
412 svc->active = 0;
413 D("DONE: SVC DISPATCH %08x:%08x --> %08x\n",