// -*-c++-*-
/* This file was automatically generated by rpcc. */

#ifndef __RPCC_PMAP_PROT_H_INCLUDED__
#define __RPCC_PMAP_PROT_H_INCLUDED__ 1

#include "xdrmisc.h"

enum { PMAP_PORT = 111 };


struct mapping {
  u_int32_t prog;
  u_int32_t vers;
  u_int32_t prot;
  u_int32_t port;
};
void *mapping_alloc ();
bool_t xdr_mapping (XDR *, void *);
RPC_STRUCT_DECL (mapping)

template<class T> bool
rpc_traverse (T &t, mapping &obj)
{
  return rpc_traverse (t, obj.prog)
    && rpc_traverse (t, obj.vers)
    && rpc_traverse (t, obj.prot)
    && rpc_traverse (t, obj.port);
}



struct pmaplist {
  mapping map;
  rpc_ptr<pmaplist> next;
};
void *pmaplist_alloc ();
bool_t xdr_pmaplist (XDR *, void *);
RPC_STRUCT_DECL (pmaplist)

template<class T> bool
rpc_traverse (T &t, pmaplist &obj)
{
  return rpc_traverse (t, obj.map)
    && rpc_traverse (t, obj.next);
}


typedef rpc_ptr<pmaplist> pmaplist_ptr;
void *pmaplist_ptr_alloc ();
bool_t xdr_pmaplist_ptr (XDR *, void *);
RPC_TYPEDEF_DECL (pmaplist_ptr)


struct call_args {
  u_int32_t prog;
  u_int32_t vers;
  u_int32_t proc;
  rpc_bytes<RPC_INFINITY> args;
};
void *call_args_alloc ();
bool_t xdr_call_args (XDR *, void *);
RPC_STRUCT_DECL (call_args)

template<class T> bool
rpc_traverse (T &t, call_args &obj)
{
  return rpc_traverse (t, obj.prog)
    && rpc_traverse (t, obj.vers)
    && rpc_traverse (t, obj.proc)
    && rpc_traverse (t, obj.args);
}



struct call_result {
  u_int32_t port;
  rpc_bytes<RPC_INFINITY> res;
};
void *call_result_alloc ();
bool_t xdr_call_result (XDR *, void *);
RPC_STRUCT_DECL (call_result)

template<class T> bool
rpc_traverse (T &t, call_result &obj)
{
  return rpc_traverse (t, obj.port)
    && rpc_traverse (t, obj.res);
}


#ifndef PMAP_PROG
#define PMAP_PROG 100000
#endif /* !PMAP_PROG */
extern const rpc_program pmap_prog_2;
enum { PMAP_VERS = 2 };
enum {
  PMAPPROC_NULL = 0,
  PMAPPROC_SET = 1,
  PMAPPROC_UNSET = 2,
  PMAPPROC_GETPORT = 3,
  PMAPPROC_DUMP = 4,
  PMAPPROC_CALLIT = 5,
};
#define PMAP_PROG_2_APPLY_NOVOID(macro, void) \
  macro (PMAPPROC_NULL, void, void) \
  macro (PMAPPROC_SET, mapping, bool) \
  macro (PMAPPROC_UNSET, mapping, bool) \
  macro (PMAPPROC_GETPORT, mapping, u_int32_t) \
  macro (PMAPPROC_DUMP, void, pmaplist_ptr) \
  macro (PMAPPROC_CALLIT, call_args, call_result)
#define PMAP_PROG_2_APPLY(macro) \
  PMAP_PROG_2_APPLY_NOVOID(macro, void)

#endif /* !__RPCC_PMAP_PROT_H_INCLUDED__ */
