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

#ifndef _METACL_H_RPCGEN
#define	_METACL_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 (c) 1999-2001 by Sun Microsystems, Inc.
 * All rights reserved.
 */

#pragma ident	"@(#)metacl.x	2.2	01/11/15 SMI"

#ifndef STRINGARRAY

typedef char *stringarray;
#define STRINGARRAY
#endif

struct mdc_err_t {
	int mdc_errno;
	int mdc_exitcode;
	char *mdc_node;
	char *mdc_misc;
};
typedef struct mdc_err_t mdc_err_t;

/*
 * rpc argument and response structures
 */

struct mdc_bind_res_t {
	mdc_err_t mdc_status;
};
typedef struct mdc_bind_res_t mdc_bind_res_t;

struct mdcrpc_proxy_args_t {
	struct {
		u_int argvlist_len;
		stringarray *argvlist_val;
	} argvlist;
	struct {
		u_int environment_len;
		stringarray *environment_val;
	} environment;
};
typedef struct mdcrpc_proxy_args_t mdcrpc_proxy_args_t;

extern	int	mdc_in_daemon;

/*
 * Null error structure initializer.
 */
#define	MDC_NULL_ERR	{ 0, NULL, NULL }
#define	MD_MDC_DEF_TO	{5, 0}		/* 5 seconds */
#define	MD_MDC_PMAP_TO	{35, 0}		/* 35 seconds */
#define	MD_MDC_PROXY_TO	{60 * 60, 0 }	/* 1hr */

/*
 * various cluster errors, definition of MDC_NOTINCLUSTER must be changed
 * when new errors are added, since MDC_NOERROR has to come out to
 * be zero!
 */

enum mdc_errno_t {
	MDC_PROXYKILLED = -13,
	MDC_PROXYNOFORK = -13 + 1,
	MDC_PROXYFAILED = -13 + 2,
	MDC_NOTINCLUSTER = -13 + 3,
	MDC_NOACCESS = -13 + 4,
	MDC_NOACCESS_CCR = -13 + 5,
	MDC_RPCFAILED = -13 + 6,
	BIND_LINKISDIR = -13 + 7,
	BIND_NOACCESS_SHARED = -13 + 8,
	BIND_LOCALSET = -13 + 9,
	BIND_NODISKSETCLASS = -13 + 10,
	BIND_NOACCESS_DEVICE = -13 + 11,
	BIND_BADDEVICE = -13 + 12,
	MDC_NOERROR = -13 + 13
};
typedef enum mdc_errno_t mdc_errno_t;

/*
 * Set MDC_THISVERS to the newest version of the protocol
 * This allows the preprocessor to force an error if the
 * protocol changes, since the kernel xdr routines may need to be
 * recoded.  Note that we can't explicitly set the version to a
 * symbol as rpcgen will then create erroneous routine names.
 */
#define	MDC_V1			1
#define	MDC_ORIGVERS		MDC_V1
#define	MDC_THISVERS		1

/* All powerful group 14 */
#define	MDC_GID			14

/*
 * External reference to constant null error struct. (declared in med_xdr.c)
 */
extern	const	mdc_err_t		mdc_null_err;
extern	const	struct	timeval		md_mdc_def_timeout;
extern	const	struct	timeval		md_mdc_pmap_timeout;
extern const	struct	timeval		md_mdc_proxy_timeout;

/*
 * Some useful defines
 */
#define	MDC_SERVNAME	"rpc.metacld"
#define	MDC_SVC		"metacl"


/*
 * services available
 */

#define	MDC_PROG	100281
#define	MDC_VERS	1

#if defined(__STDC__) || defined(__cplusplus)
#define	mdc_null	0
extern  enum clnt_stat mdc_null_1(void *, mdc_bind_res_t *, CLIENT *);
extern  bool_t mdc_null_1_svc(void *, mdc_bind_res_t *, struct svc_req *);
#define	mdc_bind_devs	1
extern  enum clnt_stat mdc_bind_devs_1(void *, mdc_bind_res_t *, CLIENT *);
extern  bool_t mdc_bind_devs_1_svc(void *, mdc_bind_res_t *, struct svc_req *);
#define	mdc_proxy	2
extern  enum clnt_stat mdc_proxy_1(mdcrpc_proxy_args_t *, mdc_bind_res_t *, CLIENT *);
extern  bool_t mdc_proxy_1_svc(mdcrpc_proxy_args_t *, mdc_bind_res_t *, struct svc_req *);
extern int mdc_prog_1_freeresult(SVCXPRT *, xdrproc_t, caddr_t);

#else /* K&R C */
#define	mdc_null	0
extern  enum clnt_stat mdc_null_1();
extern  bool_t mdc_null_1_svc();
#define	mdc_bind_devs	1
extern  enum clnt_stat mdc_bind_devs_1();
extern  bool_t mdc_bind_devs_1_svc();
#define	mdc_proxy	2
extern  enum clnt_stat mdc_proxy_1();
extern  bool_t mdc_proxy_1_svc();
extern int mdc_prog_1_freeresult();
#endif /* K&R C */

/* the xdr functions */

#if defined(__STDC__) || defined(__cplusplus)
extern  bool_t xdr_stringarray(XDR *, stringarray*);
extern  bool_t xdr_mdc_err_t(XDR *, mdc_err_t*);
extern  bool_t xdr_mdc_bind_res_t(XDR *, mdc_bind_res_t*);
extern  bool_t xdr_mdcrpc_proxy_args_t(XDR *, mdcrpc_proxy_args_t*);
extern  bool_t xdr_mdc_errno_t(XDR *, mdc_errno_t*);

#else /* K&R C */
extern bool_t xdr_stringarray();
extern bool_t xdr_mdc_err_t();
extern bool_t xdr_mdc_bind_res_t();
extern bool_t xdr_mdcrpc_proxy_args_t();
extern bool_t xdr_mdc_errno_t();

#endif /* K&R C */

#ifdef __cplusplus
}
#endif

#endif /* !_METACL_H_RPCGEN */
