/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
#ifndef _SYS_DLD_IOC_H
#define _SYS_DLD_IOC_H
#ifdef __cplusplus
extern "C" {
#endif
/*
* The name of the dld control device. All GLDv3 control ioctls are
* performed on this device.
*/
/*
* GLDv3 ioctl values are structured as follows:
*
* | 16-bits | 16-bits |
* +----------------+----------------+
* | module-id | command-id |
* +----------------+----------------+
*/
/*
* GLDv3 module ids to be passed in as the first argument to
* dld_ioc_register() and dld_ioc_unregister().
*/
/* GLDv3 modules use these macros to generate unique ioctl commands */
#ifdef _KERNEL
/*
* GLDv3 modules register the ioctls they're interested in by passing
* in an array of dld_ioc_info_t to dld_ioc_register(). Modules
* should call dld_ioc_register() either in _init() or attach(). The
* dld module assumes that ddi_hold_devi_by_instance(<module>, 0, 0)
* will cause the module to load and call dld_ioc_register().
*
* The di_cmd field is an ioctl command generated using one of the
* macros above. The di_argsize value is used by dld to copyin or
* copyout the correct amount of data depending on whether the
* DLDCOPYIN or DLDCOPYOUT flags are set so that every di_func()
*/
typedef struct dld_ioc_info {
/* Values for di_flags */
void dld_ioc_unregister(uint16_t);
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_DLD_IOC_H */