libscsi_impl.h revision 275c9da86e89f8abf71135cf63d9fc23671b2e60
/*
* 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 _LIBSCSI_IMPL_H
#define _LIBSCSI_IMPL_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#include <libscsi.h>
#define LIBSCSI_ENGINE_EXT ".so"
#define LIBSCSI_ERRMSGLEN 512
typedef struct libscsi_engine_impl {
const libscsi_engine_t *lsei_engine;
void *lsei_dl_hdl;
struct libscsi_engine_impl *lsei_next;
typedef struct libscsi_action_impl {
struct libscsi_hdl {
char lsh_errmsg[LIBSCSI_ERRMSGLEN];
};
struct libscsi_target {
const libscsi_engine_t *lst_engine;
char *lst_vendor;
char *lst_product;
char *lst_revision;
void *lst_priv;
struct libscsi_hdl *lst_hdl;
};
#ifdef DEBUG
#else
#define ASSERT(x)
#endif
#define LXOR(l, r) (((l) != 0) ^ ((r) != 0))
extern int libscsi_assert(const char *, const char *, int);
#ifdef __cplusplus
}
#endif
#endif /* _LIBSCSI_IMPL_H */