Back to index

glibc  2.9
pmap_prot2.c File Reference
#include <rpc/types.h>
#include <rpc/xdr.h>
#include <rpc/pmap_prot.h>

Go to the source code of this file.


bool_t xdr_pmaplist (XDR *xdrs, struct pmaplist **rp)

Function Documentation

bool_t xdr_pmaplist ( XDR xdrs,
struct pmaplist **  rp 

Definition at line 85 of file pmap_prot2.c.

   * more_elements is pre-computed in case the direction is
   * XDR_ENCODE or XDR_FREE.  more_elements is overwritten by
   * xdr_bool when the direction is XDR_DECODE.
  bool_t more_elements;
  int freeing = (xdrs->x_op == XDR_FREE);
  struct pmaplist *next = NULL;

  while (TRUE)
      more_elements = (bool_t) (*rp != NULL);
      if (!INTUSE(xdr_bool) (xdrs, &more_elements))
       return FALSE;
      if (!more_elements)
       return TRUE;         /* we are done */
       * the unfortunate side effect of non-recursion is that in
       * the case of freeing we must remember the next object
       * before we free the current object ...
      if (freeing)
       next = (*rp)->pml_next;
      if (!INTUSE(xdr_reference) (xdrs, (caddr_t *) rp,
                              (u_int) sizeof (struct pmaplist),
                              (xdrproc_t) INTUSE(xdr_pmap)))
         return FALSE;
      rp = freeing ? &next : &((*rp)->pml_next);

Here is the call graph for this function:

Here is the caller graph for this function: