sbd_impl.h revision fcf3ce441efd61da9bb2884968af01cb7c1452cc
/*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SBD_IMPL_H
#define _SBD_IMPL_H
#ifdef __cplusplus
extern "C" {
#endif
struct register_lu_cmd;
struct modify_lu_cmd;
struct sbd_lu_attr;
struct sbd_it_data;
/*
* sms endianess
*/
#define SMS_BIG_ENDIAN 0x00
#define SMS_LITTLE_ENDIAN 0xFF
#ifdef _BIG_ENDIAN
#define SMS_DATA_ORDER SMS_BIG_ENDIAN
#else
#define SMS_DATA_ORDER SMS_LITTLE_ENDIAN
#endif
#define SBD_V0_MAGIC 0x53554e4d4943524f
#define SBD_MAGIC 0x53554e5342444c55
typedef struct sbd_v0_meta_start {
typedef struct sbd_meta_start {
typedef struct sm_v0_section_hdr {
typedef struct sm_section_hdr {
/*
* sbd meta section identifiers
*/
#define SMS_ID_LU_INFO 0
typedef struct sbd_v0_lu_info {
typedef struct sbd_lu_info {
typedef struct sbd_lu {
struct sbd_it_data *sl_it_list;
} sbd_lu_t;
extern sbd_lu_t *sbd_lu_list;
/*
* sl_flags
*/
#define SBD_LU_HAS_SCSI2_RESERVATION 0x0001
typedef struct sbd_cmd {
} sbd_cmd_t;
/*
* flags for sbd_cmd
*/
#define SBD_SCSI_CMD_ACTIVE 0x01
#define SBD_SCSI_CMD_ABORT_REQUESTED 0x02
#define SBD_SCSI_CMD_XFER_FAIL 0x04
/*
* cmd types
*/
#define SBD_CMD_SCSI_READ 0x01
#define SBD_CMD_SCSI_WRITE 0x02
#define SBD_CMD_SMALL_READ 0x03
#define SBD_CMD_SMALL_WRITE 0x04
typedef struct sbd_it_data {
struct sbd_it_data *sbd_it_next;
/*
* Different UA conditions
*/
#define SBD_UA_POR 0x01
#define SBD_UA_CAPACITY_CHANGED 0x02
/*
* sbd_it_flags
*/
#define SBD_IT_HAS_SCSI2_RESERVATION 0x0001
#ifdef __cplusplus
}
#endif
#endif /* _SBD_IMPL_H */