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

#ifndef __RPCC_SFS_PROT_H_INCLUDED__
#define __RPCC_SFS_PROT_H_INCLUDED__ 1

#include "xdrmisc.h"
#include "bigint.h"
#include "nfs3exp_prot.h"

enum { SFS_PORT = 4 };
enum { SFS_RELEASE = 7 };

enum sfsstat {
  SFS_OK = 0,
  SFS_BADLOGIN = 1,
  SFS_NOSUCHHOST = 2,
  SFS_NOTSUPP = 10004,
  SFS_TEMPERR = 10008,
  SFS_REDIRECT = 10020,
};
void *sfsstat_alloc ();
bool_t xdr_sfsstat (XDR *, void *);
RPC_ENUM_DECL (sfsstat)

template<class T> inline bool
rpc_traverse (T &t, sfsstat &obj)
{
  u_int32_t val = obj;
  if (!rpc_traverse (t, val))
    return false;
  obj = sfsstat (val);
  return true;
}

enum sfs_msgtype {
  SFS_NULL = 0,
  SFS_HOSTINFO = 1,
  SFS_KSC = 2,
  SFS_KCS = 3,
  SFS_SESSINFO = 4,
  SFS_AUTHINFO = 5,
  SFS_SIGNED_AUTHREQ = 6,
  SFS_AUTHREGISTER = 7,
  SFS_AUTHUPDATE = 8,
  SFS_PATHREVOKE = 9,
  SFS_KEYCERT = 10,
  SFS_ROFSINFO = 11,
  SFS_UPDATEREQ = 12,
  SFS_PUBKEY2_HASH = 13,
  SFS_SIGNED_AUTHREQ_NOCRED = 14,
};
void *sfs_msgtype_alloc ();
bool_t xdr_sfs_msgtype (XDR *, void *);
RPC_ENUM_DECL (sfs_msgtype)

template<class T> inline bool
rpc_traverse (T &t, sfs_msgtype &obj)
{
  u_int32_t val = obj;
  if (!rpc_traverse (t, val))
    return false;
  obj = sfs_msgtype (val);
  return true;
}

enum sfs_service {
  SFS_SFS = 1,
  SFS_AUTHSERV = 2,
  SFS_REX = 3,
};
void *sfs_service_alloc ();
bool_t xdr_sfs_service (XDR *, void *);
RPC_ENUM_DECL (sfs_service)

template<class T> inline bool
rpc_traverse (T &t, sfs_service &obj)
{
  u_int32_t val = obj;
  if (!rpc_traverse (t, val))
    return false;
  obj = sfs_service (val);
  return true;
}

typedef rpc_str<RPC_INFINITY> sfs_extension;
void *sfs_extension_alloc ();
bool_t xdr_sfs_extension (XDR *, void *);
RPC_TYPEDEF_DECL (sfs_extension)

typedef rpc_str<222> sfs_hostname;
void *sfs_hostname_alloc ();
bool_t xdr_sfs_hostname (XDR *, void *);
RPC_TYPEDEF_DECL (sfs_hostname)

typedef rpc_str<32> sfs_idname;
void *sfs_idname_alloc ();
bool_t xdr_sfs_idname (XDR *, void *);
RPC_TYPEDEF_DECL (sfs_idname)

typedef rpc_opaque<20> sfs_hash;
void *sfs_hash_alloc ();
bool_t xdr_sfs_hash (XDR *, void *);
RPC_TYPEDEF_DECL (sfs_hash)

typedef rpc_opaque<16> sfs_secret;
void *sfs_secret_alloc ();
bool_t xdr_sfs_secret (XDR *, void *);
RPC_TYPEDEF_DECL (sfs_secret)

typedef u_int64_t sfs_seqno;
void *sfs_seqno_alloc ();
bool_t xdr_sfs_seqno (XDR *, void *);
RPC_TYPEDEF_DECL (sfs_seqno)

typedef u_int64_t sfs_time;
void *sfs_time_alloc ();
bool_t xdr_sfs_time (XDR *, void *);
RPC_TYPEDEF_DECL (sfs_time)

typedef bigint sfs_pubkey;
void *sfs_pubkey_alloc ();
bool_t xdr_sfs_pubkey (XDR *, void *);
RPC_TYPEDEF_DECL (sfs_pubkey)

typedef bigint sfs_ctext;
void *sfs_ctext_alloc ();
bool_t xdr_sfs_ctext (XDR *, void *);
RPC_TYPEDEF_DECL (sfs_ctext)

typedef bigint sfs_sig;
void *sfs_sig_alloc ();
bool_t xdr_sfs_sig (XDR *, void *);
RPC_TYPEDEF_DECL (sfs_sig)

enum sfs_keytype {
  SFS_NOKEY = 0,
  SFS_RABIN = 1,
  SFS_2SCHNORR = 2,
  SFS_SCHNORR = 3,
  SFS_1SCHNORR = 4,
};
void *sfs_keytype_alloc ();
bool_t xdr_sfs_keytype (XDR *, void *);
RPC_ENUM_DECL (sfs_keytype)

template<class T> inline bool
rpc_traverse (T &t, sfs_keytype &obj)
{
  u_int32_t val = obj;
  if (!rpc_traverse (t, val))
    return false;
  obj = sfs_keytype (val);
  return true;
}


struct sfs_1schnorr_priv_xdr {
  bigint p;
  bigint q;
  bigint g;
  bigint y;
  bigint x;
};
void *sfs_1schnorr_priv_xdr_alloc ();
bool_t xdr_sfs_1schnorr_priv_xdr (XDR *, void *);
RPC_STRUCT_DECL (sfs_1schnorr_priv_xdr)

template<class T> bool
rpc_traverse (T &t, sfs_1schnorr_priv_xdr &obj)
{
  return rpc_traverse (t, obj.p)
    && rpc_traverse (t, obj.q)
    && rpc_traverse (t, obj.g)
    && rpc_traverse (t, obj.y)
    && rpc_traverse (t, obj.x);
}



struct sfs_2schnorr_priv_xdr {
  bigint p;
  bigint q;
  bigint g;
  bigint y;
  bigint x;
  sfs_hostname hostname;
  sfs_idname uname;
  rpc_str<RPC_INFINITY> audit;
};
void *sfs_2schnorr_priv_xdr_alloc ();
bool_t xdr_sfs_2schnorr_priv_xdr (XDR *, void *);
RPC_STRUCT_DECL (sfs_2schnorr_priv_xdr)

template<class T> bool
rpc_traverse (T &t, sfs_2schnorr_priv_xdr &obj)
{
  return rpc_traverse (t, obj.p)
    && rpc_traverse (t, obj.q)
    && rpc_traverse (t, obj.g)
    && rpc_traverse (t, obj.y)
    && rpc_traverse (t, obj.x)
    && rpc_traverse (t, obj.hostname)
    && rpc_traverse (t, obj.uname)
    && rpc_traverse (t, obj.audit);
}



struct sfs_2schnorr_priv_export {
  sfs_keytype kt;
  sfs_hash cksum;
  rpc_vec<sfs_2schnorr_priv_xdr, 2> privkeys;
};
void *sfs_2schnorr_priv_export_alloc ();
bool_t xdr_sfs_2schnorr_priv_export (XDR *, void *);
RPC_STRUCT_DECL (sfs_2schnorr_priv_export)

template<class T> bool
rpc_traverse (T &t, sfs_2schnorr_priv_export &obj)
{
  return rpc_traverse (t, obj.kt)
    && rpc_traverse (t, obj.cksum)
    && rpc_traverse (t, obj.privkeys);
}



struct sfs_1schnorr_priv_export {
  sfs_keytype kt;
  sfs_hash cksum;
  sfs_1schnorr_priv_xdr privkey;
};
void *sfs_1schnorr_priv_export_alloc ();
bool_t xdr_sfs_1schnorr_priv_export (XDR *, void *);
RPC_STRUCT_DECL (sfs_1schnorr_priv_export)

template<class T> bool
rpc_traverse (T &t, sfs_1schnorr_priv_export &obj)
{
  return rpc_traverse (t, obj.kt)
    && rpc_traverse (t, obj.cksum)
    && rpc_traverse (t, obj.privkey);
}



struct sfs_schnorr_pub_xdr {
  bigint p;
  bigint q;
  bigint g;
  bigint y;
};
void *sfs_schnorr_pub_xdr_alloc ();
bool_t xdr_sfs_schnorr_pub_xdr (XDR *, void *);
RPC_STRUCT_DECL (sfs_schnorr_pub_xdr)

template<class T> bool
rpc_traverse (T &t, sfs_schnorr_pub_xdr &obj)
{
  return rpc_traverse (t, obj.p)
    && rpc_traverse (t, obj.q)
    && rpc_traverse (t, obj.g)
    && rpc_traverse (t, obj.y);
}



struct sfs_schnorr_sig {
  bigint r;
  bigint s;
};
void *sfs_schnorr_sig_alloc ();
bool_t xdr_sfs_schnorr_sig (XDR *, void *);
RPC_STRUCT_DECL (sfs_schnorr_sig)

template<class T> bool
rpc_traverse (T &t, sfs_schnorr_sig &obj)
{
  return rpc_traverse (t, obj.r)
    && rpc_traverse (t, obj.s);
}



struct sfs_2schnorr_presig {
  bigint r;
};
void *sfs_2schnorr_presig_alloc ();
bool_t xdr_sfs_2schnorr_presig (XDR *, void *);
RPC_STRUCT_DECL (sfs_2schnorr_presig)

template<class T> inline bool
rpc_traverse (T &t, sfs_2schnorr_presig &obj)
{
  return rpc_traverse (t, obj.r);
}



struct sfs_rabin_priv_export {
  bigint p;
  bigint q;
  sfs_hash cksum;
};
void *sfs_rabin_priv_export_alloc ();
bool_t xdr_sfs_rabin_priv_export (XDR *, void *);
RPC_STRUCT_DECL (sfs_rabin_priv_export)

template<class T> bool
rpc_traverse (T &t, sfs_rabin_priv_export &obj)
{
  return rpc_traverse (t, obj.p)
    && rpc_traverse (t, obj.q)
    && rpc_traverse (t, obj.cksum);
}



struct sfs_rabin_priv_xdr {
  bigint p;
  bigint q;
};
void *sfs_rabin_priv_xdr_alloc ();
bool_t xdr_sfs_rabin_priv_xdr (XDR *, void *);
RPC_STRUCT_DECL (sfs_rabin_priv_xdr)

template<class T> bool
rpc_traverse (T &t, sfs_rabin_priv_xdr &obj)
{
  return rpc_traverse (t, obj.p)
    && rpc_traverse (t, obj.q);
}


typedef rpc_bytes<RPC_INFINITY> sfs_privkey2;
void *sfs_privkey2_alloc ();
bool_t xdr_sfs_privkey2 (XDR *, void *);
RPC_TYPEDEF_DECL (sfs_privkey2)


struct sfs_pubkey2 {
  const sfs_keytype type;
  union {
    union_entry_base _base;
    union_entry<bigint> rabin;
    union_entry<sfs_schnorr_pub_xdr> schnorr;
  };

#define rpcunion_tag_sfs_pubkey2 type
#define rpcunion_switch_sfs_pubkey2(swarg, action, voidaction, defaction) \
  switch (swarg) { \
  case SFS_RABIN: \
    action (bigint, rabin); \
    break; \
  case SFS_SCHNORR: \
    action (sfs_schnorr_pub_xdr, schnorr); \
    break; \
  default: \
    voidaction; \
    break; \
  }

  sfs_pubkey2 (sfs_keytype _tag = (sfs_keytype) 0) : type (_tag)
    { _base.init (); set_type (_tag); }
  sfs_pubkey2 (const sfs_pubkey2 &_s)
    : type (_s.type)
    { _base.init (_s._base); }
  ~sfs_pubkey2 () { _base.destroy (); }
  sfs_pubkey2 &operator= (const sfs_pubkey2 &_s) {
    const_cast<sfs_keytype &> (type) = _s.type;
    _base.assign (_s._base);
    return *this;
  }

  void set_type (sfs_keytype _tag) {
    const_cast<sfs_keytype &> (type) = _tag;
    rpcunion_switch_sfs_pubkey2
      (_tag, RPCUNION_SET, _base.destroy (), _base.destroy ());
  }
};

template<class T> bool
rpc_traverse (T &t, sfs_pubkey2 &obj)
{
  sfs_keytype tag = obj.type;
  if (!rpc_traverse (t, tag))
    return false;
  if (tag != obj.type)
    obj.set_type (tag);

  rpcunion_switch_sfs_pubkey2
    (obj.type, RPCUNION_TRAVERSE, return true, return false);
}
inline bool
rpc_traverse (const stompcast_t &s, sfs_pubkey2 &obj)
{
  rpcunion_switch_sfs_pubkey2
    (obj.type, RPCUNION_REC_STOMPCAST,
     obj._base.destroy (); return true, obj._base.destroy (); return true;);
}
void *sfs_pubkey2_alloc ();
bool_t xdr_sfs_pubkey2 (XDR *, void *);
RPC_UNION_DECL (sfs_pubkey2)



struct sfs_ctext2 {
  const sfs_keytype type;
  union {
    union_entry_base _base;
    union_entry<bigint> rabin;
  };

#define rpcunion_tag_sfs_ctext2 type
#define rpcunion_switch_sfs_ctext2(swarg, action, voidaction, defaction) \
  switch (swarg) { \
  case SFS_RABIN: \
    action (bigint, rabin); \
    break; \
  default: \
    defaction; \
    break; \
  }

  sfs_ctext2 (sfs_keytype _tag = (sfs_keytype) 0) : type (_tag)
    { _base.init (); set_type (_tag); }
  sfs_ctext2 (const sfs_ctext2 &_s)
    : type (_s.type)
    { _base.init (_s._base); }
  ~sfs_ctext2 () { _base.destroy (); }
  sfs_ctext2 &operator= (const sfs_ctext2 &_s) {
    const_cast<sfs_keytype &> (type) = _s.type;
    _base.assign (_s._base);
    return *this;
  }

  void set_type (sfs_keytype _tag) {
    const_cast<sfs_keytype &> (type) = _tag;
    rpcunion_switch_sfs_ctext2
      (_tag, RPCUNION_SET, _base.destroy (), _base.destroy ());
  }
};

template<class T> bool
rpc_traverse (T &t, sfs_ctext2 &obj)
{
  sfs_keytype tag = obj.type;
  if (!rpc_traverse (t, tag))
    return false;
  if (tag != obj.type)
    obj.set_type (tag);

  rpcunion_switch_sfs_ctext2
    (obj.type, RPCUNION_TRAVERSE, return true, return false);
}
inline bool
rpc_traverse (const stompcast_t &s, sfs_ctext2 &obj)
{
  rpcunion_switch_sfs_ctext2
    (obj.type, RPCUNION_REC_STOMPCAST,
     obj._base.destroy (); return true, obj._base.destroy (); return true;);
}
void *sfs_ctext2_alloc ();
bool_t xdr_sfs_ctext2 (XDR *, void *);
RPC_UNION_DECL (sfs_ctext2)



struct sfs_sig2 {
  const sfs_keytype type;
  union {
    union_entry_base _base;
    union_entry<bigint> rabin;
    union_entry<sfs_schnorr_sig> schnorr;
  };

#define rpcunion_tag_sfs_sig2 type
#define rpcunion_switch_sfs_sig2(swarg, action, voidaction, defaction) \
  switch (swarg) { \
  case SFS_RABIN: \
    action (bigint, rabin); \
    break; \
  case SFS_SCHNORR: \
    action (sfs_schnorr_sig, schnorr); \
    break; \
  default: \
    voidaction; \
    break; \
  }

  sfs_sig2 (sfs_keytype _tag = (sfs_keytype) 0) : type (_tag)
    { _base.init (); set_type (_tag); }
  sfs_sig2 (const sfs_sig2 &_s)
    : type (_s.type)
    { _base.init (_s._base); }
  ~sfs_sig2 () { _base.destroy (); }
  sfs_sig2 &operator= (const sfs_sig2 &_s) {
    const_cast<sfs_keytype &> (type) = _s.type;
    _base.assign (_s._base);
    return *this;
  }

  void set_type (sfs_keytype _tag) {
    const_cast<sfs_keytype &> (type) = _tag;
    rpcunion_switch_sfs_sig2
      (_tag, RPCUNION_SET, _base.destroy (), _base.destroy ());
  }
};

template<class T> bool
rpc_traverse (T &t, sfs_sig2 &obj)
{
  sfs_keytype tag = obj.type;
  if (!rpc_traverse (t, tag))
    return false;
  if (tag != obj.type)
    obj.set_type (tag);

  rpcunion_switch_sfs_sig2
    (obj.type, RPCUNION_TRAVERSE, return true, return false);
}
inline bool
rpc_traverse (const stompcast_t &s, sfs_sig2 &obj)
{
  rpcunion_switch_sfs_sig2
    (obj.type, RPCUNION_REC_STOMPCAST,
     obj._base.destroy (); return true, obj._base.destroy (); return true;);
}
void *sfs_sig2_alloc ();
bool_t xdr_sfs_sig2 (XDR *, void *);
RPC_UNION_DECL (sfs_sig2)



struct sfs_hashcharge {
  u_int32_t bitcost;
  sfs_hash target;
};
void *sfs_hashcharge_alloc ();
bool_t xdr_sfs_hashcharge (XDR *, void *);
RPC_STRUCT_DECL (sfs_hashcharge)

template<class T> bool
rpc_traverse (T &t, sfs_hashcharge &obj)
{
  return rpc_traverse (t, obj.bitcost)
    && rpc_traverse (t, obj.target);
}


typedef rpc_opaque<64> sfs_hashpay;
void *sfs_hashpay_alloc ();
bool_t xdr_sfs_hashpay (XDR *, void *);
RPC_TYPEDEF_DECL (sfs_hashpay)


struct sfs_hostinfo {
  sfs_msgtype type;
  sfs_hostname hostname;
  sfs_pubkey pubkey;
};
void *sfs_hostinfo_alloc ();
bool_t xdr_sfs_hostinfo (XDR *, void *);
RPC_STRUCT_DECL (sfs_hostinfo)

template<class T> bool
rpc_traverse (T &t, sfs_hostinfo &obj)
{
  return rpc_traverse (t, obj.type)
    && rpc_traverse (t, obj.hostname)
    && rpc_traverse (t, obj.pubkey);
}



struct sfs_pubkey2_hash {
  sfs_msgtype type;
  sfs_pubkey2 pubkey;
};
void *sfs_pubkey2_hash_alloc ();
bool_t xdr_sfs_pubkey2_hash (XDR *, void *);
RPC_STRUCT_DECL (sfs_pubkey2_hash)

template<class T> bool
rpc_traverse (T &t, sfs_pubkey2_hash &obj)
{
  return rpc_traverse (t, obj.type)
    && rpc_traverse (t, obj.pubkey);
}



struct sfs_hostinfo2 {
  sfs_msgtype type;
  sfs_hostname hostname;
  u_int32_t port;
  sfs_pubkey2 pubkey;
};
void *sfs_hostinfo2_alloc ();
bool_t xdr_sfs_hostinfo2 (XDR *, void *);
RPC_STRUCT_DECL (sfs_hostinfo2)

template<class T> bool
rpc_traverse (T &t, sfs_hostinfo2 &obj)
{
  return rpc_traverse (t, obj.type)
    && rpc_traverse (t, obj.hostname)
    && rpc_traverse (t, obj.port)
    && rpc_traverse (t, obj.pubkey);
}



struct sfs_connectinfo_4 {
  sfs_service service;
  sfs_hostname name;
  sfs_hash hostid;
  rpc_vec<sfs_extension, RPC_INFINITY> extensions;
};
void *sfs_connectinfo_4_alloc ();
bool_t xdr_sfs_connectinfo_4 (XDR *, void *);
RPC_STRUCT_DECL (sfs_connectinfo_4)

template<class T> bool
rpc_traverse (T &t, sfs_connectinfo_4 &obj)
{
  return rpc_traverse (t, obj.service)
    && rpc_traverse (t, obj.name)
    && rpc_traverse (t, obj.hostid)
    && rpc_traverse (t, obj.extensions);
}



struct sfs_connectinfo_5 {
  u_int32_t release;
  sfs_service service;
  filename3 sname;
  rpc_vec<sfs_extension, RPC_INFINITY> extensions;
};
void *sfs_connectinfo_5_alloc ();
bool_t xdr_sfs_connectinfo_5 (XDR *, void *);
RPC_STRUCT_DECL (sfs_connectinfo_5)

template<class T> bool
rpc_traverse (T &t, sfs_connectinfo_5 &obj)
{
  return rpc_traverse (t, obj.release)
    && rpc_traverse (t, obj.service)
    && rpc_traverse (t, obj.sname)
    && rpc_traverse (t, obj.extensions);
}



struct sfs_connectinfo {
  const u_int32_t civers;
  union {
    union_entry_base _base;
    union_entry<sfs_connectinfo_4> ci4;
    union_entry<sfs_connectinfo_5> ci5;
  };

#define rpcunion_tag_sfs_connectinfo civers
#define rpcunion_switch_sfs_connectinfo(swarg, action, voidaction, defaction) \
  switch (swarg) { \
  case 4: \
    action (sfs_connectinfo_4, ci4); \
    break; \
  case 5: \
    action (sfs_connectinfo_5, ci5); \
    break; \
  default: \
    defaction; \
    break; \
  }

  sfs_connectinfo (u_int32_t _tag = (u_int32_t) 0) : civers (_tag)
    { _base.init (); set_civers (_tag); }
  sfs_connectinfo (const sfs_connectinfo &_s)
    : civers (_s.civers)
    { _base.init (_s._base); }
  ~sfs_connectinfo () { _base.destroy (); }
  sfs_connectinfo &operator= (const sfs_connectinfo &_s) {
    const_cast<u_int32_t &> (civers) = _s.civers;
    _base.assign (_s._base);
    return *this;
  }

  void set_civers (u_int32_t _tag) {
    const_cast<u_int32_t &> (civers) = _tag;
    rpcunion_switch_sfs_connectinfo
      (_tag, RPCUNION_SET, _base.destroy (), _base.destroy ());
  }
};

template<class T> bool
rpc_traverse (T &t, sfs_connectinfo &obj)
{
  u_int32_t tag = obj.civers;
  if (!rpc_traverse (t, tag))
    return false;
  if (tag != obj.civers)
    obj.set_civers (tag);

  rpcunion_switch_sfs_connectinfo
    (obj.civers, RPCUNION_TRAVERSE, return true, return false);
}
inline bool
rpc_traverse (const stompcast_t &s, sfs_connectinfo &obj)
{
  rpcunion_switch_sfs_connectinfo
    (obj.civers, RPCUNION_REC_STOMPCAST,
     obj._base.destroy (); return true, obj._base.destroy (); return true;);
}
void *sfs_connectinfo_alloc ();
bool_t xdr_sfs_connectinfo (XDR *, void *);
RPC_UNION_DECL (sfs_connectinfo)



struct sfs_servinfo_5 {
  sfs_hostinfo host;
  u_int32_t prog;
  u_int32_t vers;
};
void *sfs_servinfo_5_alloc ();
bool_t xdr_sfs_servinfo_5 (XDR *, void *);
RPC_STRUCT_DECL (sfs_servinfo_5)

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



struct sfs_servinfo_7 {
  u_int32_t release;
  sfs_hostinfo2 host;
  u_int32_t prog;
  u_int32_t vers;
};
void *sfs_servinfo_7_alloc ();
bool_t xdr_sfs_servinfo_7 (XDR *, void *);
RPC_STRUCT_DECL (sfs_servinfo_7)

template<class T> bool
rpc_traverse (T &t, sfs_servinfo_7 &obj)
{
  return rpc_traverse (t, obj.release)
    && rpc_traverse (t, obj.host)
    && rpc_traverse (t, obj.prog)
    && rpc_traverse (t, obj.vers);
}



struct sfs_servinfo {
  const u_int32_t sivers;
  union {
    union_entry_base _base;
    union_entry<sfs_servinfo_5> cr5;
    union_entry<sfs_servinfo_7> cr7;
  };

#define rpcunion_tag_sfs_servinfo sivers
#define rpcunion_switch_sfs_servinfo(swarg, action, voidaction, defaction) \
  switch (swarg) { \
  case 5: \
  case 6: \
    action (sfs_servinfo_5, cr5); \
    break; \
  case 7: \
    action (sfs_servinfo_7, cr7); \
    break; \
  default: \
    defaction; \
    break; \
  }

  sfs_servinfo (u_int32_t _tag = (u_int32_t) 0) : sivers (_tag)
    { _base.init (); set_sivers (_tag); }
  sfs_servinfo (const sfs_servinfo &_s)
    : sivers (_s.sivers)
    { _base.init (_s._base); }
  ~sfs_servinfo () { _base.destroy (); }
  sfs_servinfo &operator= (const sfs_servinfo &_s) {
    const_cast<u_int32_t &> (sivers) = _s.sivers;
    _base.assign (_s._base);
    return *this;
  }

  void set_sivers (u_int32_t _tag) {
    const_cast<u_int32_t &> (sivers) = _tag;
    rpcunion_switch_sfs_servinfo
      (_tag, RPCUNION_SET, _base.destroy (), _base.destroy ());
  }
};

template<class T> bool
rpc_traverse (T &t, sfs_servinfo &obj)
{
  u_int32_t tag = obj.sivers;
  if (!rpc_traverse (t, tag))
    return false;
  if (tag != obj.sivers)
    obj.set_sivers (tag);

  rpcunion_switch_sfs_servinfo
    (obj.sivers, RPCUNION_TRAVERSE, return true, return false);
}
inline bool
rpc_traverse (const stompcast_t &s, sfs_servinfo &obj)
{
  rpcunion_switch_sfs_servinfo
    (obj.sivers, RPCUNION_REC_STOMPCAST,
     obj._base.destroy (); return true, obj._base.destroy (); return true;);
}
void *sfs_servinfo_alloc ();
bool_t xdr_sfs_servinfo (XDR *, void *);
RPC_UNION_DECL (sfs_servinfo)



struct sfs_sesskeydat {
  sfs_msgtype type;
  sfs_servinfo si;
  sfs_secret sshare;
  sfs_connectinfo ci;
  sfs_pubkey kc;
  sfs_secret cshare;
};
void *sfs_sesskeydat_alloc ();
bool_t xdr_sfs_sesskeydat (XDR *, void *);
RPC_STRUCT_DECL (sfs_sesskeydat)

template<class T> bool
rpc_traverse (T &t, sfs_sesskeydat &obj)
{
  return rpc_traverse (t, obj.type)
    && rpc_traverse (t, obj.si)
    && rpc_traverse (t, obj.sshare)
    && rpc_traverse (t, obj.ci)
    && rpc_traverse (t, obj.kc)
    && rpc_traverse (t, obj.cshare);
}



struct sfs_sessinfo {
  sfs_msgtype type;
  rpc_bytes<RPC_INFINITY> ksc;
  rpc_bytes<RPC_INFINITY> kcs;
};
void *sfs_sessinfo_alloc ();
bool_t xdr_sfs_sessinfo (XDR *, void *);
RPC_STRUCT_DECL (sfs_sessinfo)

template<class T> bool
rpc_traverse (T &t, sfs_sessinfo &obj)
{
  return rpc_traverse (t, obj.type)
    && rpc_traverse (t, obj.ksc)
    && rpc_traverse (t, obj.kcs);
}



struct sfs_authinfo {
  sfs_msgtype type;
  sfs_service service;
  sfs_hostname name;
  sfs_hash hostid;
  sfs_hash sessid;
};
void *sfs_authinfo_alloc ();
bool_t xdr_sfs_authinfo (XDR *, void *);
RPC_STRUCT_DECL (sfs_authinfo)

template<class T> bool
rpc_traverse (T &t, sfs_authinfo &obj)
{
  return rpc_traverse (t, obj.type)
    && rpc_traverse (t, obj.service)
    && rpc_traverse (t, obj.name)
    && rpc_traverse (t, obj.hostid)
    && rpc_traverse (t, obj.sessid);
}



struct sfs_kmsg {
  sfs_secret kcs_share;
  sfs_secret ksc_share;
};
void *sfs_kmsg_alloc ();
bool_t xdr_sfs_kmsg (XDR *, void *);
RPC_STRUCT_DECL (sfs_kmsg)

template<class T> bool
rpc_traverse (T &t, sfs_kmsg &obj)
{
  return rpc_traverse (t, obj.kcs_share)
    && rpc_traverse (t, obj.ksc_share);
}



struct sfs_keycert_msg {
  sfs_msgtype type;
  u_int32_t duration;
  sfs_time start;
  sfs_pubkey key;
};
void *sfs_keycert_msg_alloc ();
bool_t xdr_sfs_keycert_msg (XDR *, void *);
RPC_STRUCT_DECL (sfs_keycert_msg)

template<class T> bool
rpc_traverse (T &t, sfs_keycert_msg &obj)
{
  return rpc_traverse (t, obj.type)
    && rpc_traverse (t, obj.duration)
    && rpc_traverse (t, obj.start)
    && rpc_traverse (t, obj.key);
}



struct sfs_keycert {
  sfs_keycert_msg msg;
  sfs_sig sig;
};
void *sfs_keycert_alloc ();
bool_t xdr_sfs_keycert (XDR *, void *);
RPC_STRUCT_DECL (sfs_keycert)

template<class T> bool
rpc_traverse (T &t, sfs_keycert &obj)
{
  return rpc_traverse (t, obj.msg)
    && rpc_traverse (t, obj.sig);
}



struct sfs_signed_authreq {
  sfs_msgtype type;
  sfs_hash authid;
  sfs_seqno seqno;
  rpc_opaque<16> usrinfo;
};
void *sfs_signed_authreq_alloc ();
bool_t xdr_sfs_signed_authreq (XDR *, void *);
RPC_STRUCT_DECL (sfs_signed_authreq)

template<class T> bool
rpc_traverse (T &t, sfs_signed_authreq &obj)
{
  return rpc_traverse (t, obj.type)
    && rpc_traverse (t, obj.authid)
    && rpc_traverse (t, obj.seqno)
    && rpc_traverse (t, obj.usrinfo);
}



struct sfs_redirect {
  sfs_time serial;
  sfs_time expire;
  sfs_hostinfo2 hostinfo;
};
void *sfs_redirect_alloc ();
bool_t xdr_sfs_redirect (XDR *, void *);
RPC_STRUCT_DECL (sfs_redirect)

template<class T> bool
rpc_traverse (T &t, sfs_redirect &obj)
{
  return rpc_traverse (t, obj.serial)
    && rpc_traverse (t, obj.expire)
    && rpc_traverse (t, obj.hostinfo);
}



struct sfs_pathrevoke_msg {
  sfs_msgtype type;
  sfs_hostinfo2 path;
  rpc_ptr<sfs_redirect> redirect;
};
void *sfs_pathrevoke_msg_alloc ();
bool_t xdr_sfs_pathrevoke_msg (XDR *, void *);
RPC_STRUCT_DECL (sfs_pathrevoke_msg)

template<class T> bool
rpc_traverse (T &t, sfs_pathrevoke_msg &obj)
{
  return rpc_traverse (t, obj.type)
    && rpc_traverse (t, obj.path)
    && rpc_traverse (t, obj.redirect);
}



struct sfs_pathrevoke {
  sfs_pathrevoke_msg msg;
  sfs_sig2 sig;
};
void *sfs_pathrevoke_alloc ();
bool_t xdr_sfs_pathrevoke (XDR *, void *);
RPC_STRUCT_DECL (sfs_pathrevoke)

template<class T> bool
rpc_traverse (T &t, sfs_pathrevoke &obj)
{
  return rpc_traverse (t, obj.msg)
    && rpc_traverse (t, obj.sig);
}


typedef sfs_connectinfo sfs_connectarg;
void *sfs_connectarg_alloc ();
bool_t xdr_sfs_connectarg (XDR *, void *);
RPC_TYPEDEF_DECL (sfs_connectarg)


struct sfs_connectok {
  sfs_servinfo servinfo;
  sfs_hashcharge charge;
};
void *sfs_connectok_alloc ();
bool_t xdr_sfs_connectok (XDR *, void *);
RPC_STRUCT_DECL (sfs_connectok)

template<class T> bool
rpc_traverse (T &t, sfs_connectok &obj)
{
  return rpc_traverse (t, obj.servinfo)
    && rpc_traverse (t, obj.charge);
}



struct sfs_connectres {
  const sfsstat status;
  union {
    union_entry_base _base;
    union_entry<sfs_connectok> reply;
    union_entry<sfs_pathrevoke> revoke;
  };

#define rpcunion_tag_sfs_connectres status
#define rpcunion_switch_sfs_connectres(swarg, action, voidaction, defaction) \
  switch (swarg) { \
  case SFS_OK: \
    action (sfs_connectok, reply); \
    break; \
  case SFS_REDIRECT: \
    action (sfs_pathrevoke, revoke); \
    break; \
  default: \
    voidaction; \
    break; \
  }

  sfs_connectres (sfsstat _tag = (sfsstat) 0) : status (_tag)
    { _base.init (); set_status (_tag); }
  sfs_connectres (const sfs_connectres &_s)
    : status (_s.status)
    { _base.init (_s._base); }
  ~sfs_connectres () { _base.destroy (); }
  sfs_connectres &operator= (const sfs_connectres &_s) {
    const_cast<sfsstat &> (status) = _s.status;
    _base.assign (_s._base);
    return *this;
  }

  void set_status (sfsstat _tag) {
    const_cast<sfsstat &> (status) = _tag;
    rpcunion_switch_sfs_connectres
      (_tag, RPCUNION_SET, _base.destroy (), _base.destroy ());
  }
};

template<class T> bool
rpc_traverse (T &t, sfs_connectres &obj)
{
  sfsstat tag = obj.status;
  if (!rpc_traverse (t, tag))
    return false;
  if (tag != obj.status)
    obj.set_status (tag);

  rpcunion_switch_sfs_connectres
    (obj.status, RPCUNION_TRAVERSE, return true, return false);
}
inline bool
rpc_traverse (const stompcast_t &s, sfs_connectres &obj)
{
  rpcunion_switch_sfs_connectres
    (obj.status, RPCUNION_REC_STOMPCAST,
     obj._base.destroy (); return true, obj._base.destroy (); return true;);
}
void *sfs_connectres_alloc ();
bool_t xdr_sfs_connectres (XDR *, void *);
RPC_UNION_DECL (sfs_connectres)



struct sfs_encryptarg {
  sfs_hashpay payment;
  sfs_ctext kmsg;
  sfs_pubkey pubkey;
};
void *sfs_encryptarg_alloc ();
bool_t xdr_sfs_encryptarg (XDR *, void *);
RPC_STRUCT_DECL (sfs_encryptarg)

template<class T> bool
rpc_traverse (T &t, sfs_encryptarg &obj)
{
  return rpc_traverse (t, obj.payment)
    && rpc_traverse (t, obj.kmsg)
    && rpc_traverse (t, obj.pubkey);
}



struct sfs_encryptarg2 {
  sfs_hashpay payment;
  sfs_ctext2 kmsg;
  sfs_pubkey2 pubkey;
};
void *sfs_encryptarg2_alloc ();
bool_t xdr_sfs_encryptarg2 (XDR *, void *);
RPC_STRUCT_DECL (sfs_encryptarg2)

template<class T> bool
rpc_traverse (T &t, sfs_encryptarg2 &obj)
{
  return rpc_traverse (t, obj.payment)
    && rpc_traverse (t, obj.kmsg)
    && rpc_traverse (t, obj.pubkey);
}


typedef sfs_ctext sfs_encryptres;
void *sfs_encryptres_alloc ();
bool_t xdr_sfs_encryptres (XDR *, void *);
RPC_TYPEDEF_DECL (sfs_encryptres)

typedef sfs_ctext2 sfs_encryptres2;
void *sfs_encryptres2_alloc ();
bool_t xdr_sfs_encryptres2 (XDR *, void *);
RPC_TYPEDEF_DECL (sfs_encryptres2)


struct sfs_nfs3_subfs {
  nfspath3 path;
  nfs_fh3 fh;
};
void *sfs_nfs3_subfs_alloc ();
bool_t xdr_sfs_nfs3_subfs (XDR *, void *);
RPC_STRUCT_DECL (sfs_nfs3_subfs)

template<class T> bool
rpc_traverse (T &t, sfs_nfs3_subfs &obj)
{
  return rpc_traverse (t, obj.path)
    && rpc_traverse (t, obj.fh);
}



struct sfs_nfs3_fsinfo {
  nfs_fh3 root;
  rpc_vec<sfs_nfs3_subfs, RPC_INFINITY> subfs;
};
void *sfs_nfs3_fsinfo_alloc ();
bool_t xdr_sfs_nfs3_fsinfo (XDR *, void *);
RPC_STRUCT_DECL (sfs_nfs3_fsinfo)

template<class T> bool
rpc_traverse (T &t, sfs_nfs3_fsinfo &obj)
{
  return rpc_traverse (t, obj.root)
    && rpc_traverse (t, obj.subfs);
}



struct sfs_nfs_fsinfo {
  const int32_t vers;
  union {
    union_entry_base _base;
    union_entry<sfs_nfs3_fsinfo> v3;
  };

#define rpcunion_tag_sfs_nfs_fsinfo vers
#define rpcunion_switch_sfs_nfs_fsinfo(swarg, action, voidaction, defaction) \
  switch (swarg) { \
  case ex_NFS_V3: \
    action (sfs_nfs3_fsinfo, v3); \
    break; \
  default: \
    defaction; \
    break; \
  }

  sfs_nfs_fsinfo (int32_t _tag = (int32_t) 0) : vers (_tag)
    { _base.init (); set_vers (_tag); }
  sfs_nfs_fsinfo (const sfs_nfs_fsinfo &_s)
    : vers (_s.vers)
    { _base.init (_s._base); }
  ~sfs_nfs_fsinfo () { _base.destroy (); }
  sfs_nfs_fsinfo &operator= (const sfs_nfs_fsinfo &_s) {
    const_cast<int32_t &> (vers) = _s.vers;
    _base.assign (_s._base);
    return *this;
  }

  void set_vers (int32_t _tag) {
    const_cast<int32_t &> (vers) = _tag;
    rpcunion_switch_sfs_nfs_fsinfo
      (_tag, RPCUNION_SET, _base.destroy (), _base.destroy ());
  }
};

template<class T> bool
rpc_traverse (T &t, sfs_nfs_fsinfo &obj)
{
  int32_t tag = obj.vers;
  if (!rpc_traverse (t, tag))
    return false;
  if (tag != obj.vers)
    obj.set_vers (tag);

  rpcunion_switch_sfs_nfs_fsinfo
    (obj.vers, RPCUNION_TRAVERSE, return true, return false);
}
inline bool
rpc_traverse (const stompcast_t &s, sfs_nfs_fsinfo &obj)
{
  rpcunion_switch_sfs_nfs_fsinfo
    (obj.vers, RPCUNION_REC_STOMPCAST,
     obj._base.destroy (); return true, obj._base.destroy (); return true;);
}
void *sfs_nfs_fsinfo_alloc ();
bool_t xdr_sfs_nfs_fsinfo (XDR *, void *);
RPC_UNION_DECL (sfs_nfs_fsinfo)



struct sfs_fsinfo {
  const int32_t prog;
  union {
    union_entry_base _base;
    union_entry<sfs_nfs_fsinfo> nfs;
  };

#define rpcunion_tag_sfs_fsinfo prog
#define rpcunion_switch_sfs_fsinfo(swarg, action, voidaction, defaction) \
  switch (swarg) { \
  case ex_NFS_PROGRAM: \
    action (sfs_nfs_fsinfo, nfs); \
    break; \
  case 344446: \
    voidaction; \
    break; \
  default: \
    voidaction; \
    break; \
  }

  sfs_fsinfo (int32_t _tag = (int32_t) 0) : prog (_tag)
    { _base.init (); set_prog (_tag); }
  sfs_fsinfo (const sfs_fsinfo &_s)
    : prog (_s.prog)
    { _base.init (_s._base); }
  ~sfs_fsinfo () { _base.destroy (); }
  sfs_fsinfo &operator= (const sfs_fsinfo &_s) {
    const_cast<int32_t &> (prog) = _s.prog;
    _base.assign (_s._base);
    return *this;
  }

  void set_prog (int32_t _tag) {
    const_cast<int32_t &> (prog) = _tag;
    rpcunion_switch_sfs_fsinfo
      (_tag, RPCUNION_SET, _base.destroy (), _base.destroy ());
  }
};

template<class T> bool
rpc_traverse (T &t, sfs_fsinfo &obj)
{
  int32_t tag = obj.prog;
  if (!rpc_traverse (t, tag))
    return false;
  if (tag != obj.prog)
    obj.set_prog (tag);

  rpcunion_switch_sfs_fsinfo
    (obj.prog, RPCUNION_TRAVERSE, return true, return false);
}
inline bool
rpc_traverse (const stompcast_t &s, sfs_fsinfo &obj)
{
  rpcunion_switch_sfs_fsinfo
    (obj.prog, RPCUNION_REC_STOMPCAST,
     obj._base.destroy (); return true, obj._base.destroy (); return true;);
}
void *sfs_fsinfo_alloc ();
bool_t xdr_sfs_fsinfo (XDR *, void *);
RPC_UNION_DECL (sfs_fsinfo)



struct sfs_opt_idname {
  const bool present;
  union {
    union_entry_base _base;
    union_entry<sfs_idname> name;
  };

#define rpcunion_tag_sfs_opt_idname present
#define rpcunion_switch_sfs_opt_idname(swarg, action, voidaction, defaction) \
  switch (swarg) { \
  case true: \
    action (sfs_idname, name); \
    break; \
  case false: \
    voidaction; \
    break; \
  default: \
    defaction; \
    break; \
  }

  sfs_opt_idname (bool _tag = (bool) 0) : present (_tag)
    { _base.init (); set_present (_tag); }
  sfs_opt_idname (const sfs_opt_idname &_s)
    : present (_s.present)
    { _base.init (_s._base); }
  ~sfs_opt_idname () { _base.destroy (); }
  sfs_opt_idname &operator= (const sfs_opt_idname &_s) {
    const_cast<bool &> (present) = _s.present;
    _base.assign (_s._base);
    return *this;
  }

  void set_present (bool _tag) {
    const_cast<bool &> (present) = _tag;
    rpcunion_switch_sfs_opt_idname
      (_tag, RPCUNION_SET, _base.destroy (), _base.destroy ());
  }
};

template<class T> bool
rpc_traverse (T &t, sfs_opt_idname &obj)
{
  bool tag = obj.present;
  if (!rpc_traverse (t, tag))
    return false;
  if (tag != obj.present)
    obj.set_present (tag);

  rpcunion_switch_sfs_opt_idname
    (obj.present, RPCUNION_TRAVERSE, return true, return false);
}
inline bool
rpc_traverse (const stompcast_t &s, sfs_opt_idname &obj)
{
  rpcunion_switch_sfs_opt_idname
    (obj.present, RPCUNION_REC_STOMPCAST,
     obj._base.destroy (); return true, obj._base.destroy (); return true;);
}
void *sfs_opt_idname_alloc ();
bool_t xdr_sfs_opt_idname (XDR *, void *);
RPC_UNION_DECL (sfs_opt_idname)



struct sfs_idnums {
  int32_t uid;
  int32_t gid;
};
void *sfs_idnums_alloc ();
bool_t xdr_sfs_idnums (XDR *, void *);
RPC_STRUCT_DECL (sfs_idnums)

template<class T> bool
rpc_traverse (T &t, sfs_idnums &obj)
{
  return rpc_traverse (t, obj.uid)
    && rpc_traverse (t, obj.gid);
}



struct sfs_idnames {
  sfs_opt_idname uidname;
  sfs_opt_idname gidname;
};
void *sfs_idnames_alloc ();
bool_t xdr_sfs_idnames (XDR *, void *);
RPC_STRUCT_DECL (sfs_idnames)

template<class T> bool
rpc_traverse (T &t, sfs_idnames &obj)
{
  return rpc_traverse (t, obj.uidname)
    && rpc_traverse (t, obj.gidname);
}


enum sfs_loginstat {
  SFSLOGIN_OK = 0,
  SFSLOGIN_MORE = 1,
  SFSLOGIN_BAD = 2,
  SFSLOGIN_ALLBAD = 3,
  SFSLOGIN_AGAIN = 4,
};
void *sfs_loginstat_alloc ();
bool_t xdr_sfs_loginstat (XDR *, void *);
RPC_ENUM_DECL (sfs_loginstat)

template<class T> inline bool
rpc_traverse (T &t, sfs_loginstat &obj)
{
  u_int32_t val = obj;
  if (!rpc_traverse (t, val))
    return false;
  obj = sfs_loginstat (val);
  return true;
}


struct sfs_loginres {
  const sfs_loginstat status;
  union {
    union_entry_base _base;
    union_entry<u_int32_t> authno;
    union_entry<rpc_bytes<RPC_INFINITY> > resmore;
  };

#define rpcunion_tag_sfs_loginres status
#define rpcunion_switch_sfs_loginres(swarg, action, voidaction, defaction) \
  switch (swarg) { \
  case SFSLOGIN_OK: \
    action (u_int32_t, authno); \
    break; \
  case SFSLOGIN_MORE: \
    action (opaque, resmore); \
    break; \
  case SFSLOGIN_BAD: \
  case SFSLOGIN_ALLBAD: \
  case SFSLOGIN_AGAIN: \
    voidaction; \
    break; \
  default: \
    defaction; \
    break; \
  }

  sfs_loginres (sfs_loginstat _tag = (sfs_loginstat) 0) : status (_tag)
    { _base.init (); set_status (_tag); }
  sfs_loginres (const sfs_loginres &_s)
    : status (_s.status)
    { _base.init (_s._base); }
  ~sfs_loginres () { _base.destroy (); }
  sfs_loginres &operator= (const sfs_loginres &_s) {
    const_cast<sfs_loginstat &> (status) = _s.status;
    _base.assign (_s._base);
    return *this;
  }

  void set_status (sfs_loginstat _tag) {
    const_cast<sfs_loginstat &> (status) = _tag;
    rpcunion_switch_sfs_loginres
      (_tag, RPCUNION_SET, _base.destroy (), _base.destroy ());
  }
};

template<class T> bool
rpc_traverse (T &t, sfs_loginres &obj)
{
  sfs_loginstat tag = obj.status;
  if (!rpc_traverse (t, tag))
    return false;
  if (tag != obj.status)
    obj.set_status (tag);

  rpcunion_switch_sfs_loginres
    (obj.status, RPCUNION_TRAVERSE, return true, return false);
}
inline bool
rpc_traverse (const stompcast_t &s, sfs_loginres &obj)
{
  rpcunion_switch_sfs_loginres
    (obj.status, RPCUNION_REC_STOMPCAST,
     obj._base.destroy (); return true, obj._base.destroy (); return true;);
}
void *sfs_loginres_alloc ();
bool_t xdr_sfs_loginres (XDR *, void *);
RPC_UNION_DECL (sfs_loginres)



struct sfs_loginarg {
  sfs_seqno seqno;
  rpc_bytes<RPC_INFINITY> certificate;
};
void *sfs_loginarg_alloc ();
bool_t xdr_sfs_loginarg (XDR *, void *);
RPC_STRUCT_DECL (sfs_loginarg)

template<class T> bool
rpc_traverse (T &t, sfs_loginarg &obj)
{
  return rpc_traverse (t, obj.seqno)
    && rpc_traverse (t, obj.certificate);
}


enum sfsauth_stat {
  SFSAUTH_OK = 0,
  SFSAUTH_LOGINMORE = 1,
  SFSAUTH_FAILED = 2,
  SFSAUTH_LOGINALLBAD = 3,
  SFSAUTH_NOTSOCK = 4,
  SFSAUTH_BADUSERNAME = 5,
  SFSAUTH_WRONGUID = 6,
  SFSAUTH_DENYROOT = 7,
  SFSAUTH_BADSHELL = 8,
  SFSAUTH_DENYFILE = 9,
  SFSAUTH_BADPASSWORD = 10,
  SFSAUTH_USEREXISTS = 11,
  SFSAUTH_NOCHANGES = 12,
  SFSAUTH_NOSRP = 13,
  SFSAUTH_BADSIGNATURE = 14,
  SFSAUTH_PROTOERR = 15,
  SFSAUTH_NOTTHERE = 16,
  SFSAUTH_BADAUTHID = 17,
  SFSAUTH_KEYEXISTS = 18,
  SFSAUTH_BADKEYNAME = 19,
};
void *sfsauth_stat_alloc ();
bool_t xdr_sfsauth_stat (XDR *, void *);
RPC_ENUM_DECL (sfsauth_stat)

template<class T> inline bool
rpc_traverse (T &t, sfsauth_stat &obj)
{
  u_int32_t val = obj;
  if (!rpc_traverse (t, val))
    return false;
  obj = sfsauth_stat (val);
  return true;
}

enum sfs_authtype {
  SFS_NOAUTH = 0,
  SFS_AUTHREQ = 1,
  SFS_AUTHREQ2 = 2,
  SFS_SRPAUTH = 3,
  SFS_UNIXPWAUTH = 4,
};
void *sfs_authtype_alloc ();
bool_t xdr_sfs_authtype (XDR *, void *);
RPC_ENUM_DECL (sfs_authtype)

template<class T> inline bool
rpc_traverse (T &t, sfs_authtype &obj)
{
  u_int32_t val = obj;
  if (!rpc_traverse (t, val))
    return false;
  obj = sfs_authtype (val);
  return true;
}


struct sfs_authreq {
  sfs_pubkey usrkey;
  sfs_sig signed_req;
};
void *sfs_authreq_alloc ();
bool_t xdr_sfs_authreq (XDR *, void *);
RPC_STRUCT_DECL (sfs_authreq)

template<class T> bool
rpc_traverse (T &t, sfs_authreq &obj)
{
  return rpc_traverse (t, obj.usrkey)
    && rpc_traverse (t, obj.signed_req);
}



struct sfs_autharg {
  const sfs_authtype type;
  union {
    union_entry_base _base;
    union_entry<sfs_authreq> req;
  };

#define rpcunion_tag_sfs_autharg type
#define rpcunion_switch_sfs_autharg(swarg, action, voidaction, defaction) \
  switch (swarg) { \
  case SFS_NOAUTH: \
    voidaction; \
    break; \
  case SFS_AUTHREQ: \
    action (sfs_authreq, req); \
    break; \
  default: \
    defaction; \
    break; \
  }

  sfs_autharg (sfs_authtype _tag = (sfs_authtype) 0) : type (_tag)
    { _base.init (); set_type (_tag); }
  sfs_autharg (const sfs_autharg &_s)
    : type (_s.type)
    { _base.init (_s._base); }
  ~sfs_autharg () { _base.destroy (); }
  sfs_autharg &operator= (const sfs_autharg &_s) {
    const_cast<sfs_authtype &> (type) = _s.type;
    _base.assign (_s._base);
    return *this;
  }

  void set_type (sfs_authtype _tag) {
    const_cast<sfs_authtype &> (type) = _tag;
    rpcunion_switch_sfs_autharg
      (_tag, RPCUNION_SET, _base.destroy (), _base.destroy ());
  }
};

template<class T> bool
rpc_traverse (T &t, sfs_autharg &obj)
{
  sfs_authtype tag = obj.type;
  if (!rpc_traverse (t, tag))
    return false;
  if (tag != obj.type)
    obj.set_type (tag);

  rpcunion_switch_sfs_autharg
    (obj.type, RPCUNION_TRAVERSE, return true, return false);
}
inline bool
rpc_traverse (const stompcast_t &s, sfs_autharg &obj)
{
  rpcunion_switch_sfs_autharg
    (obj.type, RPCUNION_REC_STOMPCAST,
     obj._base.destroy (); return true, obj._base.destroy (); return true;);
}
void *sfs_autharg_alloc ();
bool_t xdr_sfs_autharg (XDR *, void *);
RPC_UNION_DECL (sfs_autharg)


enum sfs_credtype {
  SFS_NOCRED = 0,
  SFS_UNIXCRED = 1,
  SFS_PKCRED = 2,
};
void *sfs_credtype_alloc ();
bool_t xdr_sfs_credtype (XDR *, void *);
RPC_ENUM_DECL (sfs_credtype)

template<class T> inline bool
rpc_traverse (T &t, sfs_credtype &obj)
{
  u_int32_t val = obj;
  if (!rpc_traverse (t, val))
    return false;
  obj = sfs_credtype (val);
  return true;
}


struct sfs_unixcred {
  rpc_str<RPC_INFINITY> username;
  rpc_str<RPC_INFINITY> homedir;
  rpc_str<RPC_INFINITY> shell;
  u_int32_t uid;
  u_int32_t gid;
  rpc_vec<u_int32_t, RPC_INFINITY> groups;
};
void *sfs_unixcred_alloc ();
bool_t xdr_sfs_unixcred (XDR *, void *);
RPC_STRUCT_DECL (sfs_unixcred)

template<class T> bool
rpc_traverse (T &t, sfs_unixcred &obj)
{
  return rpc_traverse (t, obj.username)
    && rpc_traverse (t, obj.homedir)
    && rpc_traverse (t, obj.shell)
    && rpc_traverse (t, obj.uid)
    && rpc_traverse (t, obj.gid)
    && rpc_traverse (t, obj.groups);
}



struct sfsauth_cred {
  const sfs_credtype type;
  union {
    union_entry_base _base;
    union_entry<sfs_unixcred> unixcred;
    union_entry<rpc_str<RPC_INFINITY> > pkhash;
  };

#define rpcunion_tag_sfsauth_cred type
#define rpcunion_switch_sfsauth_cred(swarg, action, voidaction, defaction) \
  switch (swarg) { \
  case SFS_NOCRED: \
    voidaction; \
    break; \
  case SFS_UNIXCRED: \
    action (sfs_unixcred, unixcred); \
    break; \
  case SFS_PKCRED: \
    action (string, pkhash); \
    break; \
  default: \
    defaction; \
    break; \
  }

  sfsauth_cred (sfs_credtype _tag = (sfs_credtype) 0) : type (_tag)
    { _base.init (); set_type (_tag); }
  sfsauth_cred (const sfsauth_cred &_s)
    : type (_s.type)
    { _base.init (_s._base); }
  ~sfsauth_cred () { _base.destroy (); }
  sfsauth_cred &operator= (const sfsauth_cred &_s) {
    const_cast<sfs_credtype &> (type) = _s.type;
    _base.assign (_s._base);
    return *this;
  }

  void set_type (sfs_credtype _tag) {
    const_cast<sfs_credtype &> (type) = _tag;
    rpcunion_switch_sfsauth_cred
      (_tag, RPCUNION_SET, _base.destroy (), _base.destroy ());
  }
};

template<class T> bool
rpc_traverse (T &t, sfsauth_cred &obj)
{
  sfs_credtype tag = obj.type;
  if (!rpc_traverse (t, tag))
    return false;
  if (tag != obj.type)
    obj.set_type (tag);

  rpcunion_switch_sfsauth_cred
    (obj.type, RPCUNION_TRAVERSE, return true, return false);
}
inline bool
rpc_traverse (const stompcast_t &s, sfsauth_cred &obj)
{
  rpcunion_switch_sfsauth_cred
    (obj.type, RPCUNION_REC_STOMPCAST,
     obj._base.destroy (); return true, obj._base.destroy (); return true;);
}
void *sfsauth_cred_alloc ();
bool_t xdr_sfsauth_cred (XDR *, void *);
RPC_UNION_DECL (sfsauth_cred)



struct sfsauth_loginokres {
  sfsauth_cred cred;
  sfs_hash authid;
  sfs_seqno seqno;
};
void *sfsauth_loginokres_alloc ();
bool_t xdr_sfsauth_loginokres (XDR *, void *);
RPC_STRUCT_DECL (sfsauth_loginokres)

template<class T> bool
rpc_traverse (T &t, sfsauth_loginokres &obj)
{
  return rpc_traverse (t, obj.cred)
    && rpc_traverse (t, obj.authid)
    && rpc_traverse (t, obj.seqno);
}



struct sfsauth_loginres {
  const sfs_loginstat status;
  union {
    union_entry_base _base;
    union_entry<sfsauth_loginokres> resok;
    union_entry<rpc_bytes<RPC_INFINITY> > resmore;
  };

#define rpcunion_tag_sfsauth_loginres status
#define rpcunion_switch_sfsauth_loginres(swarg, action, voidaction, defaction) \
  switch (swarg) { \
  case SFSLOGIN_OK: \
    action (sfsauth_loginokres, resok); \
    break; \
  case SFSLOGIN_MORE: \
    action (opaque, resmore); \
    break; \
  default: \
    voidaction; \
    break; \
  }

  sfsauth_loginres (sfs_loginstat _tag = (sfs_loginstat) 0) : status (_tag)
    { _base.init (); set_status (_tag); }
  sfsauth_loginres (const sfsauth_loginres &_s)
    : status (_s.status)
    { _base.init (_s._base); }
  ~sfsauth_loginres () { _base.destroy (); }
  sfsauth_loginres &operator= (const sfsauth_loginres &_s) {
    const_cast<sfs_loginstat &> (status) = _s.status;
    _base.assign (_s._base);
    return *this;
  }

  void set_status (sfs_loginstat _tag) {
    const_cast<sfs_loginstat &> (status) = _tag;
    rpcunion_switch_sfsauth_loginres
      (_tag, RPCUNION_SET, _base.destroy (), _base.destroy ());
  }
};

template<class T> bool
rpc_traverse (T &t, sfsauth_loginres &obj)
{
  sfs_loginstat tag = obj.status;
  if (!rpc_traverse (t, tag))
    return false;
  if (tag != obj.status)
    obj.set_status (tag);

  rpcunion_switch_sfsauth_loginres
    (obj.status, RPCUNION_TRAVERSE, return true, return false);
}
inline bool
rpc_traverse (const stompcast_t &s, sfsauth_loginres &obj)
{
  rpcunion_switch_sfsauth_loginres
    (obj.status, RPCUNION_REC_STOMPCAST,
     obj._base.destroy (); return true, obj._base.destroy (); return true;);
}
void *sfsauth_loginres_alloc ();
bool_t xdr_sfsauth_loginres (XDR *, void *);
RPC_UNION_DECL (sfsauth_loginres)



struct sfssrp_parms {
  bigint N;
  bigint g;
};
void *sfssrp_parms_alloc ();
bool_t xdr_sfssrp_parms (XDR *, void *);
RPC_STRUCT_DECL (sfssrp_parms)

template<class T> bool
rpc_traverse (T &t, sfssrp_parms &obj)
{
  return rpc_traverse (t, obj.N)
    && rpc_traverse (t, obj.g);
}



struct sfsauth_srpparmsres {
  const sfsauth_stat status;
  union {
    union_entry_base _base;
    union_entry<sfssrp_parms> parms;
  };

#define rpcunion_tag_sfsauth_srpparmsres status
#define rpcunion_switch_sfsauth_srpparmsres(swarg, action, voidaction, defaction) \
  switch (swarg) { \
  case SFSAUTH_OK: \
    action (sfssrp_parms, parms); \
    break; \
  default: \
    voidaction; \
    break; \
  }

  sfsauth_srpparmsres (sfsauth_stat _tag = (sfsauth_stat) 0) : status (_tag)
    { _base.init (); set_status (_tag); }
  sfsauth_srpparmsres (const sfsauth_srpparmsres &_s)
    : status (_s.status)
    { _base.init (_s._base); }
  ~sfsauth_srpparmsres () { _base.destroy (); }
  sfsauth_srpparmsres &operator= (const sfsauth_srpparmsres &_s) {
    const_cast<sfsauth_stat &> (status) = _s.status;
    _base.assign (_s._base);
    return *this;
  }

  void set_status (sfsauth_stat _tag) {
    const_cast<sfsauth_stat &> (status) = _tag;
    rpcunion_switch_sfsauth_srpparmsres
      (_tag, RPCUNION_SET, _base.destroy (), _base.destroy ());
  }
};

template<class T> bool
rpc_traverse (T &t, sfsauth_srpparmsres &obj)
{
  sfsauth_stat tag = obj.status;
  if (!rpc_traverse (t, tag))
    return false;
  if (tag != obj.status)
    obj.set_status (tag);

  rpcunion_switch_sfsauth_srpparmsres
    (obj.status, RPCUNION_TRAVERSE, return true, return false);
}
inline bool
rpc_traverse (const stompcast_t &s, sfsauth_srpparmsres &obj)
{
  rpcunion_switch_sfsauth_srpparmsres
    (obj.status, RPCUNION_REC_STOMPCAST,
     obj._base.destroy (); return true, obj._base.destroy (); return true;);
}
void *sfsauth_srpparmsres_alloc ();
bool_t xdr_sfsauth_srpparmsres (XDR *, void *);
RPC_UNION_DECL (sfsauth_srpparmsres)


typedef rpc_bytes<RPC_INFINITY> sfssrp_bytes;
void *sfssrp_bytes_alloc ();
bool_t xdr_sfssrp_bytes (XDR *, void *);
RPC_TYPEDEF_DECL (sfssrp_bytes)


struct sfssrp_init_arg {
  rpc_str<RPC_INFINITY> username;
  sfssrp_bytes msg;
};
void *sfssrp_init_arg_alloc ();
bool_t xdr_sfssrp_init_arg (XDR *, void *);
RPC_STRUCT_DECL (sfssrp_init_arg)

template<class T> bool
rpc_traverse (T &t, sfssrp_init_arg &obj)
{
  return rpc_traverse (t, obj.username)
    && rpc_traverse (t, obj.msg);
}



struct sfsauth_srpres {
  const sfsauth_stat status;
  union {
    union_entry_base _base;
    union_entry<sfssrp_bytes> msg;
  };

#define rpcunion_tag_sfsauth_srpres status
#define rpcunion_switch_sfsauth_srpres(swarg, action, voidaction, defaction) \
  switch (swarg) { \
  case SFSAUTH_OK: \
    action (sfssrp_bytes, msg); \
    break; \
  default: \
    voidaction; \
    break; \
  }

  sfsauth_srpres (sfsauth_stat _tag = (sfsauth_stat) 0) : status (_tag)
    { _base.init (); set_status (_tag); }
  sfsauth_srpres (const sfsauth_srpres &_s)
    : status (_s.status)
    { _base.init (_s._base); }
  ~sfsauth_srpres () { _base.destroy (); }
  sfsauth_srpres &operator= (const sfsauth_srpres &_s) {
    const_cast<sfsauth_stat &> (status) = _s.status;
    _base.assign (_s._base);
    return *this;
  }

  void set_status (sfsauth_stat _tag) {
    const_cast<sfsauth_stat &> (status) = _tag;
    rpcunion_switch_sfsauth_srpres
      (_tag, RPCUNION_SET, _base.destroy (), _base.destroy ());
  }
};

template<class T> bool
rpc_traverse (T &t, sfsauth_srpres &obj)
{
  sfsauth_stat tag = obj.status;
  if (!rpc_traverse (t, tag))
    return false;
  if (tag != obj.status)
    obj.set_status (tag);

  rpcunion_switch_sfsauth_srpres
    (obj.status, RPCUNION_TRAVERSE, return true, return false);
}
inline bool
rpc_traverse (const stompcast_t &s, sfsauth_srpres &obj)
{
  rpcunion_switch_sfsauth_srpres
    (obj.status, RPCUNION_REC_STOMPCAST,
     obj._base.destroy (); return true, obj._base.destroy (); return true;);
}
void *sfsauth_srpres_alloc ();
bool_t xdr_sfsauth_srpres (XDR *, void *);
RPC_UNION_DECL (sfsauth_srpres)



struct sfsauth_fetchresok {
  rpc_str<RPC_INFINITY> privkey;
  sfs_hash hostid;
};
void *sfsauth_fetchresok_alloc ();
bool_t xdr_sfsauth_fetchresok (XDR *, void *);
RPC_STRUCT_DECL (sfsauth_fetchresok)

template<class T> bool
rpc_traverse (T &t, sfsauth_fetchresok &obj)
{
  return rpc_traverse (t, obj.privkey)
    && rpc_traverse (t, obj.hostid);
}



struct sfsauth_fetchres {
  const sfsauth_stat status;
  union {
    union_entry_base _base;
    union_entry<sfsauth_fetchresok> resok;
  };

#define rpcunion_tag_sfsauth_fetchres status
#define rpcunion_switch_sfsauth_fetchres(swarg, action, voidaction, defaction) \
  switch (swarg) { \
  case SFSAUTH_OK: \
    action (sfsauth_fetchresok, resok); \
    break; \
  default: \
    voidaction; \
    break; \
  }

  sfsauth_fetchres (sfsauth_stat _tag = (sfsauth_stat) 0) : status (_tag)
    { _base.init (); set_status (_tag); }
  sfsauth_fetchres (const sfsauth_fetchres &_s)
    : status (_s.status)
    { _base.init (_s._base); }
  ~sfsauth_fetchres () { _base.destroy (); }
  sfsauth_fetchres &operator= (const sfsauth_fetchres &_s) {
    const_cast<sfsauth_stat &> (status) = _s.status;
    _base.assign (_s._base);
    return *this;
  }

  void set_status (sfsauth_stat _tag) {
    const_cast<sfsauth_stat &> (status) = _tag;
    rpcunion_switch_sfsauth_fetchres
      (_tag, RPCUNION_SET, _base.destroy (), _base.destroy ());
  }
};

template<class T> bool
rpc_traverse (T &t, sfsauth_fetchres &obj)
{
  sfsauth_stat tag = obj.status;
  if (!rpc_traverse (t, tag))
    return false;
  if (tag != obj.status)
    obj.set_status (tag);

  rpcunion_switch_sfsauth_fetchres
    (obj.status, RPCUNION_TRAVERSE, return true, return false);
}
inline bool
rpc_traverse (const stompcast_t &s, sfsauth_fetchres &obj)
{
  rpcunion_switch_sfsauth_fetchres
    (obj.status, RPCUNION_REC_STOMPCAST,
     obj._base.destroy (); return true, obj._base.destroy (); return true;);
}
void *sfsauth_fetchres_alloc ();
bool_t xdr_sfsauth_fetchres (XDR *, void *);
RPC_UNION_DECL (sfsauth_fetchres)


typedef rpc_str<RPC_INFINITY> sfsauth_realm;
void *sfsauth_realm_alloc ();
bool_t xdr_sfsauth_realm (XDR *, void *);
RPC_TYPEDEF_DECL (sfsauth_realm)

typedef rpc_str<RPC_INFINITY> sfsauth_certpath;
void *sfsauth_certpath_alloc ();
bool_t xdr_sfsauth_certpath (XDR *, void *);
RPC_TYPEDEF_DECL (sfsauth_certpath)

typedef rpc_vec<sfsauth_certpath, RPC_INFINITY> sfsauth_certpaths;
void *sfsauth_certpaths_alloc ();
bool_t xdr_sfsauth_certpaths (XDR *, void *);
RPC_TYPEDEF_DECL (sfsauth_certpaths)

enum sfs_certstat {
  SFSAUTH_CERT_SELF = 0,
  SFSAUTH_CERT_REALM = 1,
};
void *sfs_certstat_alloc ();
bool_t xdr_sfs_certstat (XDR *, void *);
RPC_ENUM_DECL (sfs_certstat)

template<class T> inline bool
rpc_traverse (T &t, sfs_certstat &obj)
{
  u_int32_t val = obj;
  if (!rpc_traverse (t, val))
    return false;
  obj = sfs_certstat (val);
  return true;
}


struct sfsauth_certinfo_info {
  const sfs_certstat status;
  union {
    union_entry_base _base;
    union_entry<sfsauth_certpaths> certpaths;
  };

#define rpcunion_tag_sfsauth_certinfo_info status
#define rpcunion_switch_sfsauth_certinfo_info(swarg, action, voidaction, defaction) \
  switch (swarg) { \
  case SFSAUTH_CERT_SELF: \
    voidaction; \
    break; \
  case SFSAUTH_CERT_REALM: \
    action (sfsauth_certpaths, certpaths); \
    break; \
  default: \
    defaction; \
    break; \
  }

  sfsauth_certinfo_info (sfs_certstat _tag = (sfs_certstat) 0) : status (_tag)
    { _base.init (); set_status (_tag); }
  sfsauth_certinfo_info (const sfsauth_certinfo_info &_s)
    : status (_s.status)
    { _base.init (_s._base); }
  ~sfsauth_certinfo_info () { _base.destroy (); }
  sfsauth_certinfo_info &operator= (const sfsauth_certinfo_info &_s) {
    const_cast<sfs_certstat &> (status) = _s.status;
    _base.assign (_s._base);
    return *this;
  }

  void set_status (sfs_certstat _tag) {
    const_cast<sfs_certstat &> (status) = _tag;
    rpcunion_switch_sfsauth_certinfo_info
      (_tag, RPCUNION_SET, _base.destroy (), _base.destroy ());
  }
};

