1d4b38e0077763e7c9b20768eacb841957e787bcrsmaeda * CDDL HEADER START
1d4b38e0077763e7c9b20768eacb841957e787bcrsmaeda * The contents of this file are subject to the terms of the
1d4b38e0077763e7c9b20768eacb841957e787bcrsmaeda * Common Development and Distribution License (the "License").
1d4b38e0077763e7c9b20768eacb841957e787bcrsmaeda * You may not use this file except in compliance with the License.
1d4b38e0077763e7c9b20768eacb841957e787bcrsmaeda * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1d4b38e0077763e7c9b20768eacb841957e787bcrsmaeda * See the License for the specific language governing permissions
1d4b38e0077763e7c9b20768eacb841957e787bcrsmaeda * and limitations under the License.
1d4b38e0077763e7c9b20768eacb841957e787bcrsmaeda * When distributing Covered Code, include this CDDL HEADER in each
1d4b38e0077763e7c9b20768eacb841957e787bcrsmaeda * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1d4b38e0077763e7c9b20768eacb841957e787bcrsmaeda * If applicable, add the following below this CDDL HEADER, with the
1d4b38e0077763e7c9b20768eacb841957e787bcrsmaeda * fields enclosed by brackets "[]" replaced with your own identifying
1d4b38e0077763e7c9b20768eacb841957e787bcrsmaeda * information: Portions Copyright [yyyy] [name of copyright owner]
1d4b38e0077763e7c9b20768eacb841957e787bcrsmaeda * CDDL HEADER END
02b4e56ca3a4e4a4fe9e52fca9c2972101f0e57fHaik Aftandilian * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
1d4b38e0077763e7c9b20768eacb841957e787bcrsmaedaextern "C" {
1d4b38e0077763e7c9b20768eacb841957e787bcrsmaedatypedef enum {
1d4b38e0077763e7c9b20768eacb841957e787bcrsmaeda * Responses to/from the daemon for a reconfig request.
1d4b38e0077763e7c9b20768eacb841957e787bcrsmaedatypedef enum {
1d4b38e0077763e7c9b20768eacb841957e787bcrsmaeda * Each resource descriptor consists of a common header
1d4b38e0077763e7c9b20768eacb841957e787bcrsmaeda * followed by a resource-specific structure.
99c7e85592b5d673f1469b2767f876710004dc23James Marks - Sun Microsystems * Response structure passed back by drctl to its clients
99c7e85592b5d673f1469b2767f876710004dc23James Marks - Sun Microsystems * (resource-specific DR modules).
99c7e85592b5d673f1469b2767f876710004dc23James Marks - Sun Microsystems#define resp_err_msg un.err_msg
99c7e85592b5d673f1469b2767f876710004dc23James Marks - Sun Microsystems#define resp_resources un.resources
1d4b38e0077763e7c9b20768eacb841957e787bcrsmaeda * Message sent to DR daemon
1d4b38e0077763e7c9b20768eacb841957e787bcrsmaeda * DR RSMs (resource-specific modules) call these functions to
1d4b38e0077763e7c9b20768eacb841957e787bcrsmaeda * initialize or finalize a DR request. A request may include
1d4b38e0077763e7c9b20768eacb841957e787bcrsmaeda * multiple resources of the same type. The _init call returns
1d4b38e0077763e7c9b20768eacb841957e787bcrsmaeda * a cookie which must be supplied on by the corresponding
1d4b38e0077763e7c9b20768eacb841957e787bcrsmaeda * _fini call.
1d4b38e0077763e7c9b20768eacb841957e787bcrsmaedaextern int drctl_config_init(int, int,
99c7e85592b5d673f1469b2767f876710004dc23James Marks - Sun Microsystems drctl_rsrc_t *, int, drctl_resp_t **, size_t *, drctl_cookie_t);
1d4b38e0077763e7c9b20768eacb841957e787bcrsmaedaextern int drctl_config_fini(drctl_cookie_t, drctl_rsrc_t *, int);
af4c679f647cf088543c762e33d41a3ac52cfa14Sean McEnroeextern void drctl_block(void);
02b4e56ca3a4e4a4fe9e52fca9c2972101f0e57fHaik Aftandilianextern int drctl_tryblock(void);
af4c679f647cf088543c762e33d41a3ac52cfa14Sean McEnroeextern void drctl_unblock(void);
1d4b38e0077763e7c9b20768eacb841957e787bcrsmaeda * Values for the 2nd arg (flags) of drctl_config_init
1d4b38e0077763e7c9b20768eacb841957e787bcrsmaeda#endif /* _SYS_DRCTL_H */