/*
* 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 (c) 2013 by Delphix. All rights reserved.
*/
#ifndef _STMF_IMPL_H
#define _STMF_IMPL_H
#include <sys/stmf_defines.h>
#include <sys/stmf_ioctl.h>
#ifdef __cplusplus
extern "C" {
#endif
((uint32_t)1) << (e)))
~(((uint32_t)1) << (e))))
#define STMF_EVENT_CLEAR_ALL(h) ((h) = 0)
#define STMF_EVENT_ALLOC_HANDLE(h) ((h) = 0)
#define STMF_EVENT_FREE_HANDLE(h) ((h) = 0)
} else { \
}
struct stmf_i_scsi_task;
struct stmf_itl_data;
typedef struct stmf_i_lu_provider {
typedef struct stmf_i_lu {
char *ilu_alias;
/* point to the luid entry in stmf_state.stmf_luid_list */
void *ilu_luid;
} stmf_i_lu_t;
/*
* ilu_flags
*/
typedef struct stmf_i_port_provider {
typedef struct stmf_i_local_port {
/* which target group this port belongs to in stmf_state.stmf_tg_list */
void *ilport_tg;
/* XXX Need something to track all the remote ports also */
typedef struct stmf_i_remote_port {
int irport_refcnt;
/*
* ilport flags
*/
typedef struct stmf_i_scsi_session {
/*
* Ideally we should maintain 2 maps. One would indicate a new map
* which will become available only upon receipt of a REPORT LUN
* cmd.
*/
/*
* which host group the host of this session belongs to in
* stmf_state.stmf_hg_list
*/
void *iss_hg;
/*
* iss flags
*/
#define ITASK_DEFAULT_POLL_TIMEOUT 0
typedef enum {
typedef struct stmf_task_audit_rec {
struct stmf_worker;
typedef struct stmf_i_scsi_task {
/* For now we only support 4 parallel buffers. Should be enough. */
/* Task profile data */
/*
* itask_flags
*/
/*
* itask cmds.
*/
/*
* struct maintained on a per itl basis when the lu registers ITL handle.
*/
typedef struct stmf_itl_data {
void *itl_handle;
/*
* itl flags
*/
/*
* data structures to maintain provider private data.
*/
typedef struct stmf_pp_data {
void *ppd_provider;
typedef struct stmf_worker {
/*
* worker flags
*/
/*
* data struct for managing transfers.
*/
typedef struct stmf_xfer_data {
/*
* Define frequently used macros
*/
void stmf_dlun_init();
void stmf_worker_init();
#ifdef __cplusplus
}
#endif
#endif /* _STMF_IMPL_H */