oplkm.h revision 25cf1a301a396c38e8adf52c15f537b80d2483f7
/*
* 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
*/
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_OPLKM_H
#define _SYS_OPLKM_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* Device instance structure.
*/
typedef struct okms {
int km_reqlen; /* Request length */
} okms_t;
/* km_state flags */
!((x)->km_state & OKM_MB_DISC))
/* km_clean flags */
#define OKM_CLEAN_LOCK 0x00000001
#define OKM_CLEAN_CV 0x00000002
#define OKM_CLEAN_NODE 0x00000004
#ifdef DEBUG
/*
* Debug levels
*/
#define DUMP_REQ(r, l) okm_print_req(r, l)
#define DUMP_REPLY(r) okm_print_rep(r)
#else /* DEBUG */
#define DPRINTF(f, x)
#define DUMP_REQ(r, l)
#define DUMP_REPLY(r)
#endif /* DEBUG */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_OPLKM_H */