Back to index

glibc  2.9
Classes | Functions | Variables
svc_raw.c File Reference
#include <rpc/rpc.h>
#include <rpc/svc.h>

Go to the source code of this file.

Classes

struct  svcraw_private_s

Functions

static bool_t svcraw_recv (SVCXPRT *, struct rpc_msg *)
static enum xprt_stat svcraw_stat (SVCXPRT *)
static bool_t svcraw_getargs (SVCXPRT *, xdrproc_t, caddr_t)
static bool_t svcraw_reply (SVCXPRT *, struct rpc_msg *)
static bool_t svcraw_freeargs (SVCXPRT *, xdrproc_t, caddr_t)
static void svcraw_destroy (SVCXPRT *)
SVCXPRTsvcraw_create (void)

Variables

static struct svcraw_private_ssvcraw_private
static struct xp_ops

Class Documentation

struct svcraw_private_s

Definition at line 49 of file svc_raw.c.

Class Members
char _raw_buf
SVCXPRT server
char verf_body
XDR xdr_stream

Function Documentation

SVCXPRT* svcraw_create ( void  )

Definition at line 80 of file svc_raw.c.

{
  struct svcraw_private_s *srp = svcraw_private;

  if (srp == 0)
    {
      srp = (struct svcraw_private_s *) calloc (1, sizeof (*srp));
      if (srp == 0)
       return NULL;
    }
  srp->server.xp_sock = 0;
  srp->server.xp_port = 0;
  srp->server.xp_ops = (struct xp_ops *) &server_ops;
  srp->server.xp_verf.oa_base = srp->verf_body;
  INTUSE(xdrmem_create) (&srp->xdr_stream, srp->_raw_buf, UDPMSGSIZE,
                      XDR_FREE);
  return &srp->server;
}

Here is the call graph for this function:

static void svcraw_destroy ( SVCXPRT xprt) [static]

Definition at line 164 of file svc_raw.c.

{
}
static bool_t svcraw_freeargs ( SVCXPRT xprt,
xdrproc_t  xdr_args,
caddr_t  args_ptr 
) [static]

Definition at line 151 of file svc_raw.c.

{
  struct svcraw_private_s *srp = svcraw_private;
  XDR *xdrs;

  if (srp == 0)
    return FALSE;
  xdrs = &srp->xdr_stream;
  xdrs->x_op = XDR_FREE;
  return (*xdr_args) (xdrs, args_ptr);
}
static bool_t svcraw_getargs ( SVCXPRT xprt,
xdrproc_t  xdr_args,
caddr_t  args_ptr 
) [static]

Definition at line 141 of file svc_raw.c.

{
  struct svcraw_private_s *srp = svcraw_private;

  if (srp == 0)
    return FALSE;
  return (*xdr_args) (&srp->xdr_stream, args_ptr);
}
static bool_t svcraw_recv ( SVCXPRT xprt,
struct rpc_msg msg 
) [static]

Definition at line 106 of file svc_raw.c.

{
  struct svcraw_private_s *srp = svcraw_private;
  XDR *xdrs;

  if (srp == 0)
    return FALSE;
  xdrs = &srp->xdr_stream;
  xdrs->x_op = XDR_DECODE;
  XDR_SETPOS (xdrs, 0);
  if (!INTUSE(xdr_callmsg) (xdrs, msg))
    return FALSE;
  return TRUE;
}

Here is the call graph for this function:

static bool_t svcraw_reply ( SVCXPRT xprt,
struct rpc_msg msg 
) [static]

Definition at line 124 of file svc_raw.c.

{
  struct svcraw_private_s *srp = svcraw_private;
  XDR *xdrs;

  if (srp == 0)
    return FALSE;
  xdrs = &srp->xdr_stream;
  xdrs->x_op = XDR_ENCODE;
  XDR_SETPOS (xdrs, 0);
  if (!INTUSE(xdr_replymsg) (xdrs, msg))
    return FALSE;
  (void) XDR_GETPOS (xdrs); /* called just for overhead */
  return TRUE;
}

Here is the call graph for this function:

static enum xprt_stat svcraw_stat ( SVCXPRT xprt) [static]

Definition at line 100 of file svc_raw.c.

{
  return XPRT_IDLE;
}

Variable Documentation

struct svcraw_private_s* svcraw_private [static]

Definition at line 59 of file svc_raw.c.

struct xp_ops [static]
Initial value:

Definition at line 69 of file svc_raw.c.