2 * *****************************************************************************
5 * hbaapi.h - header file for Sun extension for target mode adaptor
9 * The contents of this file are subject to the SNIA Public License
10 * Version 1.0 (the "License"); you may not use this file except in
11 * compliance with the License. You may obtain a copy of the License at
13 * http://www.snia.org/English/Resources/Code/OpenSource.html
15 * Software distributed under the License is distributed on an "AS IS"
16 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
17 * the License for the specific language governing rights and limitations
20 * *******************************************************************************
23 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
32 #ifndef _HBA_API_SUN_H
33 #define _HBA_API_SUN_H
37 #define HBA_CREATE_WWN_RANDOM 1
38 #define HBA_CREATE_WWN_FACTORY 2
40 typedef struct HBA_NPIVPortList
{
42 char hbaPaths
[1][1024];
43 } HBA_NPIVPORTLIST
, *PHBA_NPIVPORTLIST
;
45 typedef struct HBA_PortNPIVAttributes
{
49 HBA_UINT32 MaxNumberOfNPIVPorts
;
50 HBA_UINT32 NumberOfNPIVPorts
;
51 } HBA_PORTNPIVATTRIBUTES
, *PHBA_PORTNPIVATTRIBUTES
;
53 typedef struct HBA_NPIVAttributes
{
56 } HBA_NPIVATTRIBUTES
, *PHBA_NPIVATTRIBUTES
;
58 typedef struct HBA_NPIVCreateEntry
{
62 } HBA_NPIVCREATEENTRY
, *PHBA_NPIVCREATEENTRY
;
64 /* Device Level Events */
65 #define HBA_EVENT_DEVICE_UNKNOWN 0x600
66 #define HBA_EVENT_DEVICE_OFFLINE 0x601
67 #define HBA_EVENT_DEVICE_ONLINE 0x602
69 HBA_API HBA_UINT32
Sun_HBA_GetNumberOfTgtAdapters();
71 HBA_API HBA_STATUS
Sun_HBA_GetTgtAdapterName(
72 HBA_UINT32 adapterindex
,
76 HBA_API HBA_HANDLE
Sun_HBA_OpenTgtAdapter(
80 HBA_API HBA_STATUS
Sun_HBA_OpenTgtAdapterByWWN(
85 HBA_API HBA_STATUS
Sun_HBA_NPIVGetAdapterAttributes(
90 HBA_API HBA_STATUS
Sun_HBA_GetNPIVPortInfo(
93 HBA_UINT32 vportindex
,
94 HBA_NPIVATTRIBUTES
*attributes
96 HBA_API HBA_STATUS
Sun_HBA_DeleteNPIVPort(
101 HBA_API HBA_STATUS
Sun_HBA_CreateNPIVPort(
103 HBA_UINT32 portindex
,
106 HBA_UINT32
*npivportindex
108 HBA_API HBA_STATUS
Sun_HBA_GetPortNPIVAttributes(
110 HBA_UINT32 portindex
,
111 HBA_PORTNPIVATTRIBUTES
*portnpivattributes
114 HBA_STATUS
Sun_HBA_AdapterCreateWWN(
116 HBA_UINT32 portindex
,
123 HBA_STATUS
Sun_HBA_AdapterReturnWWN(
125 HBA_UINT32 portindex
,
130 HBA_API HBA_STATUS
Sun_HBA_RegisterForAdapterDeviceEvents(
134 HBA_UINT32 eventType
,
135 HBA_UINT32 fabricPortID
140 HBA_CALLBACKHANDLE
*callbackHandle
143 HBA_API HBA_STATUS
Sun_HBA_ForceLip(
147 #endif /* HBA_API_SUN_H */
151 #endif /* _HBA_API_SUN_H */