template<class T> bool
rpc_traverse (T &t, sfsauth_certinfo_info &obj)
{
  sfs_certstat tag = obj.status;
  if (!rpc_traverse (t, tag))
    return false;
  if (tag != obj.status)
    obj.set_status (tag);

  rpcunion_switch_sfsauth_certinfo_info
    (obj.status, RPCUNION_TRAVERSE, return true, return false);
}
inline bool
rpc_traverse (const stompcast_t &s, sfsauth_certinfo_info &obj)
{
  rpcunion_switch_sfsauth_certinfo_info
    (obj.status, RPCUNION_REC_STOMPCAST,
     obj._base.destroy (); return true, obj._base.destroy (); return true;);
}
void *sfsauth_certinfo_info_alloc ();
bool_t xdr_sfsauth_certinfo_info (XDR *, void *);
RPC_UNION_DECL (sfsauth_certinfo_info)



struct sfsauth_certinfores {
  sfsauth_realm name;
  sfsauth_certinfo_info info;
};
void *sfsauth_certinfores_alloc ();
bool_t xdr_sfsauth_certinfores (XDR *, void *);
RPC_STRUCT_DECL (sfsauth_certinfores)

template<class T> bool
rpc_traverse (T &t, sfsauth_certinfores &obj)
{
  return rpc_traverse (t, obj.name)
    && rpc_traverse (t, obj.info);
}



struct sfsauth_srpinfo {
  rpc_str<RPC_INFINITY> info;
  rpc_str<RPC_INFINITY> privkey;
};
void *sfsauth_srpinfo_alloc ();
bool_t xdr_sfsauth_srpinfo (XDR *, void *);
RPC_STRUCT_DECL (sfsauth_srpinfo)

template<class T> bool
rpc_traverse (T &t, sfsauth_srpinfo &obj)
{
  return rpc_traverse (t, obj.info)
    && rpc_traverse (t, obj.privkey);
}



struct sfsauth_registermsg {
  sfs_msgtype type;
  rpc_str<RPC_INFINITY> username;
  rpc_str<RPC_INFINITY> password;
  sfs_pubkey pubkey;
  rpc_ptr<sfsauth_srpinfo> srpinfo;
};
void *sfsauth_registermsg_alloc ();
bool_t xdr_sfsauth_registermsg (XDR *, void *);
RPC_STRUCT_DECL (sfsauth_registermsg)

template<class T> bool
rpc_traverse (T &t, sfsauth_registermsg &obj)
{
  return rpc_traverse (t, obj.type)
    && rpc_traverse (t, obj.username)
    && rpc_traverse (t, obj.password)
    && rpc_traverse (t, obj.pubkey)
    && rpc_traverse (t, obj.srpinfo);
}



struct sfsauth_registerarg {
  sfsauth_registermsg msg;
  sfs_sig sig;
};
void *sfsauth_registerarg_alloc ();
bool_t xdr_sfsauth_registerarg (XDR *, void *);
RPC_STRUCT_DECL (sfsauth_registerarg)

template<class T> bool
rpc_traverse (T &t, sfsauth_registerarg &obj)
{
  return rpc_traverse (t, obj.msg)
    && rpc_traverse (t, obj.sig);
}


enum sfsauth_registerres {
  SFSAUTH_REGISTER_OK = 0,
  SFSAUTH_REGISTER_NOTSOCK = 1,
  SFSAUTH_REGISTER_BADUSERNAME = 2,
  SFSAUTH_REGISTER_WRONGUID = 3,
  SFSAUTH_REGISTER_DENYROOT = 4,
  SFSAUTH_REGISTER_BADSHELL = 5,
  SFSAUTH_REGISTER_DENYFILE = 6,
  SFSAUTH_REGISTER_BADPASSWORD = 7,
  SFSAUTH_REGISTER_USEREXISTS = 8,
  SFSAUTH_REGISTER_FAILED = 9,
  SFSAUTH_REGISTER_NOCHANGES = 10,
  SFSAUTH_REGISTER_NOSRP = 11,
  SFSAUTH_REGISTER_BADSIG = 12,
};
void *sfsauth_registerres_alloc ();
bool_t xdr_sfsauth_registerres (XDR *, void *);
RPC_ENUM_DECL (sfsauth_registerres)

template<class T> inline bool
rpc_traverse (T &t, sfsauth_registerres &obj)
{
  u_int32_t val = obj;
  if (!rpc_traverse (t, val))
    return false;
  obj = sfsauth_registerres (val);
  return true;
}


struct sfsauth_updatemsg {
  sfs_msgtype type;
  sfs_hash authid;
  sfs_pubkey oldkey;
  sfs_pubkey newkey;
  rpc_ptr<sfsauth_srpinfo> srpinfo;
};
void *sfsauth_updatemsg_alloc ();
bool_t xdr_sfsauth_updatemsg (XDR *, void *);
RPC_STRUCT_DECL (sfsauth_updatemsg)

template<class T> bool
rpc_traverse (T &t, sfsauth_updatemsg &obj)
{
  return rpc_traverse (t, obj.type)
    && rpc_traverse (t, obj.authid)
    && rpc_traverse (t, obj.oldkey)
    && rpc_traverse (t, obj.newkey)
    && rpc_traverse (t, obj.srpinfo);
}



struct sfsauth_updatearg {
  sfsauth_updatemsg msg;
  sfs_sig osig;
  sfs_sig nsig;
};
void *sfsauth_updatearg_alloc ();
bool_t xdr_sfsauth_updatearg (XDR *, void *);
RPC_STRUCT_DECL (sfsauth_updatearg)

template<class T> bool
rpc_traverse (T &t, sfsauth_updatearg &obj)
{
  return rpc_traverse (t, obj.msg)
    && rpc_traverse (t, obj.osig)
    && rpc_traverse (t, obj.nsig);
}


#ifndef SFS_PROGRAM
#define SFS_PROGRAM 344440
#endif /* !SFS_PROGRAM */
extern const rpc_program sfs_program_1;
enum { SFS_VERSION = 1 };
enum {
  SFSPROC_NULL = 0,
  SFSPROC_CONNECT = 1,
  SFSPROC_ENCRYPT = 2,
  SFSPROC_GETFSINFO = 3,
  SFSPROC_LOGIN = 4,
  SFSPROC_LOGOUT = 5,
  SFSPROC_IDNAMES = 6,
  SFSPROC_IDNUMS = 7,
  SFSPROC_GETCRED = 8,
  SFSPROC_ENCRYPT2 = 9,
};
#define SFS_PROGRAM_1_APPLY_NOVOID(macro, void) \
  macro (SFSPROC_NULL, void, void) \
  macro (SFSPROC_CONNECT, sfs_connectarg, sfs_connectres) \
  macro (SFSPROC_ENCRYPT, sfs_encryptarg, sfs_encryptres) \
  macro (SFSPROC_GETFSINFO, void, sfs_fsinfo) \
  macro (SFSPROC_LOGIN, sfs_loginarg, sfs_loginres) \
  macro (SFSPROC_LOGOUT, u_int32_t, void) \
  macro (SFSPROC_IDNAMES, sfs_idnums, sfs_idnames) \
  macro (SFSPROC_IDNUMS, sfs_idnames, sfs_idnums) \
  macro (SFSPROC_GETCRED, void, sfsauth_cred) \
  macro (SFSPROC_ENCRYPT2, sfs_encryptarg2, sfs_encryptres2)
#define SFS_PROGRAM_1_APPLY(macro) \
  SFS_PROGRAM_1_APPLY_NOVOID(macro, void)


#ifndef SFSCB_PROGRAM
#define SFSCB_PROGRAM 344441
#endif /* !SFSCB_PROGRAM */
extern const rpc_program sfscb_program_1;
enum { SFSCB_VERSION = 1 };
enum {
  SFSCBPROC_NULL = 0,
};
#define SFSCB_PROGRAM_1_APPLY_NOVOID(macro, void) \
  macro (SFSCBPROC_NULL, void, void)
#define SFSCB_PROGRAM_1_APPLY(macro) \
  SFSCB_PROGRAM_1_APPLY_NOVOID(macro, void)


#ifndef SFSAUTH_PROGRAM
#define SFSAUTH_PROGRAM 344442
#endif /* !SFSAUTH_PROGRAM */
extern const rpc_program sfsauth_program_1;
enum { SFSAUTH_VERSION = 1 };
enum {
  SFSAUTHPROC_NULL = 0,
  SFSAUTHPROC_LOGIN = 1,
  SFSAUTHPROC_REGISTER = 2,
  SFSAUTHPROC_UPDATE = 3,
  SFSAUTHPROC_SRP_GETPARAMS = 4,
  SFSAUTHPROC_SRP_INIT = 5,
  SFSAUTHPROC_SRP_MORE = 6,
  SFSAUTHPROC_FETCH = 7,
  SFSAUTHPROC_CERTINFO = 8,
};
#define SFSAUTH_PROGRAM_1_APPLY_NOVOID(macro, void) \
  macro (SFSAUTHPROC_NULL, void, void) \
  macro (SFSAUTHPROC_LOGIN, sfs_loginarg, sfsauth_loginres) \
  macro (SFSAUTHPROC_REGISTER, sfsauth_registerarg, sfsauth_stat) \
  macro (SFSAUTHPROC_UPDATE, sfsauth_updatearg, sfsauth_stat) \
  macro (SFSAUTHPROC_SRP_GETPARAMS, void, sfsauth_srpparmsres) \
  macro (SFSAUTHPROC_SRP_INIT, sfssrp_init_arg, sfsauth_srpres) \
  macro (SFSAUTHPROC_SRP_MORE, sfssrp_bytes, sfsauth_srpres) \
  macro (SFSAUTHPROC_FETCH, void, sfsauth_fetchres) \
  macro (SFSAUTHPROC_CERTINFO, void, sfsauth_certinfores)
#define SFSAUTH_PROGRAM_1_APPLY(macro) \
  SFSAUTH_PROGRAM_1_APPLY_NOVOID(macro, void)

#endif /* !__RPCC_SFS_PROT_H_INCLUDED__ */
