/*
* 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 _LIBSCSI_H
#define _LIBSCSI_H
#ifdef __cplusplus
extern "C" {
#endif
#include <sys/sysmacros.h>
#include <stdarg.h>
/*
* Flags for action creation. Selected to avoid overlap with the uscsi
* flags with similar or identical meaning.
*/
typedef enum libscsi_errno {
typedef enum libscsi_reason {
struct libscsi_hdl;
struct libscsi_target;
typedef struct libscsi_status {
struct libscsi_action;
typedef struct libscsi_engine_ops {
typedef struct libscsi_engine {
const char *lse_name;
extern void libscsi_fini(libscsi_hdl_t *);
const void *);
extern const char *libscsi_target_name(libscsi_target_t *);
extern const char *libscsi_vendor(libscsi_target_t *);
extern const char *libscsi_product(libscsi_target_t *);
extern const char *libscsi_revision(libscsi_target_t *);
extern const char *libscsi_errmsg(libscsi_hdl_t *);
extern const char *libscsi_strerror(libscsi_errno_t);
extern const char *libscsi_errname(libscsi_errno_t);
extern libscsi_errno_t libscsi_errcode(const char *);
extern int libscsi_action_get_buffer(const libscsi_action_t *,
extern int libscsi_action_get_sense(const libscsi_action_t *,
extern void libscsi_action_free(libscsi_action_t *);
extern const char *libscsi_sense_key_name(uint64_t);
/*
* Interfaces for engine providers
*/
extern char *libscsi_strdup(libscsi_hdl_t *, const char *);
extern void libscsi_free(libscsi_hdl_t *, void *);
va_list);
/*
* Generic SCSI utility functions.
*/
#ifdef __cplusplus
}
#endif
#endif /* _LIBSCSI_H */