2 % * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
3 % * Use is subject to license terms.
7 % * The contents of this file are subject to the terms of the
8 % * Common Development and Distribution License, Version 1.0 only
9 % * (the "License"). You may not use this file except in compliance
12 % * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13 % * or http://www.opensolaris.org/os/licensing.
14 % * See the License for the specific language governing permissions
15 % * and limitations under the License.
17 % * When distributing Covered Code, include this CDDL HEADER in each
18 % * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19 % * If applicable, add the following below this CDDL HEADER, with the
20 % * fields enclosed by brackets "[]" replaced with your own identifying
21 % * information: Portions Copyright [yyyy] [name of copyright owner]
26 %#pragma ident "%Z%%M% %I% %E% SMI"
31 %int mdc_in_daemon = 1;
38 typedef string stringarray<>;
45 int mdc_errno; /* errno or negative error code */
46 int mdc_exitcode; /* child exit code. */
47 string mdc_node<>; /* associated node */
48 string mdc_misc<>; /* misc text */
53 % * rpc argument and response structures
55 struct mdc_bind_res_t {
56 mdc_err_t mdc_status; /* status of RPC call */
59 struct mdcrpc_proxy_args_t {
60 stringarray argvlist<>;
61 stringarray environment<>;
65 %int _mdc_in_daemon = 0;
66 %#pragma weak mdc_in_daemon = _mdc_in_daemon
67 %void mdc_clrerror(mdc_err_t *mdcep);
73 %extern int mdc_in_daemon;
76 % * Null error structure initializer.
78 %#define MDC_NULL_ERR { 0, NULL, NULL }
79 %#define MD_MDC_DEF_TO {5, 0} /* 5 seconds */
80 %#define MD_MDC_PMAP_TO {35, 0} /* 35 seconds */
81 %#define MD_MDC_PROXY_TO {60 * 60, 0 } /* 1hr */
84 % * various cluster errors, definition of MDC_NOTINCLUSTER must be changed
85 % * when new errors are added, since MDC_NOERROR has to come out to
89 MDC_PROXYKILLED = -13, /* remote was killed by signal */
90 MDC_PROXYNOFORK, /* could not fork remote */
91 MDC_PROXYFAILED, /* remote exited non-zero */
92 MDC_NOTINCLUSTER, /* host is not a node */
100 BIND_NOACCESS_DEVICE,
107 % * Set MDC_THISVERS to the newest version of the protocol
108 % * This allows the preprocessor to force an error if the
109 % * protocol changes, since the kernel xdr routines may need to be
110 % * recoded. Note that we can't explicitly set the version to a
111 % * symbol as rpcgen will then create erroneous routine names.
114 %#define MDC_ORIGVERS MDC_V1
115 %#define MDC_THISVERS 1
117 %/* All powerful group 14 */
121 % * External reference to constant null error struct. (declared in med_xdr.c)
123 %extern const mdc_err_t mdc_null_err;
124 %extern const struct timeval md_mdc_def_timeout;
125 %extern const struct timeval md_mdc_pmap_timeout;
126 %extern const struct timeval md_mdc_proxy_timeout;
129 % * Some useful defines
131 %#define MDC_SERVNAME "rpc.metacld"
132 %#define MDC_SVC "metacl"
139 % * Constant null error struct.
141 %const mdc_err_t mdc_null_err = MDC_NULL_ERR;
142 %const struct timeval md_mdc_def_timeout = MD_MDC_DEF_TO;
143 %const struct timeval md_mdc_pmap_timeout = MD_MDC_PMAP_TO;
144 %const struct timeval md_mdc_proxy_timeout = MD_MDC_PROXY_TO;
151 % * services available
155 mdc_bind_res_t mdc_null(void) = 0;
156 mdc_bind_res_t mdc_bind_devs(void) = 1;
157 mdc_bind_res_t mdc_proxy(mdcrpc_proxy_args_t) = 2;