/*
 * Please do not edit this file.
 * It was generated using rpcgen.
 */

#ifndef _GP_RPC_H_RPCGEN
#define _GP_RPC_H_RPCGEN

#include <rpcgen/gp_xdr.h>


#ifdef __cplusplus
extern "C" {
#endif


enum gp_rpc_auth_flavor {
	GP_RPC_AUTH_NONE = 0,
	GP_RPC_AUTH_SYS = 1,
	GP_RPC_AUTH_SHORT = 2,
	GP_RPC_AUTH_DH = 3,
	GP_RPC_RPCSEC_GSS = 6,
};
typedef enum gp_rpc_auth_flavor gp_rpc_auth_flavor;

struct gp_rpc_opaque_auth {
	gp_rpc_auth_flavor flavor;
	struct {
		u_int body_len;
		char *body_val;
	} body;
};
typedef struct gp_rpc_opaque_auth gp_rpc_opaque_auth;

enum gp_rpc_msg_type {
	GP_RPC_CALL = 0,
	GP_RPC_REPLY = 1,
};
typedef enum gp_rpc_msg_type gp_rpc_msg_type;

enum gp_rpc_reply_status {
	GP_RPC_MSG_ACCEPTED = 0,
	GP_RPC_MSG_DENIED = 1,
};
typedef enum gp_rpc_reply_status gp_rpc_reply_status;

enum gp_rpc_accept_status {
	GP_RPC_SUCCESS = 0,
	GP_RPC_PROG_UNAVAIL = 1,
	GP_RPC_PROG_MISMATCH = 2,
	GP_RPC_PROC_UNAVAIL = 3,
	GP_RPC_GARBAGE_ARGS = 4,
	GP_RPC_SYSTEM_ERR = 5,
};
typedef enum gp_rpc_accept_status gp_rpc_accept_status;

enum gp_rpc_reject_status {
	GP_RPC_RPC_MISMATCH = 0,
	GP_RPC_AUTH_ERROR = 1,
};
typedef enum gp_rpc_reject_status gp_rpc_reject_status;

enum gp_rpc_auth_status {
	GP_RPC_AUTH_OK = 0,
	GP_RPC_AUTH_BADCRED = 1,
	GP_RPC_AUTH_REJECTEDCRED = 2,
	GP_RPC_AUTH_BADVERF = 3,
	GP_RPC_AUTH_REJECTEDVERF = 4,
	GP_RPC_AUTH_TOOWEAK = 5,
	GP_RPC_AUTH_INVALIDRESP = 6,
	GP_RPC_AUTH_FAILED = 7,
	GP_RPC_AUTH_KERB_GENERIC = 8,
	GP_RPC_AUTH_TIMEEXPIRE = 9,
	GP_RPC_AUTH_TKT_FILE = 10,
	GP_RPC_AUTH_DECODE = 11,
	GP_RPC_AUTH_NET_ADDR = 12,
	GP_RPC_RPCSEC_GSS_CREDPROBLEM = 13,
	GP_RPC_RPCSEC_GSS_CTXPROBLEM = 14,
};
typedef enum gp_rpc_auth_status gp_rpc_auth_status;

struct gp_rpc_mismatch_info {
	u_int low;
	u_int high;
};
typedef struct gp_rpc_mismatch_info gp_rpc_mismatch_info;

struct gp_rpc_reply_union {
	gp_rpc_accept_status status;
	union {
		char results[0];
		gp_rpc_mismatch_info mismatch_info;
	} gp_rpc_reply_union_u;
};
typedef struct gp_rpc_reply_union gp_rpc_reply_union;

struct gp_rpc_accepted_reply {
	gp_rpc_opaque_auth verf;
	gp_rpc_reply_union reply_data;
};
typedef struct gp_rpc_accepted_reply gp_rpc_accepted_reply;

struct gp_rpc_rejected_reply {
	gp_rpc_reject_status status;
	union {
		gp_rpc_mismatch_info mismatch_info;
		gp_rpc_auth_status status;
	} gp_rpc_rejected_reply_u;
};
typedef struct gp_rpc_rejected_reply gp_rpc_rejected_reply;

struct gp_rpc_call_header {
	u_int rpcvers;
	u_int prog;
	u_int vers;
	u_int proc;
	gp_rpc_opaque_auth cred;
	gp_rpc_opaque_auth verf;
};
typedef struct gp_rpc_call_header gp_rpc_call_header;

struct gp_rpc_reply_header {
	gp_rpc_reply_status status;
	union {
		gp_rpc_accepted_reply accepted;
		gp_rpc_rejected_reply rejected;
	} gp_rpc_reply_header_u;
};
typedef struct gp_rpc_reply_header gp_rpc_reply_header;

struct gp_rpc_msg_union {
	gp_rpc_msg_type type;
	union {
		gp_rpc_call_header chdr;
		gp_rpc_reply_header rhdr;
	} gp_rpc_msg_union_u;
};
typedef struct gp_rpc_msg_union gp_rpc_msg_union;

struct gp_rpc_msg {
	u_int xid;
	gp_rpc_msg_union header;
};
typedef struct gp_rpc_msg gp_rpc_msg;

/* the xdr functions */

#if defined(__STDC__) || defined(__cplusplus)
extern  bool_t xdr_gp_rpc_auth_flavor (XDR *, gp_rpc_auth_flavor*);
extern  bool_t xdr_gp_rpc_opaque_auth (XDR *, gp_rpc_opaque_auth*);
extern  bool_t xdr_gp_rpc_msg_type (XDR *, gp_rpc_msg_type*);
extern  bool_t xdr_gp_rpc_reply_status (XDR *, gp_rpc_reply_status*);
extern  bool_t xdr_gp_rpc_accept_status (XDR *, gp_rpc_accept_status*);
extern  bool_t xdr_gp_rpc_reject_status (XDR *, gp_rpc_reject_status*);
extern  bool_t xdr_gp_rpc_auth_status (XDR *, gp_rpc_auth_status*);
extern  bool_t xdr_gp_rpc_mismatch_info (XDR *, gp_rpc_mismatch_info*);
extern  bool_t xdr_gp_rpc_reply_union (XDR *, gp_rpc_reply_union*);
extern  bool_t xdr_gp_rpc_accepted_reply (XDR *, gp_rpc_accepted_reply*);
extern  bool_t xdr_gp_rpc_rejected_reply (XDR *, gp_rpc_rejected_reply*);
extern  bool_t xdr_gp_rpc_call_header (XDR *, gp_rpc_call_header*);
extern  bool_t xdr_gp_rpc_reply_header (XDR *, gp_rpc_reply_header*);
extern  bool_t xdr_gp_rpc_msg_union (XDR *, gp_rpc_msg_union*);
extern  bool_t xdr_gp_rpc_msg (XDR *, gp_rpc_msg*);

#else /* K&R C */
extern bool_t xdr_gp_rpc_auth_flavor ();
extern bool_t xdr_gp_rpc_opaque_auth ();
extern bool_t xdr_gp_rpc_msg_type ();
extern bool_t xdr_gp_rpc_reply_status ();
extern bool_t xdr_gp_rpc_accept_status ();
extern bool_t xdr_gp_rpc_reject_status ();
extern bool_t xdr_gp_rpc_auth_status ();
extern bool_t xdr_gp_rpc_mismatch_info ();
extern bool_t xdr_gp_rpc_reply_union ();
extern bool_t xdr_gp_rpc_accepted_reply ();
extern bool_t xdr_gp_rpc_rejected_reply ();
extern bool_t xdr_gp_rpc_call_header ();
extern bool_t xdr_gp_rpc_reply_header ();
extern bool_t xdr_gp_rpc_msg_union ();
extern bool_t xdr_gp_rpc_msg ();

#endif /* K&R C */

#ifdef __cplusplus
}
#endif

#endif /* !_GP_RPC_H_RPCGEN */
