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

#ifndef _METAD_H_RPCGEN
#define	_METAD_H_RPCGEN

#include <rpc/rpc.h>
#ifndef _KERNEL
#ifdef _REENTRANT
#include <synch.h>
#endif	/* _REENTRANT */
#ifdef _REENTRANT
#include <thread.h>
#endif	/* _REENTRANT */
#endif /* !_KERNEL */

#ifdef __cplusplus
extern "C" {
#endif

/*
 * Copyright 1989-2002 Sun Microsystems, Inc.  All rights reserved.
 * Use is subject to license terms.
 */

#pragma ident	"@(#)metad.x	2.2	02/10/10 SMI"

#include <mdiox.h>
#include <meta_basic.h>

extern	int	md_in_daemon;
/*
 * There are too many external factors that affect the timing of the
 * operations, so we set the timeout to a very large value, in this
 * case 1 day, which should handle HW timeouts, large configurations,
 * and other potential delays.
 */
#define	CL_LONG_TMO	86400L

/*
 *	device id 
 */

struct mdrpc_devid_res {
	char *enc_devid;
	md_error_t status;
};
typedef struct mdrpc_devid_res mdrpc_devid_res;

struct mdrpc_devid_args {
	md_setkey_t *cl_sk;
	mdsetname_t *sp;
	mddrivename_t *drivenamep;
};
typedef struct mdrpc_devid_args mdrpc_devid_args;

/*
 *	device info
 */

struct mdrpc_devinfo_res {
	md_dev64_t dev;
	int vtime;
	md_error_t status;
};
typedef struct mdrpc_devinfo_res mdrpc_devinfo_res;

struct mdrpc_devinfo_args {
	md_setkey_t *cl_sk;
	mdsetname_t *sp;
	mddrivename_t *drivenamep;
};
typedef struct mdrpc_devinfo_args mdrpc_devinfo_args;

struct mdrpc_hostname_res {
	char *hostname;
	md_error_t status;
};
typedef struct mdrpc_hostname_res mdrpc_hostname_res;

struct mdrpc_getset_args {
	char *setname;
	set_t setno;
};
typedef struct mdrpc_getset_args mdrpc_getset_args;

/* NOTE: if you add to this struct, then fix the clnt_getset() */
/*	  to prevent memory leaks */

struct mdrpc_getset_res {
	md_set_record *sr;
	md_error_t status;
};
typedef struct mdrpc_getset_res mdrpc_getset_res;
#ifndef STRINGARRAY

typedef char *stringarray;
#define STRINGARRAY
#endif

struct mdrpc_createset_args {
	md_setkey_t *cl_sk;
	mdsetname_t *sp;
	md_node_nm_arr_t nodes;
	md_timeval32_t timestamp;
	u_long genid;
};
typedef struct mdrpc_createset_args mdrpc_createset_args;

struct mdrpc_bool_res {
	int value;
	md_error_t status;
};
typedef struct mdrpc_bool_res mdrpc_bool_res;

struct mdrpc_drives_args {
	md_setkey_t *cl_sk;
	mdsetname_t *sp;
	md_drive_desc *drivedescs;
	md_timeval32_t timestamp;
	u_long genid;
};
typedef struct mdrpc_drives_args mdrpc_drives_args;

struct mdrpc_drv_sidenm_args {
	md_setkey_t *cl_sk;
	char *hostname;
	mdsetname_t *sp;
	md_set_desc *sd;
	struct {
		u_int node_v_len;
		stringarray *node_v_val;
	} node_v;
};
typedef struct mdrpc_drv_sidenm_args mdrpc_drv_sidenm_args;

struct mdrpc_drvused_args {
	md_setkey_t *cl_sk;
	mdsetname_t *sp;
	mddrivename_t *drivenamep;
};
typedef struct mdrpc_drvused_args mdrpc_drvused_args;

struct mdrpc_host_args {
	md_setkey_t *cl_sk;
	mdsetname_t *sp;
	struct {
		u_int hosts_len;
		stringarray *hosts_val;
	} hosts;
};
typedef struct mdrpc_host_args mdrpc_host_args;

struct mdrpc_gtimeout_res {
	md_error_t status;
	mhd_mhiargs_t *mhiargsp;
};
typedef struct mdrpc_gtimeout_res mdrpc_gtimeout_res;

struct mdrpc_stimeout_args {
	md_setkey_t *cl_sk;
	mdsetname_t *sp;
	mhd_mhiargs_t *mhiargsp;
};
typedef struct mdrpc_stimeout_args mdrpc_stimeout_args;

struct mdrpc_upd_dr_flags_args {
	md_setkey_t *cl_sk;
	mdsetname_t *sp;
	md_drive_desc *drivedescs;
	u_int new_flags;
};
typedef struct mdrpc_upd_dr_flags_args mdrpc_upd_dr_flags_args;

struct mdrpc_upd_sr_flags_args {
	md_setkey_t *cl_sk;
	mdsetname_t *sp;
	u_int new_flags;
};
typedef struct mdrpc_upd_sr_flags_args mdrpc_upd_sr_flags_args;

struct mdrpc_setlock_res {
	md_setkey_t *cl_sk;
	md_error_t status;
};
typedef struct mdrpc_setlock_res mdrpc_setlock_res;

struct mdrpc_generic_res {
	md_error_t status;
};
typedef struct mdrpc_generic_res mdrpc_generic_res;

struct mdrpc_setno_args {
	md_setkey_t *cl_sk;
	set_t setno;
};
typedef struct mdrpc_setno_args mdrpc_setno_args;

struct mdrpc_null_args {
	md_setkey_t *cl_sk;
};
typedef struct mdrpc_null_args mdrpc_null_args;

struct mdrpc_sp_args {
	md_setkey_t *cl_sk;
	mdsetname_t *sp;
};
typedef struct mdrpc_sp_args mdrpc_sp_args;

struct mdrpc_updmeds_args {
	md_setkey_t *cl_sk;
	mdsetname_t *sp;
	md_h_arr_t meds;
};
typedef struct mdrpc_updmeds_args mdrpc_updmeds_args;

/*
 *	authorization info
 */
#define	METAD_GID 14

/*
 *	services available
 */

extern	void	short_circuit_getset(mdrpc_getset_args *args,
		    mdrpc_getset_res *res);

#define	METAD	100229
#define	METAD_VERSION	1

#if defined(__STDC__) || defined(__cplusplus)
#define	mdrpc_nullproc	0
extern  enum clnt_stat mdrpc_nullproc_1(void *, md_error_t *, CLIENT *);
extern  bool_t mdrpc_nullproc_1_svc(void *, md_error_t *, struct svc_req *);
#define	mdrpc_hostname	1
extern  enum clnt_stat mdrpc_hostname_1(mdrpc_null_args *, mdrpc_hostname_res *, CLIENT *);
extern  bool_t mdrpc_hostname_1_svc(mdrpc_null_args *, mdrpc_hostname_res *, struct svc_req *);
#define	mdrpc_addhosts	2
extern  enum clnt_stat mdrpc_addhosts_1(mdrpc_host_args *, mdrpc_generic_res *, CLIENT *);
extern  bool_t mdrpc_addhosts_1_svc(mdrpc_host_args *, mdrpc_generic_res *, struct svc_req *);
#define	mdrpc_delhosts	3
extern  enum clnt_stat mdrpc_delhosts_1(mdrpc_host_args *, mdrpc_generic_res *, CLIENT *);
extern  bool_t mdrpc_delhosts_1_svc(mdrpc_host_args *, mdrpc_generic_res *, struct svc_req *);
#define	mdrpc_createset	4
extern  enum clnt_stat mdrpc_createset_1(mdrpc_createset_args *, mdrpc_generic_res *, CLIENT *);
extern  bool_t mdrpc_createset_1_svc(mdrpc_createset_args *, mdrpc_generic_res *, struct svc_req *);
#define	mdrpc_delset	5
extern  enum clnt_stat mdrpc_delset_1(mdrpc_sp_args *, mdrpc_generic_res *, CLIENT *);
extern  bool_t mdrpc_delset_1_svc(mdrpc_sp_args *, mdrpc_generic_res *, struct svc_req *);
#define	mdrpc_getset	6
extern  enum clnt_stat mdrpc_getset_1(mdrpc_getset_args *, mdrpc_getset_res *, CLIENT *);
extern  bool_t mdrpc_getset_1_svc(mdrpc_getset_args *, mdrpc_getset_res *, struct svc_req *);
#define	mdrpc_setnumbusy	7
extern  enum clnt_stat mdrpc_setnumbusy_1(mdrpc_setno_args *, mdrpc_bool_res *, CLIENT *);
extern  bool_t mdrpc_setnumbusy_1_svc(mdrpc_setno_args *, mdrpc_bool_res *, struct svc_req *);
#define	mdrpc_setnameok	8
extern  enum clnt_stat mdrpc_setnameok_1(mdrpc_sp_args *, mdrpc_bool_res *, CLIENT *);
extern  bool_t mdrpc_setnameok_1_svc(mdrpc_sp_args *, mdrpc_bool_res *, struct svc_req *);
#define	mdrpc_ownset	9
extern  enum clnt_stat mdrpc_ownset_1(mdrpc_sp_args *, mdrpc_bool_res *, CLIENT *);
extern  bool_t mdrpc_ownset_1_svc(mdrpc_sp_args *, mdrpc_bool_res *, struct svc_req *);
#define	mdrpc_adddrvs	10
extern  enum clnt_stat mdrpc_adddrvs_1(mdrpc_drives_args *, mdrpc_generic_res *, CLIENT *);
extern  bool_t mdrpc_adddrvs_1_svc(mdrpc_drives_args *, mdrpc_generic_res *, struct svc_req *);
#define	mdrpc_deldrvs	11
extern  enum clnt_stat mdrpc_deldrvs_1(mdrpc_drives_args *, mdrpc_generic_res *, CLIENT *);
extern  bool_t mdrpc_deldrvs_1_svc(mdrpc_drives_args *, mdrpc_generic_res *, struct svc_req *);
#define	mdrpc_upd_dr_dbinfo	12
extern  enum clnt_stat mdrpc_upd_dr_dbinfo_1(mdrpc_drives_args *, mdrpc_generic_res *, CLIENT *);
extern  bool_t mdrpc_upd_dr_dbinfo_1_svc(mdrpc_drives_args *, mdrpc_generic_res *, struct svc_req *);
#define	mdrpc_devinfo	13
extern  enum clnt_stat mdrpc_devinfo_1(mdrpc_devinfo_args *, mdrpc_devinfo_res *, CLIENT *);
extern  bool_t mdrpc_devinfo_1_svc(mdrpc_devinfo_args *, mdrpc_devinfo_res *, struct svc_req *);
#define	mdrpc_drvused	14
extern  enum clnt_stat mdrpc_drvused_1(mdrpc_drvused_args *, mdrpc_generic_res *, CLIENT *);
extern  bool_t mdrpc_drvused_1_svc(mdrpc_drvused_args *, mdrpc_generic_res *, struct svc_req *);
#define	mdrpc_add_drv_sidenms	15
extern  enum clnt_stat mdrpc_add_drv_sidenms_1(mdrpc_drv_sidenm_args *, mdrpc_generic_res *, CLIENT *);
extern  bool_t mdrpc_add_drv_sidenms_1_svc(mdrpc_drv_sidenm_args *, mdrpc_generic_res *, struct svc_req *);
#define	mdrpc_del_drv_sidenms	16
extern  enum clnt_stat mdrpc_del_drv_sidenms_1(mdrpc_sp_args *, mdrpc_generic_res *, CLIENT *);
extern  bool_t mdrpc_del_drv_sidenms_1_svc(mdrpc_sp_args *, mdrpc_generic_res *, struct svc_req *);
#define	mdrpc_gtimeout	17
extern  enum clnt_stat mdrpc_gtimeout_1(mdrpc_sp_args *, mdrpc_gtimeout_res *, CLIENT *);
extern  bool_t mdrpc_gtimeout_1_svc(mdrpc_sp_args *, mdrpc_gtimeout_res *, struct svc_req *);
#define	mdrpc_stimeout	18
extern  enum clnt_stat mdrpc_stimeout_1(mdrpc_stimeout_args *, mdrpc_generic_res *, CLIENT *);
extern  bool_t mdrpc_stimeout_1_svc(mdrpc_stimeout_args *, mdrpc_generic_res *, struct svc_req *);
#define	mdrpc_upd_dr_flags	19
extern  enum clnt_stat mdrpc_upd_dr_flags_1(mdrpc_upd_dr_flags_args *, mdrpc_generic_res *, CLIENT *);
extern  bool_t mdrpc_upd_dr_flags_1_svc(mdrpc_upd_dr_flags_args *, mdrpc_generic_res *, struct svc_req *);
#define	mdrpc_upd_sr_flags	20
extern  enum clnt_stat mdrpc_upd_sr_flags_1(mdrpc_upd_sr_flags_args *, mdrpc_generic_res *, CLIENT *);
extern  bool_t mdrpc_upd_sr_flags_1_svc(mdrpc_upd_sr_flags_args *, mdrpc_generic_res *, struct svc_req *);
#define	mdrpc_unlock_set	21
extern  enum clnt_stat mdrpc_unlock_set_1(mdrpc_null_args *, mdrpc_setlock_res *, CLIENT *);
extern  bool_t mdrpc_unlock_set_1_svc(mdrpc_null_args *, mdrpc_setlock_res *, struct svc_req *);
#define	mdrpc_lock_set	22
extern  enum clnt_stat mdrpc_lock_set_1(mdrpc_null_args *, mdrpc_setlock_res *, CLIENT *);
extern  bool_t mdrpc_lock_set_1_svc(mdrpc_null_args *, mdrpc_setlock_res *, struct svc_req *);
#define	mdrpc_updmeds	23
extern  enum clnt_stat mdrpc_updmeds_1(mdrpc_updmeds_args *, mdrpc_generic_res *, CLIENT *);
extern  bool_t mdrpc_updmeds_1_svc(mdrpc_updmeds_args *, mdrpc_generic_res *, struct svc_req *);
#define	mdrpc_flush_internal	24
extern  enum clnt_stat mdrpc_flush_internal_1(mdrpc_null_args *, mdrpc_generic_res *, CLIENT *);
extern  bool_t mdrpc_flush_internal_1_svc(mdrpc_null_args *, mdrpc_generic_res *, struct svc_req *);
#define	mdrpc_devid	25
extern  enum clnt_stat mdrpc_devid_1(mdrpc_devid_args *, mdrpc_devid_res *, CLIENT *);
extern  bool_t mdrpc_devid_1_svc(mdrpc_devid_args *, mdrpc_devid_res *, struct svc_req *);
extern int metad_1_freeresult(SVCXPRT *, xdrproc_t, caddr_t);

#else /* K&R C */
#define	mdrpc_nullproc	0
extern  enum clnt_stat mdrpc_nullproc_1();
extern  bool_t mdrpc_nullproc_1_svc();
#define	mdrpc_hostname	1
extern  enum clnt_stat mdrpc_hostname_1();
extern  bool_t mdrpc_hostname_1_svc();
#define	mdrpc_addhosts	2
extern  enum clnt_stat mdrpc_addhosts_1();
extern  bool_t mdrpc_addhosts_1_svc();
#define	mdrpc_delhosts	3
extern  enum clnt_stat mdrpc_delhosts_1();
extern  bool_t mdrpc_delhosts_1_svc();
#define	mdrpc_createset	4
extern  enum clnt_stat mdrpc_createset_1();
extern  bool_t mdrpc_createset_1_svc();
#define	mdrpc_delset	5
extern  enum clnt_stat mdrpc_delset_1();
extern  bool_t mdrpc_delset_1_svc();
#define	mdrpc_getset	6
extern  enum clnt_stat mdrpc_getset_1();
extern  bool_t mdrpc_getset_1_svc();
#define	mdrpc_setnumbusy	7
extern  enum clnt_stat mdrpc_setnumbusy_1();
extern  bool_t mdrpc_setnumbusy_1_svc();
#define	mdrpc_setnameok	8
extern  enum clnt_stat mdrpc_setnameok_1();
extern  bool_t mdrpc_setnameok_1_svc();
#define	mdrpc_ownset	9
extern  enum clnt_stat mdrpc_ownset_1();
extern  bool_t mdrpc_ownset_1_svc();
#define	mdrpc_adddrvs	10
extern  enum clnt_stat mdrpc_adddrvs_1();
extern  bool_t mdrpc_adddrvs_1_svc();
#define	mdrpc_deldrvs	11
extern  enum clnt_stat mdrpc_deldrvs_1();
extern  bool_t mdrpc_deldrvs_1_svc();
#define	mdrpc_upd_dr_dbinfo	12
extern  enum clnt_stat mdrpc_upd_dr_dbinfo_1();
extern  bool_t mdrpc_upd_dr_dbinfo_1_svc();
#define	mdrpc_devinfo	13
extern  enum clnt_stat mdrpc_devinfo_1();
extern  bool_t mdrpc_devinfo_1_svc();
#define	mdrpc_drvused	14
extern  enum clnt_stat mdrpc_drvused_1();
extern  bool_t mdrpc_drvused_1_svc();
#define	mdrpc_add_drv_sidenms	15
extern  enum clnt_stat mdrpc_add_drv_sidenms_1();
extern  bool_t mdrpc_add_drv_sidenms_1_svc();
#define	mdrpc_del_drv_sidenms	16
extern  enum clnt_stat mdrpc_del_drv_sidenms_1();
extern  bool_t mdrpc_del_drv_sidenms_1_svc();
#define	mdrpc_gtimeout	17
extern  enum clnt_stat mdrpc_gtimeout_1();
extern  bool_t mdrpc_gtimeout_1_svc();
#define	mdrpc_stimeout	18
extern  enum clnt_stat mdrpc_stimeout_1();
extern  bool_t mdrpc_stimeout_1_svc();
#define	mdrpc_upd_dr_flags	19
extern  enum clnt_stat mdrpc_upd_dr_flags_1();
extern  bool_t mdrpc_upd_dr_flags_1_svc();
#define	mdrpc_upd_sr_flags	20
extern  enum clnt_stat mdrpc_upd_sr_flags_1();
extern  bool_t mdrpc_upd_sr_flags_1_svc();
#define	mdrpc_unlock_set	21
extern  enum clnt_stat mdrpc_unlock_set_1();
extern  bool_t mdrpc_unlock_set_1_svc();
#define	mdrpc_lock_set	22
extern  enum clnt_stat mdrpc_lock_set_1();
extern  bool_t mdrpc_lock_set_1_svc();
#define	mdrpc_updmeds	23
extern  enum clnt_stat mdrpc_updmeds_1();
extern  bool_t mdrpc_updmeds_1_svc();
#define	mdrpc_flush_internal	24
extern  enum clnt_stat mdrpc_flush_internal_1();
extern  bool_t mdrpc_flush_internal_1_svc();
#define	mdrpc_devid	25
extern  enum clnt_stat mdrpc_devid_1();
extern  bool_t mdrpc_devid_1_svc();
extern int metad_1_freeresult();
#endif /* K&R C */

/* the xdr functions */

#if defined(__STDC__) || defined(__cplusplus)
extern  bool_t xdr_mdrpc_devid_res(XDR *, mdrpc_devid_res*);
extern  bool_t xdr_mdrpc_devid_args(XDR *, mdrpc_devid_args*);
extern  bool_t xdr_mdrpc_devinfo_res(XDR *, mdrpc_devinfo_res*);
extern  bool_t xdr_mdrpc_devinfo_args(XDR *, mdrpc_devinfo_args*);
extern  bool_t xdr_mdrpc_hostname_res(XDR *, mdrpc_hostname_res*);
extern  bool_t xdr_mdrpc_getset_args(XDR *, mdrpc_getset_args*);
extern  bool_t xdr_mdrpc_getset_res(XDR *, mdrpc_getset_res*);
extern  bool_t xdr_stringarray(XDR *, stringarray*);
extern  bool_t xdr_mdrpc_createset_args(XDR *, mdrpc_createset_args*);
extern  bool_t xdr_mdrpc_bool_res(XDR *, mdrpc_bool_res*);
extern  bool_t xdr_mdrpc_drives_args(XDR *, mdrpc_drives_args*);
extern  bool_t xdr_mdrpc_drv_sidenm_args(XDR *, mdrpc_drv_sidenm_args*);
extern  bool_t xdr_mdrpc_drvused_args(XDR *, mdrpc_drvused_args*);
extern  bool_t xdr_mdrpc_host_args(XDR *, mdrpc_host_args*);
extern  bool_t xdr_mdrpc_gtimeout_res(XDR *, mdrpc_gtimeout_res*);
extern  bool_t xdr_mdrpc_stimeout_args(XDR *, mdrpc_stimeout_args*);
extern  bool_t xdr_mdrpc_upd_dr_flags_args(XDR *, mdrpc_upd_dr_flags_args*);
extern  bool_t xdr_mdrpc_upd_sr_flags_args(XDR *, mdrpc_upd_sr_flags_args*);
extern  bool_t xdr_mdrpc_setlock_res(XDR *, mdrpc_setlock_res*);
extern  bool_t xdr_mdrpc_generic_res(XDR *, mdrpc_generic_res*);
extern  bool_t xdr_mdrpc_setno_args(XDR *, mdrpc_setno_args*);
extern  bool_t xdr_mdrpc_null_args(XDR *, mdrpc_null_args*);
extern  bool_t xdr_mdrpc_sp_args(XDR *, mdrpc_sp_args*);
extern  bool_t xdr_mdrpc_updmeds_args(XDR *, mdrpc_updmeds_args*);

#else /* K&R C */
extern bool_t xdr_mdrpc_devid_res();
extern bool_t xdr_mdrpc_devid_args();
extern bool_t xdr_mdrpc_devinfo_res();
extern bool_t xdr_mdrpc_devinfo_args();
extern bool_t xdr_mdrpc_hostname_res();
extern bool_t xdr_mdrpc_getset_args();
extern bool_t xdr_mdrpc_getset_res();
extern bool_t xdr_stringarray();
extern bool_t xdr_mdrpc_createset_args();
extern bool_t xdr_mdrpc_bool_res();
extern bool_t xdr_mdrpc_drives_args();
extern bool_t xdr_mdrpc_drv_sidenm_args();
extern bool_t xdr_mdrpc_drvused_args();
extern bool_t xdr_mdrpc_host_args();
extern bool_t xdr_mdrpc_gtimeout_res();
extern bool_t xdr_mdrpc_stimeout_args();
extern bool_t xdr_mdrpc_upd_dr_flags_args();
extern bool_t xdr_mdrpc_upd_sr_flags_args();
extern bool_t xdr_mdrpc_setlock_res();
extern bool_t xdr_mdrpc_generic_res();
extern bool_t xdr_mdrpc_setno_args();
extern bool_t xdr_mdrpc_null_args();
extern bool_t xdr_mdrpc_sp_args();
extern bool_t xdr_mdrpc_updmeds_args();

#endif /* K&R C */

#ifdef __cplusplus
}
#endif

#endif /* !_METAD_H_RPCGEN */
