Back to index

glibc  2.9
Classes | Functions
pmap_rmt.h File Reference
#include <features.h>
#include <sys/types.h>
#include <rpc/types.h>
#include <rpc/xdr.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  rmtcallargs
struct  rmtcallres

Functions

bool_t xdr_rmtcall_args (XDR *__xdrs, struct rmtcallargs *__crp) __THROW
bool_t xdr_rmtcallres (XDR *__xdrs, struct rmtcallres *__crp) __THROW

Class Documentation

struct rmtcallargs

Definition at line 48 of file pmap_rmt.h.

Collaboration diagram for rmtcallargs:
Class Members
u_long arglen
caddr_t args_ptr
u_long proc
u_long prog
u_long vers
xdrproc_t xdr_args
struct rmtcallres

Definition at line 57 of file pmap_rmt.h.

Collaboration diagram for rmtcallres:
Class Members
u_long * port_ptr
caddr_t results_ptr
u_long resultslen
xdrproc_t xdr_results

Function Documentation

bool_t xdr_rmtcall_args ( XDR __xdrs,
struct rmtcallargs __crp 
)

Definition at line 120 of file pmap_rmt.c.

{
  u_int lenposition, argposition, position;

  if (INTUSE(xdr_u_long) (xdrs, &(cap->prog)) &&
      INTUSE(xdr_u_long) (xdrs, &(cap->vers)) &&
      INTUSE(xdr_u_long) (xdrs, &(cap->proc)))
    {
      u_long dummy_arglen = 0;
      lenposition = XDR_GETPOS (xdrs);
      if (!INTUSE(xdr_u_long) (xdrs, &dummy_arglen))
       return FALSE;
      argposition = XDR_GETPOS (xdrs);
      if (!(*(cap->xdr_args)) (xdrs, cap->args_ptr))
       return FALSE;
      position = XDR_GETPOS (xdrs);
      cap->arglen = (u_long) position - (u_long) argposition;
      XDR_SETPOS (xdrs, lenposition);
      if (!INTUSE(xdr_u_long) (xdrs, &(cap->arglen)))
       return FALSE;
      XDR_SETPOS (xdrs, position);
      return TRUE;
    }
  return FALSE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

bool_t xdr_rmtcallres ( XDR __xdrs,
struct rmtcallres __crp 
)

Definition at line 152 of file pmap_rmt.c.

{
  caddr_t port_ptr;

  port_ptr = (caddr_t) crp->port_ptr;
  if (INTUSE(xdr_reference) (xdrs, &port_ptr, sizeof (u_long),
                          (xdrproc_t) INTUSE(xdr_u_long))
      && INTUSE(xdr_u_long) (xdrs, &crp->resultslen))
    {
      crp->port_ptr = (u_long *) port_ptr;
      return (*(crp->xdr_results)) (xdrs, crp->results_ptr);
    }
  return FALSE;
}

Here is the call graph for this function:

Here is the caller graph for this function: