Back to index

glibc  2.9
Functions
yp_xdr.c File Reference
#include <rpcsvc/yp.h>
#include <rpcsvc/ypclnt.h>

Go to the source code of this file.

Functions

bool_t xdr_ypstat (XDR *xdrs, ypstat *objp)
 libnsl_hidden_def (xdr_ypstat)
 libnsl_hidden_def (xdr_ypxfrstat)
 libnsl_hidden_def (xdr_domainname)
 libnsl_hidden_def (xdr_mapname)
 libnsl_hidden_def (xdr_peername)
 libnsl_hidden_def (xdr_keydat)
 libnsl_hidden_def (xdr_valdat)
 libnsl_hidden_def (xdr_ypmap_parms)
 libnsl_hidden_def (xdr_ypreq_key)
 libnsl_hidden_def (xdr_ypreq_nokey)
bool_t xdr_ypresp_val (XDR *xdrs, ypresp_val *objp)
 libnsl_hidden_def (xdr_ypresp_val)
 libnsl_hidden_def (xdr_ypresp_key_val)
 libnsl_hidden_def (xdr_ypresp_master)
 libnsl_hidden_def (xdr_ypresp_order)
 libnsl_hidden_def (xdr_ypresp_all)
bool_t xdr_ypmaplist (XDR *xdrs, ypmaplist *objp)
 libnsl_hidden_def (xdr_ypmaplist)
 libnsl_hidden_def (xdr_ypresp_maplist)
 libnsl_hidden_def (xdr_yppush_status)
bool_t xdr_ypbind_resptype (XDR *xdrs, ypbind_resptype *objp)
 libnsl_hidden_def (xdr_ypbind_resptype)
 libnsl_hidden_def (xdr_ypbind_binding)
 libnsl_hidden_def (xdr_ypbind_resp)
bool_t xdr_ypall (XDR *xdrs, struct ypall_callback *incallback)

Function Documentation

Definition at line 38 of file yp_xdr.c.

{
  return xdr_enum (xdrs, (enum_t *) objp);
}

Here is the call graph for this function:

libnsl_hidden_def ( xdr_ypxfrstat  )

Definition at line 45 of file yp_xdr.c.

{
  return xdr_string (xdrs, objp, ~0);
}

Here is the call graph for this function:

Definition at line 52 of file yp_xdr.c.

{
  return xdr_string (xdrs, objp, ~0);
}

Here is the call graph for this function:

libnsl_hidden_def ( xdr_mapname  )

Definition at line 59 of file yp_xdr.c.

{
  return xdr_string (xdrs, objp, ~0);
}

Here is the call graph for this function:

libnsl_hidden_def ( xdr_peername  )

Definition at line 66 of file yp_xdr.c.

{
  return xdr_bytes (xdrs, (char **) &objp->keydat_val,
                  (u_int *) &objp->keydat_len, ~0);
}

Here is the call graph for this function:

libnsl_hidden_def ( xdr_keydat  )

Definition at line 74 of file yp_xdr.c.

{
  return xdr_bytes (xdrs, (char **) &objp->valdat_val,
                  (u_int *) &objp->valdat_len, ~0);
}

Here is the call graph for this function:

libnsl_hidden_def ( xdr_valdat  )

Definition at line 82 of file yp_xdr.c.

{
  if (!xdr_domainname (xdrs, &objp->domain))
    return FALSE;
  if (!xdr_mapname (xdrs, &objp->map))
    return FALSE;
  if (!xdr_u_int (xdrs, &objp->ordernum))
    return FALSE;
  return xdr_peername (xdrs, &objp->peer);
}

Here is the call graph for this function:

Definition at line 95 of file yp_xdr.c.

{
  if (!xdr_domainname (xdrs, &objp->domain))
    return FALSE;
  if (!xdr_mapname (xdrs, &objp->map))
    return FALSE;
  return xdr_keydat (xdrs, &objp->key);
}

Here is the call graph for this function:

Definition at line 106 of file yp_xdr.c.

{
  if (!xdr_domainname (xdrs, &objp->domain))
    return FALSE;
  return xdr_mapname (xdrs, &objp->map);
}

Here is the call graph for this function:

Definition at line 115 of file yp_xdr.c.

{
  if (!xdr_ypmap_parms (xdrs, &objp->map_parms))
    return FALSE;
  if (!xdr_u_int (xdrs, &objp->transid))
    return FALSE;
  if (!xdr_u_int (xdrs, &objp->prog))
    return FALSE;
  return xdr_u_int (xdrs, &objp->port);
}

Here is the call graph for this function:

Definition at line 136 of file yp_xdr.c.

{
  if (!xdr_ypstat (xdrs, &objp->stat))
    return FALSE;
  if (!xdr_valdat (xdrs, &objp->val))
    return FALSE;
  return xdr_keydat (xdrs, &objp->key);
}

Here is the call graph for this function:

Definition at line 147 of file yp_xdr.c.

{
  if (!xdr_ypstat (xdrs, &objp->stat))
    return FALSE;
  return xdr_peername (xdrs, &objp->peer);
}

Here is the call graph for this function:

Definition at line 156 of file yp_xdr.c.

{
  if (!xdr_ypstat (xdrs, &objp->stat))
    return FALSE;
  return xdr_u_int (xdrs, &objp->ordernum);
}

Here is the call graph for this function:

Definition at line 165 of file yp_xdr.c.

{
  if (!xdr_bool (xdrs, &objp->more))
    return FALSE;
  switch (objp->more)
    {
    case TRUE:
      return xdr_ypresp_key_val (xdrs, &objp->ypresp_all_u.val);
    case FALSE:
      break;
    default:
      return FALSE;
    }
  return TRUE;
}

Here is the call graph for this function:

Definition at line 183 of file yp_xdr.c.

{
  if (!xdr_u_int (xdrs, &objp->transid))
    return FALSE;
  return xdr_ypxfrstat (xdrs, &objp->xfrstat);
}

Here is the call graph for this function:

Definition at line 202 of file yp_xdr.c.

{
  if (!xdr_ypstat (xdrs, &objp->stat))
    return FALSE;
  /* Prevent gcc warning about alias violation.  */
  char **tp = (void *) &objp->maps;
  return xdr_pointer (xdrs, tp, sizeof (ypmaplist), (xdrproc_t) xdr_ypmaplist);
}

Here is the call graph for this function:

Definition at line 213 of file yp_xdr.c.

{
  return xdr_enum (xdrs, (enum_t *) objp);
}

Here is the call graph for this function:

libnsl_hidden_def ( xdr_yppush_status  )

Definition at line 220 of file yp_xdr.c.

{
  if (!xdr_u_int (xdrs, &objp->transid))
    return FALSE;
  return xdr_yppush_status (xdrs, &objp->status);
}

Here is the call graph for this function:

Definition at line 235 of file yp_xdr.c.

{
  if (!xdr_opaque (xdrs, objp->ypbind_binding_addr, 4))
    return FALSE;
  return xdr_opaque (xdrs, objp->ypbind_binding_port, 2);
}

Here is the call graph for this function:

Definition at line 244 of file yp_xdr.c.

{
  if (!xdr_ypbind_resptype (xdrs, &objp->ypbind_status))
    return FALSE;
  switch (objp->ypbind_status)
    {
    case YPBIND_FAIL_VAL:
      return xdr_u_int (xdrs, &objp->ypbind_resp_u.ypbind_error);
    case YPBIND_SUCC_VAL:
      return xdr_ypbind_binding (xdrs, &objp->ypbind_resp_u.ypbind_bindinfo);
    }
  return FALSE;
}

Here is the call graph for this function:

Definition at line 260 of file yp_xdr.c.

{
  if (!xdr_domainname (xdrs, &objp->ypsetdom_domain))
    return FALSE;
  if (!xdr_ypbind_binding (xdrs, &objp->ypsetdom_binding))
    return FALSE;
  return xdr_u_int (xdrs, &objp->ypsetdom_vers);
}

Here is the call graph for this function:

bool_t xdr_ypall ( XDR xdrs,
struct ypall_callback incallback 
)

Definition at line 273 of file yp_xdr.c.

{
    struct ypresp_key_val out;
    char key[YPMAXRECORD], val[YPMAXRECORD];

    /*
     * Set up key/val struct to be used during the transaction.
     */
    memset(&out, 0, sizeof out);
    out.key.keydat_val = key;
    out.key.keydat_len = sizeof(key);
    out.val.valdat_val = val;
    out.val.valdat_len = sizeof(val);

    for (;;) {
       bool_t more, status;

       /* Values pending? */
       if (!xdr_bool(xdrs, &more))
           return FALSE;           /* can't tell! */
       if (!more)
           return TRUE;            /* no more */

       /* Transfer key/value pair. */
       status = xdr_ypresp_key_val(xdrs, &out);

       /*
        * If we succeeded, call the callback function.
        * The callback will return TRUE when it wants
        * no more values.  If we fail, indicate the
        * error.
        */
       if (status) {
           if ((*incallback->foreach)(out.stat,
                                   (char *)out.key.keydat_val, out.key.keydat_len,
                                   (char *)out.val.valdat_val, out.val.valdat_len,
                                   incallback->data))
              return TRUE;
       } else
           return FALSE;
    }
}

Here is the call graph for this function:

bool_t xdr_ypbind_resptype ( XDR xdrs,
ypbind_resptype objp 
)

Definition at line 231 of file yp_xdr.c.

{
  return xdr_enum (xdrs, (enum_t *) objp);
}

Here is the call graph for this function:

Here is the caller graph for this function:

bool_t xdr_ypmaplist ( XDR xdrs,
ypmaplist objp 
)

Definition at line 194 of file yp_xdr.c.

{
  if (!xdr_mapname (xdrs, &objp->map))
    return FALSE;
  /* Prevent gcc warning about alias violation.  */
  char **tp = (void *) &objp->next;
  return xdr_pointer (xdrs, tp, sizeof (ypmaplist), (xdrproc_t) xdr_ypmaplist);
}

Here is the call graph for this function:

Here is the caller graph for this function:

bool_t xdr_ypresp_val ( XDR xdrs,
ypresp_val objp 
)

Definition at line 130 of file yp_xdr.c.

{
  if (!xdr_ypstat (xdrs, &objp->stat))
    return FALSE;
  return xdr_valdat (xdrs, &objp->val);
}

Here is the call graph for this function:

Here is the caller graph for this function:

bool_t xdr_ypstat ( XDR xdrs,
ypstat objp 
)

Definition at line 34 of file yp_xdr.c.

{
  return xdr_enum (xdrs, (enum_t *) objp);
}

Here is the call graph for this function: