
enum msg_type
{
  CALL, REPLY = 1
}
 ;
enum reply_stat
{
  MSG_ACCEPTED, MSG_DENIED = 1
}
 ;
enum accept_stat
{
  SUCCESS, PROG_UNAVAIL = 1, PROG_MISMATCH = 2, PROC_UNAVAIL =
    3, GARBAGE_ARGS = 4, SYSTEM_ERR = 5
}
 ;
enum reject_stat
{
  RPC_MISMATCH, AUTH_ERROR = 1
}
 ;

struct accepted_reply
{
  struct opaque_auth ar_verf;
  enum accept_stat ar_stat;
  union
  {
    struct
    {
      unsigned long low;
      unsigned long high;
    }
    AR_versions;
    struct
    {
      caddr_t where;
      xdrproc_t proc;
    }
    AR_results;
  }
  ru;
}
 ;

struct rejected_reply
{
  enum reject_stat rj_stat;
  union
  {
    struct
    {
      unsigned long low;
      unsigned long high;
    }
    RJ_versions;
    enum auth_stat RJ_why;
  }
  ru;
}
 ;

struct reply_body
{
  enum reply_stat rp_stat;
  union
  {
    struct accepted_reply RP_ar;
    struct rejected_reply RP_dr;
  }
  ru;
}
 ;

struct call_body
{
  unsigned long cb_rpcvers;
  unsigned long cb_prog;
  unsigned long cb_vers;
  unsigned long cb_proc;
  struct opaque_auth cb_cred;
  struct opaque_auth cb_verf;
}
 ;

struct rpc_msg
{
  unsigned long rm_xid;
  enum msg_type rm_direction;
  union
  {
    struct call_body RM_cmb;
    struct reply_body RM_rmb;
  }
  ru;
}
 ;
