/*
* *****************************************************************************
*
* Description
* hbaapi.h - general header file for client
* and library developers
*
* License:
* The contents of this file are subject to the SNIA Public License
* Version 1.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
*
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
*
* The Original Code is SNIA HBA API general header file
*
* The Initial Developer of the Original Code is:
* Benjamin F. Kuo, Troika Networks, Inc. (benk@troikanetworks.com)
*
* Contributor(s):
* Tuan Lam, QLogic Corp. (t_lam@qlc.com)
* Dan Willie, Emulex Corp. (Dan.Willie@emulex.com)
* Dixon Hutchinson, Legato Systems, Inc. (dhutchin@legato.com)
* David Dillard, VERITAS Software Corp. (david.dillard@veritas.com)
*
*******************************************************************************
*
* Changes:
* 03/09/2000 Initial Draft
* (for other changes... see the CVS logs)
*******************************************************************************
*/
#ifndef _EMLXS_HBAAPI_H
#define _EMLXS_HBAAPI_H
#ifdef __cplusplus
extern "C" {
#endif
/* Library version string */
/* DLL imports for WIN32 operation */
#ifdef WIN32
#ifdef HBAAPI_EXPORTS
#else
#endif
#else
#define HBA_API
#endif
/* OS specific definitions */
#ifdef WIN32
/* Don't confuse, _WIN32 with WIN32... OK, how do you accompish that */
#ifdef _WIN32
#else
typedef struct {
} HBA_INT64;
typedef struct {
} HBA_UINT64;
#endif /* #ifdef _WIN32 */
#else
#ifndef _KERNEL
#include <time.h> /* Needed for struct tm */
#endif /* ifndef _KERNEL */
/* Note this section needs to be cleaned up for various Unix platforms */
typedef long long HBA_INT64;
typedef long long HBA_UINT64;
#endif /* #ifdef WIN32 */
/* 4.2.1 Handle to Device */
#define HBA_HANDLE_INVALID 0
/* 4.2.2 Status Return Values */
#define HBA_STATUS_OK 0
* last call to
* HBA_Refreshinformation */
* retry may be effective */
* retry may be effective */
* or deactivated */
* the local adapter */
* the specified adapter */
* detected among the library and driver modules
* invoked which will cause one or more functions
* in the highest version that all support to
* operate incorrectly. The differing function
* sets of software modules implementing different
* versions of the HBA API specification does not
* in itself constitute an incompatibility. Known
* interoperability bugs among supposedly
* compatible versions should be reported as
* incompatibilities, but not all such
* interoperability bugs may be known. This value
* may be returned by any function that calls a
* Vendor Specific Library and returns an
* HBA_STATUS, and by HBA_LoadLibrary and
* HBA_GetAdapterName. */
* WWN. This could occur if the
* NodeWWN of multiple adapters is
* identical */
* included a bad local SCSI bus
* number */
* included a bad local SCSI target
* number */
* included a bad local SCSI logical
* unit number */
/* A persistent binding set request
* included a local SCSI ID that was
* already bound */
* included a bad or unlocatable FCP
* Target FCID */
* included a bad FCP Target Node
* WWN */
* included a bad FCP Target Port
* WWN */
* included an FCP Logical Unit Number
* not defined by the identified
* Target*/
* included an undefined or otherwise
* inaccessible Logical Unit Unique
* Identifier */
* included a binding which did not
* match a binding established by the
* specified port */
* Nx_Port that was not a SCSI
* Target Port */
* unsupported FC-4 protocol */
* unimplemented capabilities for a
* port */
/* 4.2.3 Port Operational Modes Values */
* of reporting */
/* 4.2.4 Class of Service Values - See GS-2 Spec.*/
/* 4.2.5 Fc4Types Values */
typedef struct HBA_fc4types {
/* 4.2.6 Basic Types */
typedef struct HBA_wwn {
typedef struct HBA_ipaddress {
union
{
} ipaddress;
/* 4.2.7 Adapter Attributes */
typedef struct hba_AdapterAttributes {
*file */
/* 4.2.8 Port Attributes */
typedef struct HBA_PortAttributes {
/* 4.2.9 Port Statistics */
typedef struct HBA_PortStatistics {
/* 4.2.10 FCP Attributes */
typedef struct HBA_ScsiId {
typedef struct HBA_FcpId {
typedef struct HBA_LUID {
typedef struct HBA_FcpScsiEntry {
typedef struct HBA_FcpScsiEntryV2 {
typedef struct HBA_FCPTargetMapping {
* containing mappings */
typedef struct HBA_FCPTargetMappingV2 {
* containing mappings */
typedef struct HBA_FCPBindingEntry {
* to WWN, FcpLun always valid */
typedef struct HBA_FCPBinding {
/* 4.2.11 FC-3 Management Atrributes */
typedef struct HBA_MgmtInfo {
/* Event Codes */
typedef struct HBA_Link_EventInfo {
typedef struct HBA_RSCN_EventInfo {
* "Affected N-Port Pages"*/
typedef struct HBA_Pty_EventInfo {
typedef struct HBA_EventInfo {
union {
} Event;
#ifndef _KERNEL
typedef struct HBA_LibraryAttributes {
#endif /* ifndef _KERNEL */
/* Persistant Binding... */
/* A bit mask of Rev 2.0 persistent binding capabilities */
/* The following are bit flags indicating persistent binding capabilities */
typedef struct HBA_FCPBindingEntry2 {
typedef struct HBA_FcpBinding2 {
/* FC-4 Instrumentation */
typedef struct HBA_FC4Statistics {
typedef void * HBA_CALLBACKHANDLE;
/* Adapter Level Events */
/* Port Level Events */
/* Port Statistics Events */
/* Target Level Events */
/* Fabric Link Events */
/*
* Make sure HBA_LoadLibrary returns before any other threads
* make calls to the library
*/
char *adaptername
);
char* adaptername
);
);
HBA_API void HBA_CloseAdapter(
);
);
);
);
);
);
void *pReqBuffer,
void *pRspBuffer,
);
/* Depricated, but supported */
void *pReqBuffer,
void *pRspBuffer,
);
);
);
);
void *pRspBuffer,
);
/* Depricated, but supported */
void *pRspBuffer,
);
void *pRspBuffer,
);
void *pRspBuffer,
);
void *pRspBuffer,
);
void *pRspBuffer,
);
void *pRspBuffer,
);
);
const HBA_SCSIID *lunit,
);
HBA_API void HBA_ResetStatistics(
);
);
);
);
);
);
const HBA_FCPBINDING2
);
);
const HBA_FCPBINDING2
);
/* Depricated, but supported */
);
);
void *pRspBuffer,
void *pSenseBuffer,
);
/* Depricated, but supported */
void *pRspBuffer,
void *pSenseBuffer,
);
void *pRespBuffer,
void *pSenseBuffer,
);
/* Depricated, but supported */
void *pRspBuffer,
void *pSenseBuffer,
);
void *pRspBuffer,
void *pSenseBuffer,
);
/* Depricated, but supported */
void *pRspBuffer,
void *pSenseBuffer,
);
#ifndef _KERNEL
);
#endif /* ifndef _KERNEL */
);
void (*callback) (
void *data,
),
void *userData,
);
void (*callback)(
void *data,
),
void *userData,
);
void (*callback)(
void *data,
),
void *userData,
);
void (*callback)(
void *data,
),
void *userData,
);
void (*callback)(
void *data,
),
void *userData,
);
void (*callback)
(
void *data,
void *pRLIRBuffer,
),
void *userData,
void *pRLIRBuffer,
);
/* Wrapper library specific entry points */
#ifndef _KERNEL
);
#endif /* ifndef _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _EMLXS_HBAAPI_H */