feature_tests.h: always use largefile interfaces
[unleashed.git] / usr / src / lib / libima / common / ima.h
blobc3119c4a1537e6b692432a4c52e3068c98330c66
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
19 * CDDL HEADER END
22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
26 /******************************************************************************
28 * Description
29 * Ima.h - general header file for client
30 * and library developers
32 * License:
33 * The contents of this file are subject to the SNIA Public License
34 * Version 1.0 (the "License"); you may not use this file except in
35 * compliance with the License. You may obtain a copy of the License at
37 * /http://www.snia.org/English/Resources/Code/OpenSource.html
39 * Software distributed under the License is distributed on an "AS IS"
40 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
41 * the License for the specific language governing rights and limitations
42 * under the License.
44 * The Original Code is SNIA HBA API and IMA general header file
46 * The Initial Developer of the Original Code is:
47 * Benjamin F. Kuo, Troika Networks, Inc. (benk@troikanetworks.com)
48 * David Dillard VERITAS Software david.dillard@veritas.com
50 * Contributor(s):
51 * Jeff Ding, Adaptec, Inc. (jding@corp.adaptec.com)
52 * Dave Wysochanski, Network Appliance, Inc. (davidw@netapp.com)
54 ******************************************************************************
56 * Changes:
57 * 09/24/2003 Initial Draft
58 * (for other changes... see the CVS logs)
59 * 12/15/2003 corrected the defined parameter in IMA_SetPhbaIsnsDiscovery().
60 * lower case the computer name as iscsi name in
61 * IMA_GenerateNodeName().
62 * 03/01/2004 Brought up to date with respect to IMA v1.0.1; made formatting
63 * changes - lines to 80 cols - for readability.
65 * 01/21/2005 Updated to support IMA 1.1.3.
66 *****************************************************************************/
67 #ifdef __cplusplus
68 extern "C" {
69 #endif
71 #ifndef IMA_H
72 #define IMA_H
74 #include <time.h>
75 #include <wchar.h>
78 /* Library version string */
79 #define HBA_LIBVERSION 2
81 #define IMA_MAX_CALLBACK_PER_PLUGIN 64
82 #define IMA_MAX_NUM_PLUGINS 32
84 /* DLL imports for WIN32 operation */
85 #ifdef WIN32
86 #ifdef IMA_EXPORTS
87 #define IMA_API __declspec(dllexport)
88 #else
89 #define IMA_API __declspec(dllimport)
90 #endif
91 #else
92 #define IMA_API
93 #endif
95 /* OS specific definitions */
97 #ifdef WIN32
98 typedef unsigned char IMA_UINT8; // Unsigned 8 bits
99 typedef char IMA_INT8; // Signed 8 bits
100 typedef unsigned short IMA_UINT16; // Unsigned 16 bits
101 typedef short IMA_INT16; // Signed 16 bits
102 typedef unsigned int IMA_UINT32; // Unsigned 32 bits
103 typedef int IMA_INT32; // Signed 32 bits
104 typedef void* IMA_PVOID; // Pointer to void
105 typedef IMA_UINT32 IMA_VOID32; // Opaque 32 bits
108 /* Don't confuse, _WIN32 with WIN32... OK, how do you accompish that */
109 #ifdef _WIN32
110 typedef __int64 IMA_INT64;
111 typedef unsigned __int64 IMA_UINT64;
112 #else
113 typedef struct {
114 TN_UINT32 lo_val;
115 TN_UINT32 hi_val;
116 } IMA_INT64;
118 typedef struct {
119 TN_UINT32 lo_val;
120 TN_UINT32 hi_val;
121 } IMA_UINT64;
122 #endif /* #ifdef _WIN32 */
125 #else
127 /* Note this section needs to be cleaned up for various Unix platforms */
128 typedef unsigned char IMA_UINT8; /* Unsigned 8 bits */
129 typedef char IMA_INT8; /* Signed 8 bits */
130 typedef unsigned short IMA_UINT16; /* Unsigned 16 bits */
131 typedef short IMA_INT16; /* Signed 16 bits */
132 typedef unsigned int IMA_UINT32; /* Unsigned 32 bits */
133 typedef int IMA_INT32; /* Signed 32 bits */
134 typedef void* IMA_PVOID; /* Pointer to void */
135 typedef IMA_UINT32 IMA_VOID32; /* Opaque 32 bits */
136 typedef long long IMA_INT64;
137 typedef long long IMA_UINT64;
139 #endif /* #ifdef WIN32 */
144 *******************************************************************************
146 * Generic IMA Constant Definitions
148 *******************************************************************************
150 #define RL_LIBRARY_SEQNUM 0
151 #define RL_SHARED_NODE_SEQNUM 0
154 * Value which can be assigned to an IMA_BOOL and or an IMA_XBOOL.
156 #define IMA_TRUE 1
159 * Value which can be assigned to an IMA_BOOL and or an IMA_XBOOL.
161 #define IMA_FALSE 0
164 * Value which can be assigned to an IMA_XBOOL.
166 #define IMA_UNKNOWN 0xFFFFFFFF
171 *******************************************************************************
173 * Base IMA Type Definitions
175 * @note Types that have a specific size must be defined ImaOsTypes.h which is
176 * an OS specific include file which is included by this file.
178 *******************************************************************************
182 * A character.
184 typedef char IMA_CHAR;
187 * A wide character.
189 typedef wchar_t IMA_WCHAR;
192 * An integer. Spec states this is 32 bits on 32-bit systems, and 64-bit
193 * on 64-bit systems.
195 typedef unsigned long IMA_UINT;
198 * A boolean.
200 typedef IMA_UINT32 IMA_BOOL;
203 * An extended boolean: can have the values @ref IMA_TRUE, @ref IMA_FALSE, and
204 * @ref IMA_UNKNOWN.
206 typedef IMA_UINT32 IMA_XBOOL;
209 * A date and time.
211 typedef struct tm IMA_DATETIME;
213 typedef unsigned char IMA_BYTE;
216 *******************************************************************************
218 * Constants and macros declarations related to IMA_STATUS
220 *******************************************************************************
222 #ifdef SOLARIS
223 typedef IMA_UINT IMA_STATUS;
225 #define IMA_STATUS_SUCCESS 0x00000000
226 #define IMA_STATUS_ERROR 0x80000000
228 #define IMA_SUCCESS(status) (((IMA_STATUS)(status) & \
229 (IMA_STATUS)IMA_STATUS_ERROR) == 0 ? IMA_TRUE : IMA_FALSE)
230 #define IMA_ERROR(status) (((IMA_STATUS)(status) & \
231 (IMA_STATUS)IMA_STATUS_ERROR) == 0x8000000 ? IMA_TRUE : IMA_FALSE)
233 #define MAKE_IMA_STATUS(x) ((IMA_STATUS)(x))
234 #define MAKE_IMA_ERROR(x) ((IMA_STATUS)(IMA_STATUS_ERROR | (x)))
235 #define GET_SYSTEM_ERROR(x) (((IMA_STATUS)(x) & 0x0000FFFF))
237 #define IMA_STATUS_REBOOT_NECESSARY MAKE_IMA_STATUS(0x01)
238 #define IMA_STATUS_INCONSISTENT_NODE_PROPERTIES MAKE_IMA_STATUS(0x02)
239 #define IMA_STATUS_SCSI_STATUS_CONDITION_MET MAKE_IMA_STATUS(0x100)
241 #define IMA_ERROR_NOT_SUPPORTED MAKE_IMA_ERROR(0x01)
242 #define IMA_ERROR_INSUFFICIENT_MEMORY MAKE_IMA_ERROR(0x02)
243 #define IMA_ERROR_LAST_PRIMARY_DISCOVERY_METHOD MAKE_IMA_ERROR(0x03)
244 #define IMA_ERROR_UNEXPECTED_OS_ERROR MAKE_IMA_ERROR(0x04)
245 #define IMA_ERROR_SYNC_TIMEOUT MAKE_IMA_ERROR(0x05)
246 #define IMA_ERROR_LU_EXPOSED MAKE_IMA_ERROR(0x06)
247 #define IMA_ERROR_LU_NOT_EXPOSED MAKE_IMA_ERROR(0x07)
248 #define IMA_ERROR_LU_IN_USE MAKE_IMA_ERROR(0x08)
249 #define IMA_ERROR_TARGET_TIMEOUT MAKE_IMA_ERROR(0x09)
250 #define IMA_ERROR_LOGIN_REJECTED MAKE_IMA_ERROR(0x0A)
251 #define IMA_ERROR_STATS_COLLECTION_NOT_ENABLED MAKE_IMA_ERROR(0x0B)
252 #define IMA_ERROR_SCSI_STATUS_CHECK_CONDITION MAKE_IMA_ERROR(0x100)
253 #define IMA_ERROR_SCSI_STATUS_BUSY MAKE_IMA_ERROR(0x101)
254 #define IMA_ERROR_SCSI_STATUS_RESERVATION_CONFLICT MAKE_IMA_ERROR(0x102)
255 #define IMA_ERROR_SCSI_STATUS_TASK_SET_FULL MAKE_IMA_ERROR(0x103)
256 #define IMA_ERROR_SCSI_STATUS_ACA_ACTIVE MAKE_IMA_ERROR(0x104)
257 #define IMA_ERROR_SCSI_STATUS_TASK_ABORTED MAKE_IMA_ERROR(0x105)
258 #define IMA_ERROR_INVALID_PARAMETER MAKE_IMA_ERROR(0x40000000)
259 #define IMA_ERROR_INVALID_OBJECT_TYPE MAKE_IMA_ERROR(0x40000001)
260 #define IMA_ERROR_INCORRECT_OBJECT_TYPE MAKE_IMA_ERROR(0x40000002)
261 #define IMA_ERROR_OBJECT_NOT_FOUND MAKE_IMA_ERROR(0x40000003)
262 #define IMA_ERROR_NAME_TOO_LONG MAKE_IMA_ERROR(0x40000004)
263 #define IMA_ERROR_UNKNOWN_ERROR MAKE_IMA_ERROR(0x0fffffff)
265 #else
267 typedef enum {
268 IMA_STATUS_SUCCESS = 0x00000000,
269 IMA_STATUS_REBOOT_NECESSARY = 0x00000001,
270 IMA_STATUS_INCONSISTENT_NODE_PROPERTIES = 0x00000002,
271 IMA_STATUS_SCSI_STATUS_CONDITION_MET = 0x00000100,
273 IMA_STATUS_ERROR = 0x80000000,
274 IMA_ERROR_NOT_SUPPORTED = 0x80000001,
275 IMA_ERROR_INSUFFICIENT_MEMORY = 0x80000002,
276 IMA_ERROR_LAST_PRIMARY_DISCOVERY_METHOD = 0x80000003,
277 IMA_ERROR_UNEXPECTED_OS_ERROR = 0x80000004,
278 IMA_ERROR_SYNC_TIMEOUT = 0x80000005,
279 IMA_ERROR_LU_EXPOSED = 0x80000006,
280 IMA_ERROR_LU_NOT_EXPOSED = 0x80000007,
281 IMA_ERROR_LU_IN_USE = 0x80000008,
282 IMA_ERROR_TARGET_TIMEOUT = 0x80000009,
283 IMA_ERROR_LOGIN_REJECTED = 0x8000000A,
284 IMA_ERROR_STATS_COLLECTION_NOT_ENABLED = 0x8000000B,
285 IMA_ERROR_SCSI_STATUS_CHECK_CONDITION = 0x80000100,
286 IMA_ERROR_SCSI_STATUS_BUSY = 0x80000101,
287 IMA_ERROR_SCSI_STATUS_RESERVATION_CONFLICT = 0x80000102,
288 IMA_ERROR_SCSI_STATUS_TASK_SET_FULL = 0x80000103,
289 IMA_ERROR_SCSI_STATUS_ACA_ACTIVE = 0x80000104,
290 IMA_ERROR_SCSI_STATUS_TASK_ABORTED = 0x80000105,
291 IMA_ERROR_INVALID_PARAMETER = 0xC0000000,
292 IMA_ERROR_INVALID_OBJECT_TYPE = 0xC0000001,
293 IMA_ERROR_INCORRECT_OBJECT_TYPE = 0xC0000002,
294 IMA_ERROR_OBJECT_NOT_FOUND = 0xC0000003,
295 IMA_ERROR_NAME_TOO_LONG = 0xC0000004,
296 IMA_ERROR_UNKNOWN_ERROR = 0x8FFFFFFF
297 } IMA_STATUS;
300 #define IMA_SUCCESS(status) ( (IMA_UINT32)(status) & \
301 (IMA_UINT32)IMA_STATUS_ERROR == 0 ? \
302 IMA_TRUE : IMA_FALSE )
303 #define IMA_ERROR(status) ( (IMA_UINT32)(status) & \
304 (IMA_UINT32)IMA_STATUS_ERROR == 0x8000000 ? \
305 IMA_TRUE : IMA_FALSE )
308 #define IMA_SUCCESS(status) !((status) & IMA_STATUS_ERROR)
309 #define IMA_ERROR(status) ((status) & IMA_STATUS_ERROR)
311 #endif
314 *******************************************************************************
316 * Declaration of the IMA_OBJECT_TYPE enumeration
318 *******************************************************************************
320 typedef enum
322 IMA_OBJECT_TYPE_UNKNOWN = 0,
323 IMA_OBJECT_TYPE_PLUGIN = 1,
324 IMA_OBJECT_TYPE_NODE = 2,
325 IMA_OBJECT_TYPE_LHBA = 3,
326 IMA_OBJECT_TYPE_PHBA = 4,
327 IMA_OBJECT_TYPE_NETWORK_PORTAL = 5,
328 IMA_OBJECT_TYPE_PORTAL_GROUP = 6,
329 IMA_OBJECT_TYPE_LNP = 7,
330 IMA_OBJECT_TYPE_PNP = 8,
331 IMA_OBJECT_TYPE_TARGET = 9,
332 IMA_OBJECT_TYPE_LU = 10,
333 IMA_OBJECT_TYPE_DISCOVERY_ADDRESS = 11,
334 IMA_OBJECT_TYPE_STATIC_DISCOVERY_TARGET = 12,
335 IMA_OBJECT_TYPE_CONNECTION = 13,
336 IMA_OBJECT_TYPE_SESSION = 14
337 } IMA_OBJECT_TYPE;
339 typedef enum
341 IMA_ISNS_DISCOVERY_METHOD_STATIC = 0,
342 IMA_ISNS_DISCOVERY_METHOD_DHCP = 1,
343 IMA_ISNS_DISCOVERY_METHOD_SLP = 2
344 } IMA_ISNS_DISCOVERY_METHOD;
346 typedef enum
348 IMA_DOWNLOAD_IMAGE_TYPE_FIRMWARE = 0,
349 IMA_DOWNLOAD_IMAGE_TYPE_OPTION_ROM = 1,
350 IMA_DOWNLOAD_IMAGE_TYPE_ALL = 2,
351 IMA_DOWNLOAD_IMAGE_TYPE_BOOTCODE = 3
352 } IMA_PHBA_DOWNLOAD_IMAGE_TYPE;
354 typedef enum
356 IMA_PHBA_STATUS_WORKING = 0,
357 IMA_PHBA_STATUS_FAILED = 1
358 } IMA_PHBA_STATUS;
360 typedef enum
362 IMA_NETWORK_PORT_STATUS_WORKING = 0,
363 IMA_NETWORK_PORT_STATUS_DEGRADED = 1,
364 IMA_NETWORK_PORT_STATUS_CRITICAL = 2,
365 IMA_NETWORK_PORT_STATUS_FAILED = 3,
366 IMA_NETWORK_PORT_STATUS_DISCONNECTED = 4
367 } IMA_NETWORK_PORT_STATUS;
369 typedef enum
371 IMA_TARGET_DISCOVERY_METHOD_STATIC = 1,
372 IMA_TARGET_DISCOVERY_METHOD_SLP = 2,
373 IMA_TARGET_DISCOVERY_METHOD_ISNS = 4,
374 IMA_TARGET_DISCOVERY_METHOD_SENDTARGETS = 8
375 } IMA_TARGET_DISCOVERY_METHOD;
377 typedef enum
379 IMA_AUTHMETHOD_NONE = 0,
380 IMA_AUTHMETHOD_CHAP = 1,
381 IMA_AUTHMETHOD_SRP = 2,
382 IMA_AUTHMETHOD_KRB5 = 3,
383 IMA_AUTHMETHOD_SPKM1 = 4,
384 IMA_AUTHMETHOD_SPKM2 = 5
385 } IMA_AUTHMETHOD;
387 typedef enum
389 IMA_COMMIT_TYPE_AUTO = 0,
390 IMA_COMMIT_TYPE_ACTIVE,
391 IMA_COMMIT_TYPE_PERSISTENT,
392 IMA_COMMIT_TYPE_ACTIVE_AND_PERSISTENT,
393 IMA_COMMIT_TYPE_ALL_WITH_RESET
394 } IMA_COMMIT_LEVEL;
396 typedef enum
398 IMA_DIGEST_NONE = 0,
399 IMA_DIGEST_CRC32C = 1
400 } IMA_DIGEST_TYPE;
404 *******************************************************************************
406 * Declaration of the IMA_OID structure
408 * This structure should be treated as opaque by clients of the API.
409 * Appropriate APIs should be used to extract information from the structure.
411 *******************************************************************************
413 typedef struct _IMA_OID
416 * The type of the object. When an object ID is supplied as a parameter
417 * to an API the library uses this value to insure that the supplied
418 * object's type is appropriate for the API.
420 IMA_OBJECT_TYPE objectType;
423 * A value determined by the library which it uses to uniquely identify the
424 * owner of an object. The owner of an object is either the library itself
425 * or a plugin. When an object ID is supplied as a parameter to an API the
426 * library uses this value to determine if it should handle the call itself
427 * or direct the call to one or more plugins.
429 IMA_UINT32 ownerId;
432 * A value determined by a plugin which a plugin uses, perhaps in
433 * combination with the object type, to uniquely identify one of its
434 * objects.
436 IMA_UINT64 objectSequenceNumber;
438 } IMA_OID;
443 *******************************************************************************
445 * Declaration of the IMA_OID_LIST structure
447 * This structure is used by a number of APIs to return lists of objects. Any
448 * instance of this structure returned by an API must be freed by a client
449 * using the IMA_FreeObjectIdList API. Although oids is declared to be an
450 * array of one
451 * @ref IMA_OID structure it can in fact contain any number of
452 * @ref IMA_OID structures.
454 * @note The @a oids array is a variable length array, despite its declaration
455 * below it can be of any length.
457 *******************************************************************************
459 typedef struct _IMA_OID_LIST
462 * The number of object IDs in the @a oids array.
464 IMA_UINT oidCount;
467 * A variable length array of zero or more object IDs. There are
468 * 'oidCount' object IDs in this array.
470 IMA_OID oids[1];
472 } IMA_OID_LIST;
474 #define IMA_HOST_NAME_LEN 256
475 typedef IMA_WCHAR IMA_HOST_NAME[IMA_HOST_NAME_LEN];
476 typedef IMA_BYTE IMA_MAC_ADDRESS[6];
479 *******************************************************************************
481 * Declaration of the IMA_LIBRARY_PROPERTIES structure
483 *******************************************************************************
485 typedef struct _IMA_LIBRARY_PROPERTIES
488 * The version of the iSCSI Management API implemented by the library.
489 * The value returned by a library for the API as described in this
490 * document is one.
492 IMA_UINT supportedImaVersion;
495 * A nul terminated ASCII string containing the name of the vendor that
496 * created the binary version of the library.
498 IMA_WCHAR vendor[256];
501 * A nul terminated ASCII string containing the implementation version
502 * of the library from the vendor specified in the 'vendor' field.
504 IMA_WCHAR implementationVersion[256];
507 * A nul terminated ASCII string ideally containing the path and file
508 * name of the library that is being used by the currently executing
509 * process can be found. If the path cannot be determined then it is
510 * acceptable to fill this field with only the name (and extension if
511 * applicable) of the file of the library. If this cannot be determined
512 * then this field should be an empty string.
514 IMA_WCHAR fileName[256];
517 * The time and date that the library that is executing was built.
519 IMA_DATETIME buildTime;
521 IMA_BYTE reserved[64];
522 } IMA_LIBRARY_PROPERTIES;
527 *******************************************************************************
529 * Declaration of the IMA_PLUGIN_PROPERTIES structure
531 *******************************************************************************
533 typedef struct _IMA_PLUGIN_PROPERTIES
535 IMA_UINT supportedImaVersion;
536 IMA_WCHAR vendor[256];
537 IMA_WCHAR implementationVersion[256];
538 IMA_WCHAR fileName[256];
539 IMA_DATETIME buildTime;
541 IMA_BOOL lhbasCanBeCreatedAndDestroyed;
543 IMA_BYTE reserved[64];
545 } IMA_PLUGIN_PROPERTIES;
548 typedef struct _IMA_IP_ADDRESS
550 IMA_BOOL ipv4Address;
551 IMA_BYTE ipAddress[16];
553 } IMA_IP_ADDRESS;
555 typedef struct _IMA_ADDRESS_KEY
557 IMA_IP_ADDRESS ipAddress;
558 IMA_UINT16 portNumber;
560 } IMA_ADDRESS_KEY;
562 typedef struct _IMA_ADDRESS_KEYS
564 IMA_UINT addressKeyCount;
565 IMA_ADDRESS_KEY addressKeys[1];
567 } IMA_ADDRESS_KEYS;
569 typedef struct _IMA_ADDRESS_KEY_PROPERTIES
571 IMA_UINT addressKeyCount;
572 IMA_ADDRESS_KEY addressKeys[1];
574 } IMA_ADDRESS_KEY_PROPERTIES;
576 typedef struct _IMA_IP_PROPERTIES
578 IMA_BOOL ipConfigurationMethodSettable;
579 IMA_BOOL dhcpConfigurationEnabled;
581 IMA_BOOL subnetMaskSettable;
582 IMA_BOOL subnetMaskValid;
583 IMA_IP_ADDRESS subnetMask;
585 IMA_BOOL defaultGatewaySettable;
586 IMA_BOOL defaultGatewayValid;
587 IMA_IP_ADDRESS defaultGateway;
589 IMA_BOOL primaryDnsServerAddressSettable;
590 IMA_BOOL primaryDnsServerAddressValid;
591 IMA_IP_ADDRESS primaryDnsServerAddress;
593 IMA_BOOL alternateDnsServerAddressSettable;
594 IMA_BOOL alternateDnsServerAddressValid;
595 IMA_IP_ADDRESS alternateDnsServerAddress;
597 IMA_BYTE reserved[64];
599 } IMA_IP_PROPERTIES;
601 typedef struct _IMA_HOST_ID
603 IMA_BOOL hostnameInUse;
604 union {
606 IMA_HOST_NAME hostname;
607 IMA_IP_ADDRESS ipAddress;
609 } id;
611 } IMA_HOST_ID;
613 typedef struct _IMA_TARGET_ADDRESS
615 IMA_HOST_ID hostnameIpAddress;
616 IMA_UINT16 portNumber;
618 } IMA_TARGET_ADDRESS;
621 *******************************************************************************
623 * Declaration of the IMA_NODE_NAME type
625 *******************************************************************************
627 #define IMA_NODE_NAME_LEN 224
628 typedef IMA_WCHAR IMA_NODE_NAME[IMA_NODE_NAME_LEN];
633 *******************************************************************************
635 * Declaration of the IMA_NODE_ALIAS type
637 *******************************************************************************
639 #define IMA_NODE_ALIAS_LEN 256
640 typedef IMA_WCHAR IMA_NODE_ALIAS[IMA_NODE_ALIAS_LEN];
645 *******************************************************************************
647 * Declaration of the IMA_DOMAIN_NAME type
649 * A variable of this type may be formatted in any of the following four ways:
650 * 1. An empty string, which indicates that no host or IP address is
651 * specified
652 * 2. A DNS host name
653 * 3. A dotted-decimal IPv4 address
654 * 4. A bracketed IPv6 address as specified in RFC 2732
656 * In all cases a domain name is terminated by a nul character.
657 * This type is used by several APIs: IMA_SetPhbaSnsDiscovery(),
658 * IMA_SetNetworkPortalIpAddress(), and indirectly by
659 * IMA_GetPhbaDiscoveryProperties().
661 *******************************************************************************
663 typedef wchar_t IMA_DOMAIN_NAME[256];
665 typedef struct _IMA_PHBA_DOWNLOAD_IMAGE_PROPERTIES
667 IMA_PHBA_DOWNLOAD_IMAGE_TYPE imageType;
668 IMA_WCHAR version[32];
669 IMA_WCHAR description[512];
670 IMA_XBOOL upgrade;
671 } IMA_PHBA_DOWNLOAD_IMAGE_PROPERTIES;
675 *******************************************************************************
677 * Declaration of the IMA_NODE_PROPERTIES structure
679 * This structure is returned by the IMA_GetNodeProperties() API.
681 * NOTE: It is possible for both 'runningInInitiatorMode' and
682 * 'runningInTargetMode' to be set to @c IMA_TRUE. This means that
683 * the node is operating both as an initiator and as a target.
685 *******************************************************************************
687 typedef struct _IMA_NODE_PROPERTIES
690 * A boolean indicating if the node is running as initiator or not.
692 IMA_BOOL runningInInitiatorMode;
695 * A boolean indicating if the node is running as a target or not.
697 IMA_BOOL runningInTargetMode;
700 * A boolean which indicates if the node's name is set or not.
702 IMA_BOOL nameValid;
705 * A nul terminated Unicode string which contains the name of the node.
706 * The value in this field is only valid if 'nameValid' is set to
707 * IMA_TRUE, in which case it will be Unicode NULL terminated. If
708 * 'nameValid' is set to IMA_FALSE then this field will contain an
709 * empty string.
711 IMA_NODE_NAME name;
714 * A boolean which indicates if the node's alias is set or not.
716 IMA_BOOL aliasValid;
719 * A nul terminated Unicode string which contains the alias of the node.
720 * This field is only valid if 'aliasValid' is set to IMA_TRUE, in which
721 * case it will be Unicode NULL terminated. If 'aliasValid' is set to
722 * IMA_FALSE then this field will contain an empty string.
724 IMA_NODE_ALIAS alias;
727 * Boolean indicating if both the name and alias are settable using
728 * IMA_SetNodeName() and IMA_SetNodeAlias().
730 IMA_BOOL nameAndAliasSettable;
732 IMA_BYTE reserved[64];
734 } IMA_NODE_PROPERTIES;
739 *******************************************************************************
741 * Declaration of the IMA_LHBA_PROPERTIES structure
743 * This structure is returned by the IMA_GetLhbaProperties() API.
745 *******************************************************************************
747 typedef struct _IMA_LHBA_PROPERTIES
749 IMA_WCHAR osDeviceName[256];
750 IMA_BOOL luExposingSupported;
751 IMA_BOOL isDestroyable;
753 IMA_BOOL staleDataRemovable;
754 IMA_UINT staleDataSize;
756 IMA_BOOL initiatorAuthMethodsSettable;
757 IMA_BOOL targetAuthMethodsSettable;
759 IMA_BYTE reserved[128];
760 } IMA_LHBA_PROPERTIES;
765 *******************************************************************************
767 * Declaration of the IMA_ULP_xxx constants
769 *******************************************************************************
771 #define IMA_ULP_TCP 0x01
772 #define IMA_ULP_SCTP 0x02
773 #define IMA_ULP_UDP 0x04
778 *******************************************************************************
780 * Declaration of the IMA_MIN_MAX_VALUE structure
782 * Note: If the 'currentValueValid' field is IMA_FALSE then the value of
783 * 'settable' must also be set to IMA_FALSE.
785 * Note: The fields in this structure contain values which are defined by the
786 * implementation and not by the iSCSI specification. It is possible
787 * that an implementation may be more or less restrictive in the values
788 * that it can accept than the iSCSI specification allows.
790 * Note: An example of how to use 'incrementValue': Suppose that a structure is
791 * obtained where 'currentValueValid' is IMA_TRUE, 'settable' is
792 * IMA_TRUE, 'currentValue' is 50, 'defaultValue' is 50, 'minimumValue'
793 * is 30, 'maximumValue' is 70 and 'incrementValue' is 10. In this case,
794 * the possible values that the property can be set to are 30, 40, 50,
795 * 60, and 70. The new value must be the current value plus or minus
796 * some multiple of 'incrementValue'.
798 *******************************************************************************
800 typedef struct _IMA_MIN_MAX_VALUE
803 * A boolean indicating if the @a currentValue field contains a valid value.
805 IMA_BOOL currentValueValid;
808 * Indicates if the corresponding property is settable. If this field
809 * has the value IMA_TRUE then the 'defaultValue', 'minimumValue',
810 * 'maximumValue', and 'incrementValue' fields shall contain valid
811 * values. If this field has the value IMA_FALSE then these fields
812 * have undefined values.
814 IMA_BOOL settable;
817 * If currentValueValid has the value IMA_TRUE then this field contains
818 * the current value of the associated property. If 'currentValueValid' has
819 * the value IMA_FALSE then the value of this field is undefined.
821 IMA_UINT32 currentValue;
824 * If 'settable' has the value IMA_TRUE then this field contains the
825 * implementation's default value of the associated property. If 'settable'
826 * has the value IMA_FALSE then the value of this field is undefined.
828 IMA_UINT32 defaultValue;
831 * If 'settable' has the value IMA_TRUE then this field contains the
832 * implementation's minimum value of the associated property. If 'settable'
833 * has the value IMA_FALSE then the value of this field is undefined.
835 IMA_UINT32 minimumValue;
838 * If 'settable' has the value IMA_TRUE then this field contains the
839 * implementation's maximum value of the associated property. If 'settable'
840 * has the value IMA_FALSE then the value of this field is undefined.
842 IMA_UINT32 maximumValue;
845 * If 'settable' has the value IMA_TRUE then this field contains a value
846 * which can be added to or subtracted from 'currentValue' to obtain other
847 * possible values of the associated property. If 'settable' has the value
848 * IMA_FALSE then the value of this field is undefined.
850 IMA_UINT32 incrementValue;
852 } IMA_MIN_MAX_VALUE;
854 typedef struct _IMA_BOOL_VALUE
856 IMA_BOOL currentValueValid;
857 IMA_BOOL settable;
858 IMA_BOOL currentValue;
859 IMA_BOOL defaultValue;
860 } IMA_BOOL_VALUE;
863 *******************************************************************************
865 * Declaration of the IMA_PHBA_PROPERTIES structure
867 * This structure is returned by the IMA_GetPhbaProperties() API.
869 * Note: Both 'isInitiator' and 'isTarget' cannot be set to IMA_FALSE as this
870 * would mean that the PHBA was not functioning as either an initiator or
871 * target, which means that its not functioning at all.
873 *******************************************************************************
875 typedef struct _IMA_PHBA_PROPERTIES
878 * A nul terminated ASCII string which contains the name of the vendor
879 * of a PHBA. If the first character in this field is nul then the
880 * vendor is unknown.
882 IMA_WCHAR vendor[64];
885 * A nul terminated ASCII string which contains the name of the model of
886 * a PHBA. If the first character in this field is nul then the model is
887 * unknown.
889 IMA_WCHAR model[256];
892 * A nul terminated ASCII string which contains a description of a PHBA.
893 * This is a user friendly description of the PHBA. If the first character
894 * in this field is nul then there is no description.
896 IMA_WCHAR description[256];
899 * A nul terminated ASCII string which contains the serial number of a
900 * PHBA. If the first character in this field is nul then the serial
901 * number is unknown.
903 IMA_WCHAR serialNumber[64];
906 * A nul terminated ASCII string which contains the hardware version of
907 * a PHBA. If the first character in this field is nul then the hardware
908 * version is unknown.
910 IMA_WCHAR hardwareVersion[256];
913 * A nul terminated ASCII string which contains the ASIC version of a
914 * PHBA. If the first character in this field is nul then the ASIC
915 * version is unknown or is not applicable.
917 IMA_WCHAR asicVersion[256];
920 * A nul terminated ASCII string which contains the firmware version of
921 * a PHBA. If the first character in this field is nul then the firmware
922 * version is unknown or is not applicable.
924 IMA_WCHAR firmwareVersion[256];
927 * A nul terminated ASCII string which contains the option ROM version
928 * of a PHBA. If the first character in this field is nul then the option
929 * ROM version is unknown or is not applicable.
931 IMA_WCHAR optionRomVersion[256];
934 * A nul terminated ASCII string which contains the name of the driver
935 * controlling a PHBA. If the first character in this field is nul then
936 * the name of the driver is unknown.
938 IMA_WCHAR driverName[256];
941 * A nul terminated ASCII string which contains the version of the driver
942 * specified in 'driverName'. If the first character in this field is nul
943 * then the version of the driver is unknown.
945 * This field can have a known value only if @a driverName has a known
946 * value as well.
948 IMA_WCHAR driverVersion[256];
951 * A field containing flags which indicate what upper level protocols
952 * are supported by a PHBA. Examples of upper level protocols include:
954 * - TCP, represented by IMA_ULP_TCP
955 * - SCTP, represented by IMA_ULP_SCTP
956 * - UDP, represented by IMA_ULP_UDP
958 IMA_UINT supportedUlps;
961 * A extended boolean which indicates if a PHBA supports executing SCSI
962 * commands which cause bidirectional transfers.
964 * Note: The value of this field applies to the entire stack:
965 * the hardware, ASIC, firmware, driver, etc. All must support SCSI
966 * commands which cause bidirectional transfers for this field to be
967 * set to IMA_TRUE.
969 IMA_XBOOL bidirectionalTransfersSupported;
972 * The maximum length, in bytes, of a CDB that can be transferred by
973 * this PHBA. If this field has a value of zero that indicates that
974 * this value is unknown.
976 * Note: The value of this field applies to the entire stack:
977 * the hardware, ASIC, firmware, driver, etc. All must support the
978 * maximum CDB length returned in this field.
980 IMA_UINT maximumCdbLength;
983 * An extended boolean which indicates if a PHBA can also function as
984 * a standard NIC concurrently with functioning as an iSCSI PHBA.
986 IMA_XBOOL canBeNic;
989 * A extended boolean which indicates if a PHBA is functioning as a
990 * standard NIC concurrently with functioning as an iSCSI PHBA.
992 IMA_XBOOL isNic;
995 * An extended boolean indicating if the PHBA is functioning as an
996 * initiator.
998 IMA_XBOOL isInitiator;
1001 * An extended boolean indicating if the PHBA is functioning as a target.
1003 IMA_XBOOL isTarget;
1006 * An extended boolean indicating if the PHBA is using a TCP offload engine.
1008 * Note: This value should only be set to @c IMA_TRUE if a TCP offload
1009 * engine is present and is being used. If it can be determined that a
1010 * TCP offload engine is present, but it cannot be determined if that
1011 * offload engine is being used then this value should be set to
1012 * IMA_UNKNOWN.
1014 IMA_XBOOL usingTcpOffloadEngine;
1017 * An extended boolean indicating if the PHBA is using a iSCSI offload
1018 * engine.
1020 * Note: This value should only be set to @c IMA_TRUE if a iSCSI offload
1021 * engine is present and is being used. If it can be determined that an
1022 * iSCSI offload engine is present, but it cannot be determined if that
1023 * offload engine is being used then this value should be set to
1024 * IMA_UNKNOWN.
1026 IMA_XBOOL usingIscsiOffloadEngine;
1028 IMA_BYTE reserved[128];
1030 } IMA_PHBA_PROPERTIES;
1033 *******************************************************************************
1035 * Declaration of the IMA_DISCOVERY_PROPERTIES structure
1037 *******************************************************************************
1039 typedef struct _IMA_DISCOVERY_PROPERTIES
1041 IMA_BOOL iSnsDiscoverySettable;
1042 IMA_XBOOL iSnsDiscoveryEnabled;
1043 IMA_ISNS_DISCOVERY_METHOD iSnsDiscoveryMethod;
1044 IMA_HOST_ID iSnsHost;
1046 IMA_BOOL slpDiscoverySettable;
1047 IMA_XBOOL slpDiscoveryEnabled;
1049 IMA_BOOL staticDiscoverySettable;
1050 IMA_XBOOL staticDiscoveryEnabled;
1052 IMA_BOOL sendTargetsDiscoverySettable;
1053 IMA_XBOOL sendTargetsDiscoveryEnabled;
1055 IMA_BYTE reserved[128];
1056 } IMA_DISCOVERY_PROPERTIES;
1059 typedef struct _IMA_PHBA_DOWNLOAD_PROPERTIES
1061 IMA_BOOL isPhbaDownloadFileSupported;
1062 IMA_BOOL optionRomDownloadSupported;
1063 IMA_BOOL firmwareDownloadSupported;
1065 IMA_BYTE reserved[32];
1066 } IMA_PHBA_DOWNLOAD_PROPERTIES;
1068 typedef struct _IMA_IPSEC_PROPERTIES
1070 IMA_BOOL ipsecSupported;
1071 IMA_BOOL implementedInHardware;
1072 IMA_BOOL implementedInSoftware;
1074 IMA_BYTE reserved[32];
1076 } IMA_IPSEC_PROPERTIES;
1078 typedef struct _IMA_LNP_PROPERTIES
1080 IMA_MAC_ADDRESS macAddress;
1081 IMA_BOOL macAddressSettable;
1082 IMA_BYTE reserved[32];
1084 } IMA_LNP_PROPERTIES;
1086 typedef struct _IMA_PNP_PROPERTIES
1088 IMA_OID associatedPhbaOid;
1090 IMA_MAC_ADDRESS macAddress;
1091 IMA_BOOL macAddressSettable;
1093 IMA_UINT maximumTransferRate;
1094 IMA_UINT currentTransferRate;
1096 IMA_UINT maximumFrameSize;
1098 IMA_BYTE reserved[64];
1099 } IMA_PNP_PROPERTIES;
1101 typedef struct _IMA_PNP_STATISTICS
1103 IMA_UINT64 bytesSent;
1104 IMA_UINT32 pdusSent;
1105 IMA_UINT64 bytesReceived;
1106 IMA_UINT32 pdusReceived;
1108 } IMA_PNP_STATISTICS;
1110 typedef struct _IMA_TARGET_PROPERTIES
1112 IMA_OID associatedNodeOid;
1113 IMA_OID associatedLhbaOid;
1115 IMA_NODE_NAME name;
1116 IMA_NODE_ALIAS alias;
1117 IMA_UINT32 discoveryMethodFlags;
1119 IMA_BOOL sendTargetsDiscoverySettable;
1120 IMA_BOOL sendTargetsDiscoveryEnabled;
1122 IMA_BYTE reserved[128];
1124 } IMA_TARGET_PROPERTIES;
1126 typedef struct _IMA_CONNECTION_PROPERTIES
1128 IMA_OID associatedSessionOid;
1129 IMA_UINT16 connectionId;
1130 IMA_DIGEST_TYPE dataDigest;
1131 IMA_DIGEST_TYPE headerDigest;
1132 IMA_BOOL ifMarker;
1133 IMA_UINT32 ifMarkInt;
1134 IMA_UINT32 maxRecvDataSegmentLength;
1135 IMA_UINT32 maxTransmitDataSegmentLength;
1136 IMA_BOOL ofMarker;
1137 IMA_UINT32 ofMarkInt;
1138 } IMA_CONNECTION_PROPERTIES;
1141 typedef struct _IMA_SESSION_PROPERTIES
1143 IMA_OID associatedLhbaOid;
1144 IMA_AUTHMETHOD authMethod;
1145 IMA_BOOL dataPduInOrder;
1146 IMA_BOOL dataSequenceInOrder;
1147 IMA_UINT16 defaultTime2Retain;
1148 IMA_UINT16 defaultTime2Wait;
1149 IMA_UINT16 errorRecoveryLevel;
1150 IMA_UINT32 firstBurstLength;
1151 IMA_BOOL immediateData;
1152 IMA_BOOL initialR2T;
1153 IMA_BYTE isid[6];
1154 IMA_UINT32 maxBurstLength;
1155 IMA_UINT16 maxConnections;
1156 IMA_UINT16 maxOutstandingR2T;
1157 IMA_UINT16 targetPortalGroupTag;
1158 IMA_UINT16 tsih;
1159 } IMA_SESSION_PROPERTIES;
1162 typedef struct _IMA_TARGET_ERROR_STATISTICS
1164 IMA_BOOL loginFailedCountValid;
1165 IMA_UINT32 loginFailedCount;
1167 IMA_BOOL sessionFailedCountValid;
1168 IMA_UINT32 sessionFailedCount;
1170 IMA_BOOL headerOrDigestSessionFailedCountValid;
1171 IMA_UINT32 headerOrDigestSessionFailedCount;
1173 IMA_BOOL timeLimitExceededSessionFailedCountValid;
1174 IMA_UINT32 timeLimitExceededSessionFailedCount;
1176 IMA_BOOL formatErrorSessionFailedCountValid;
1177 IMA_UINT32 formatErrorSessionFailedCount;
1179 IMA_BOOL closedConnectionDueToTimeoutCountValid;
1180 IMA_UINT32 closedConnectionDueToTimeoutCount;
1182 IMA_BOOL lastLoginFailureTimeValid;
1183 IMA_DATETIME lastLoginFailureTime;
1185 IMA_BYTE reserved[64];
1187 } IMA_TARGET_ERROR_STATISTICS;
1189 typedef struct _IMA_LU_PROPERTIES
1191 IMA_OID associatedTargetOid;
1192 IMA_UINT64 targetLun;
1194 IMA_BOOL exposedToOs;
1195 IMA_DATETIME timeExposedToOs;
1197 IMA_BOOL osDeviceNameValid;
1198 IMA_WCHAR osDeviceName[64];
1200 IMA_BOOL osParallelIdsValid;
1201 IMA_UINT32 osBusNumber;
1202 IMA_UINT32 osTargetId;
1203 IMA_UINT32 osLun;
1205 IMA_BYTE reserved[128];
1207 } IMA_LU_PROPERTIES;
1209 typedef struct _IMA_STATISTICS_PROPERTIES
1211 IMA_BOOL statisticsCollectionSettable;
1212 IMA_BOOL statisticsCollectionEnabled;
1214 } IMA_STATISTICS_PROPERTIES;
1216 typedef struct _IMA_DEVICE_STATISTICS
1218 IMA_UINT64 scsiPayloadBytesSent;
1219 IMA_UINT64 scsiPayloadBytesReceived;
1221 IMA_UINT64 iScsiPduBytesSent;
1222 IMA_UINT64 iScsiPduBytesReceived;
1224 IMA_UINT64 iScsiPdusSent;
1225 IMA_UINT64 iScsiPdusReceived;
1227 IMA_UINT64 millisecondsSpentSending;
1228 IMA_UINT64 millisecondsSpentReceiving;
1230 } IMA_DEVICE_STATISTICS;
1232 typedef struct _IMA_NETWORK_PORTAL_PROPERTIES
1234 IMA_IP_ADDRESS ipAddress;
1235 IMA_OID associatedLnp;
1237 IMA_BYTE reserved[32];
1238 } IMA_NETWORK_PORTAL_PROPERTIES;
1240 typedef void (* IMA_OBJECT_VISIBILITY_FN)(
1241 IMA_BOOL becomingVisible,
1242 IMA_OID oid
1245 typedef void (* IMA_OBJECT_PROPERTY_FN)(
1246 IMA_OID oid
1249 typedef struct _IMA_CHAP_INITIATOR_AUTHPARMS
1252 IMA_UINT retries;
1254 IMA_BYTE name[512];
1255 IMA_UINT nameLength;
1257 IMA_UINT minValueLength;
1258 IMA_UINT maxValueLength;
1260 IMA_BYTE challengeSecret[256];
1261 IMA_UINT challengeSecretLength;
1263 IMA_BYTE reserved[512];
1265 } IMA_CHAP_INITIATOR_AUTHPARMS;
1267 typedef struct _IMA_SRP_INITIATOR_AUTHPARMS
1270 IMA_BYTE userName[512];
1271 IMA_UINT userNameLength;
1273 IMA_BYTE reserved[512];
1275 } IMA_SRP_INITIATOR_AUTHPARMS;
1277 typedef struct _IMA_KRB5_INITIATOR_AUTHPARMS
1280 IMA_BYTE clientKey[1024];
1281 IMA_UINT clientKeyLength;
1283 IMA_BYTE reserved[2048];
1285 } IMA_KRB5_INITIATOR_AUTHPARMS;
1287 typedef struct _IMA_SPKM_INITIATOR_AUTHPARMS
1290 IMA_BYTE privateKey[4096];
1291 IMA_UINT privateKeyLength;
1293 IMA_BYTE publicKey[4096];
1294 IMA_UINT publicKeyLength;
1296 IMA_BYTE reserved[4096];
1298 } IMA_SPKM_INITIATOR_AUTHPARMS;
1300 typedef union _IMA_INITIATOR_AUTHPARMS
1303 IMA_CHAP_INITIATOR_AUTHPARMS chapParms;
1304 IMA_SRP_INITIATOR_AUTHPARMS srpParms;
1305 IMA_KRB5_INITIATOR_AUTHPARMS kerberosParms;
1306 IMA_SPKM_INITIATOR_AUTHPARMS spkmParms;
1308 } IMA_INITIATOR_AUTHPARMS;
1311 typedef struct _IMA_STATIC_DISCOVERY_TARGET
1313 IMA_NODE_NAME targetName;
1314 IMA_TARGET_ADDRESS targetAddress;
1316 } IMA_STATIC_DISCOVERY_TARGET;
1318 typedef struct _IMA_DISCOVERY_ADDRESS_PROPERTIES
1320 IMA_OID associatedNodeOid;
1321 IMA_OID associatedLhbaOid;
1322 IMA_TARGET_ADDRESS discoveryAddress;
1324 } IMA_DISCOVERY_ADDRESS_PROPERTIES;
1326 typedef struct _IMA_STATIC_TGT_PROPERTIES
1328 IMA_OID associatedNodeOid;
1329 IMA_OID associatedLhbaOid;
1330 IMA_STATIC_DISCOVERY_TARGET staticTarget;
1332 } IMA_STATIC_DISCOVERY_TARGET_PROPERTIES;
1334 typedef struct ima_plugin_info {
1335 char PluginName[64];
1336 char PluginPath[256];
1337 #ifdef WIN32
1338 HINSTANCE hPlugin; /* Handle to a loaded DLL */
1339 #else
1340 void* hPlugin; /* Handle to a loaded DLL */
1341 #endif
1342 IMA_UINT32 ownerId;
1343 #ifdef WIN32
1344 HANDLE pluginMutex;
1345 #else
1346 int pluginMutex;
1347 #endif
1348 IMA_UINT number_of_vbcallbacks;
1349 IMA_OBJECT_VISIBILITY_FN vbcallback[IMA_MAX_CALLBACK_PER_PLUGIN];
1350 IMA_UINT number_of_pccallbacks;
1351 IMA_OBJECT_PROPERTY_FN pccallback[IMA_MAX_CALLBACK_PER_PLUGIN];
1352 } IMA_PLUGIN_INFO, *PIMA_PLUGIN_INFO;
1356 *******************************************************************************
1358 * The individual APIs of the IMA are declared below.
1360 *******************************************************************************
1364 *******************************************************************************
1366 * Gets the properties of the IMA library that is being used.
1368 * @param pProps
1369 * A pointer to an IMA_LIBRARY_PROPERTIES structure allocated by
1370 * the caller. On successful return this structure will contain the
1371 * properties of the IMA library.
1373 * @return An IMA_STATUS indicating if the operation was successful or if
1374 * an error occurred.
1376 * @retval IMA_SUCCESS
1377 * Returned if the library properties were successfully returned.
1379 * @retval IMA_ERROR_INVALID_PARAMETER
1380 * Returned if 'pProps' is NULL or specifies a memory area to which
1381 * data cannot be written.
1383 *******************************************************************************
1385 IMA_API IMA_STATUS IMA_GetLibraryProperties(
1386 IMA_LIBRARY_PROPERTIES *pProps
1392 *******************************************************************************
1394 * Gets a list of the object IDs of all currently loaded plugins.
1396 * @param ppList
1397 * A pointer to a pointer to an IMA_OID_LIST. On successful
1398 * return this will contain a pointer to an @ref IMA_OID_LIST
1399 * which contains the object IDs of all of the plugins currently
1400 * loaded by the library.
1402 * @return An IMA_STATUS indicating if the operation was successful or
1403 * if an error occurred.
1405 * @retval IMA_SUCCESS
1406 * Returned if the plugin ID list was successfully returned.
1408 * @retval IMA_ERROR_INVALID_PARAMETER
1409 * Returned if 'ppList' is NULL or specifies a memory area to
1410 * which data cannot be written.
1412 *******************************************************************************
1414 IMA_API IMA_STATUS IMA_GetPluginOidList(
1415 IMA_OID_LIST **ppList
1421 *******************************************************************************
1423 * Gets the properties of the specified vendor plugin.
1425 * @param pluginOid
1426 * The ID of the plugin whose properties are being retrieved.
1428 * @param pProps
1429 * A pointer to an @ref IMA_PLUGIN_PROPERTIES structure allocated by
1430 * the caller. On successful return this will contain the properties
1431 * of the plugin specified by pluginOid.
1433 * @return An IMA_STATUS indicating if the operation was successful or if an
1434 * error occurred.
1436 * @retval IMA_SUCCESS
1437 * Returned if the plugin properties were successfully returned.
1439 * @retval IMA_ERROR_INVALID_OBJECT_TYPE
1440 * Returned if 'pluginOid' does not specify any valid object type.
1442 * @retval IMA_ERROR_INCORRECT_OBJECT_TYPE
1443 * Returned if 'pluginOid' does not specify a plugin object.
1445 * @retval IMA_ERROR_OBJECT_NOT_FOUND
1446 * Returned if 'pluginOid' refers to a plugin, but not one that
1447 * is currently loaded.
1448 * @retval IMA_ERROR_INVALID_PARAMETER
1449 * Returned if 'pProps' is NULL or specifies a memory area to
1450 * which data cannot be written.
1452 *******************************************************************************
1454 IMA_API IMA_STATUS IMA_GetPluginProperties(
1455 IMA_OID pluginOid,
1456 IMA_PLUGIN_PROPERTIES *pProps
1462 *******************************************************************************
1464 * Gets the object ID for the plugin associated with the specified object ID.
1466 * @param oid
1467 * The object ID of an object that has been received from a previous
1468 * library call.
1470 * @param pPluginOid
1471 * A pointer to an IMA_OID structure allocated by the caller. On
1472 * successful return this will contain the object ID of the plugin
1473 * associated with the object specified by @a objectId. This
1474 * can then be used to work with the plugin, e.g., to get the
1475 * properties of the plugin or the send the plugin an IOCtl.
1477 * @return An IMA_STATUS indicating if the operation was successful or if
1478 * an error occurred.
1480 * @retval IMA_SUCCESS
1481 * Returned if the associated plugin ID was successfully returned.
1483 * @retval IMA_ERROR_INVALID_PARAMETER
1484 * Returned if 'pPluginOid' is NULL or specifies a memory area to
1485 * which data cannot be written.
1487 * @retval IMA_ERROR_INVALID_PARAMETER
1488 * Returned if 'oid' specifies an object not owned by a plugin, but
1489 * instead one that is owned by the library.
1491 * @retval IMA_ERROR_INVALID_OBJECT_TYPE
1492 * Returned if 'oid' specifies an object with an invalid type.
1494 *******************************************************************************
1496 IMA_API IMA_STATUS IMA_GetAssociatedPluginOid(
1497 IMA_OID oid,
1498 IMA_OID *pPluginOid
1504 *******************************************************************************
1506 * Gets the object ID of the shared node.
1508 * @param pSharedNodeOid
1509 * A pointer to an IMA_OID structure allocated by the caller. On
1510 * successful return it will contain the object ID of the
1511 * shared node of the currently executing system is placed.
1513 * @return An IMA_STATUS indicating if the operation was successful or
1514 * if an error occurred.
1516 * @retval IMA_SUCCESS
1517 * Returned if the shared node ID has been successfully retrieved.
1519 * @retval IMA_ERROR_INVALID_PARAMETER
1520 * Returned if 'pSharedNodeOid' is NULL or specifies a memory area
1521 * to which data cannot be written.
1523 *******************************************************************************
1525 IMA_API IMA_STATUS IMA_GetSharedNodeOid(
1526 IMA_OID *pSharedNodeOid
1529 IMA_API IMA_STATUS IMA_GetObjectType(
1530 IMA_OID oid,
1531 IMA_OBJECT_TYPE *pObjectType
1536 *******************************************************************************
1538 * Gets the properties of the specified iSCSI node.
1540 * @param nodeOid
1541 * The ID of the node to get the properties of.
1543 * @param pProps
1544 * A pointer to an @ref IMA_NODE_PROPERTIES structure which on
1545 * successful return will contain the properties of the specified node.
1547 * @return An IMA_STATUS indicating if the operation was successful or if
1548 * an error occurred.
1550 * @retval IMA_SUCCESS
1551 * Returned if the node properties have been successfully retrieved.
1553 * @retval IMA_ERROR_INVALID_PARAMETER
1554 * Returned if 'pProps' is NULL or specifies a memory area to which
1555 * data cannot be written.
1557 * @retval IMA_ERROR_INVALID_OBJECT_TYPE
1558 * Returned if 'nodeOid' does not specify any valid object type.
1560 * @retval IMA_ERROR_INCORRECT_OBJECT_TYPE
1561 * Returned if 'nodeOid' does not specify a node object.
1563 * @retval IMA_ERROR_OBJECT_NOT_FOUND
1564 * Returned if 'nodeOid' does not specify a node which is currently
1565 * known to the system.
1567 *******************************************************************************
1569 IMA_API IMA_STATUS IMA_GetNodeProperties(
1570 IMA_OID nodeOid,
1571 IMA_NODE_PROPERTIES *pProps
1577 *******************************************************************************
1579 * Sets the name of the specified node.
1581 * @param nodeOid
1582 * The object ID of the node whose name is being set.
1584 * @param newName
1585 * The new name of the node.
1587 * @return An IMA_STATUS indicating if the operation was successful or
1588 * if an error occurred.
1590 * @retval IMA_SUCCESS
1591 * Returned if the node name was successfully changed.
1593 * @retval IMA_STATUS_REBOOT_NECESSARY
1594 * Returned if a reboot is necessary before the setting of the
1595 * name actually takes affect.
1597 * @retval IMA_ERROR_INVALID_PARAMETER
1598 * Returned if 'newName' is NULL, or specifies a memory area
1599 * to which data cannot be written, or has a length of 0.
1601 * @retval IMA_ERROR_INVALID_OBJECT_TYPE
1602 * Returned if 'nodeOid' does not specify any valid object type.
1604 * @retval IMA_ERROR_INCORRECT_OBJECT_TYPE
1605 * Returned if 'nodeOid' does not specify a node object.
1607 * @retval IMA_ERROR_OBJECT_NOT_FOUND
1608 * Returned if 'nodeOid' does not specify a node which is
1609 * currently known to the system.
1611 * @retval IMA_ERROR_NAME_TOO_LONG
1612 * Returned if 'newName' contains too many characters.
1614 *******************************************************************************
1616 IMA_API IMA_STATUS IMA_SetNodeName(
1617 IMA_OID nodeOid,
1618 const IMA_NODE_NAME newName
1624 *******************************************************************************
1626 * Generates a unique node name for the currently running system.
1628 * @param generatedName
1629 * On successful return contains the generated node name.
1631 * @return An IMA_STATUS indicating if the operation was successful or if an
1632 * error occurred.
1634 * @retval IMA_ERROR_INVALID_PARAMETER
1635 * Returned if 'generatedname is NULL or
1636 * specifies a memory area to which data cannot be written.
1638 *******************************************************************************
1640 IMA_API IMA_STATUS IMA_GenerateNodeName(
1641 IMA_NODE_NAME generatedName
1647 *******************************************************************************
1649 * Sets the alias of the specified node.
1651 * @param nodeOid
1652 * The object ID of the node whose alias is being set.
1654 * @param newAlias
1655 * A pointer to a Unicode string which contains the new node alias.
1656 * If this parameter is NULL then the current alias is deleted, in which
1657 * case the specified node no longer has an alias.
1659 * @return An IMA_STATUS indicating if the operation was successful or
1660 * if an error occurred.
1662 * @retval IMA_SUCCESS
1663 * Returned if the node's alias has been successfully set.
1665 * @retval IMA_STATUS_REBOOT_NECESSARY
1666 * A reboot is necessary before the setting of the alias actually
1667 * takes effect.
1669 * @retval IMA_ERROR_INVALID_OBJECT_TYPE
1670 * Returned if 'nodeOid' does not specify any valid object type.
1672 * @retval IMA_ERROR_INCORRECT_OBJECT_TYPE
1673 * Returned if 'nodeOid' does not specify a node object.
1675 * @retval IMA_ERROR_OBJECT_NOT_FOUND
1676 * Returned if 'nodeOid' does not specify a node which is currently
1677 * known to the system.
1679 * @retval IMA_ERROR_NAME_TOO_LONG
1680 * Returned if 'newAlias' contains too many characters.
1682 *******************************************************************************
1684 IMA_API IMA_STATUS IMA_SetNodeAlias(
1685 IMA_OID nodeOid,
1686 const IMA_NODE_ALIAS newAlias
1692 *******************************************************************************
1694 * Gets a list of the object IDs of all the logical HBAs in the system.
1696 * @param ppList
1697 * A pointer to a pointer to an @ref IMA_OID_LIST structure. On
1698 * successful return this will contain a pointer to an
1699 * IMA_OID_LIST which contains the object IDs of all of the
1700 * LHBAs currently in the system.
1702 * @return An IMA_STATUS indicating if the operation was successful or if
1703 * an error occurred.
1705 * @retval IMA_SUCCESS
1706 * Returned if the LHBA ID list has been successfully returned.
1708 * @retval IMA_ERROR_INVALID_PARAMETER
1709 * Returned if 'ppList' is NULL or specifies a memory area to which
1710 * data cannot be written.
1712 *******************************************************************************
1714 IMA_API IMA_STATUS IMA_GetLhbaOidList(
1715 IMA_OID_LIST **ppList
1721 *******************************************************************************
1723 * Gets the properties of the specified logical HBA.
1725 * @param lhbaOid
1726 * The object ID of the LHBA whose properties are being retrieved.
1728 * @param pProps
1729 * A pointer to an IMA_LHBA_PROPERTIES structure. On successful
1730 * return this will contain the properties of the LHBA specified by
1731 * 'lhbaOid'.
1733 * @return An IMA_STATUS indicating if the operation was successful or if
1734 * an error occurred.
1736 * @retval IMA_SUCCESS
1737 * Returned if the properties of the specified LHBA have been
1738 * successfully retrieved.
1740 * @retval IMA_ERROR_INVALID_PARAMETER
1741 * Returned if 'pProps' is NULL or specifies a memory area to which
1742 * data cannot be written.
1744 * @retval IMA_ERROR_INVALID_OBJECT_TYPE
1745 * Returned if 'lhbaOid' does not specify any valid object type.
1747 * @retval IMA_ERROR_INCORRECT_OBJECT_TYPE
1748 * Returned if 'lhbaOid' does not specify a LHBA.
1750 * @retval IMA_ERROR_OBJECT_NOT_FOUND
1751 * Returned if 'lhbaOid' does not specify a LHBA which is currently
1752 * known to the system.
1754 *******************************************************************************
1756 IMA_API IMA_STATUS IMA_GetLhbaProperties(
1757 IMA_OID lhbaOid,
1758 IMA_LHBA_PROPERTIES *pProps
1764 *******************************************************************************
1766 * Gets a list of the object IDs of all the physical HBAs in the system.
1768 * @param ppList
1769 * A pointer to a pointer to an IMA_OID_LIST structure. On successful
1770 * return this will contain a pointer to an IMA_OID_LIST which
1771 * contains the object IDs of all of the PHBAs currently in the system.
1773 * @return An IMA_STATUS indicating if the operation was successful or if
1774 * an error occurred.
1776 * @retval IMA_SUCCESS
1777 * Returned if the PHBA OID list has been successfully returned.
1779 * @retval IMA_ERROR_INVALID_PARAMETER
1780 * Returned if 'ppList' is NULL or specifies a memory area to which
1781 * data cannot be written.
1783 *******************************************************************************
1785 IMA_API IMA_STATUS IMA_GetPhbaOidList(
1786 IMA_OID_LIST **ppList
1792 *******************************************************************************
1794 * Gets the general properties of a physical HBA.
1796 * @param phbaOid
1797 * The object ID of the PHBA whose properties are being queried.
1799 * @param pProps
1800 * A pointer to an @ref IMA_PHBA_PROPERTIES structure. On successful
1801 * return this will contain the properties of the PHBA specified by
1802 * 'phbaOid'.
1804 * @return An IMA_STATUS indicating if the operation was successful or
1805 * if an error occurred.
1807 * @retval IMA_SUCCESS
1808 * Returned if the properties of the specified PHBA have been
1809 * successfully retrieved.
1811 * @retval IMA_ERROR_INVALID_PARAMETER
1812 * Returned if 'pProps' is NULL or specifies a memory area to which
1813 * data cannot be written.
1815 * @retval IMA_ERROR_INVALID_OBJECT_TYPE
1816 * Returned if 'phbaOid' does not specify any valid object type.
1818 * @retval IMA_ERROR_INCORRECT_OBJECT_TYPE
1819 * Returned if 'phbaOid' does not specify a PHBA.
1821 * @retval IMA_ERROR_OBJECT_NOT_FOUND
1822 * Returned if 'phbaOid' does not specify a PHBA which is currently
1823 * known to the system.
1825 *******************************************************************************
1827 IMA_API IMA_STATUS IMA_GetPhbaProperties(
1828 IMA_OID phbaOid,
1829 IMA_PHBA_PROPERTIES *pProps
1833 *******************************************************************************
1835 * Frees a previously allocated IMA_OID_LIST structure.
1837 * @param pMemory A pointer to an IMA_OID_LIST structure allocated by the
1838 * library. On successful return the memory allocated by the
1839 * list is freed.
1840 * @return An IMA_STATUS indicating if the operation was successful or if an
1841 * error occurred.
1842 * @retval IMA_SUCCESS
1843 * Returned if the specified object ID list was successfully
1844 * freed.
1845 * @retval IMA_ERROR_INVALID_PARAMETER
1846 * Returned if pMemory is NULL or specifies a memory area from which
1847 * data cannot be read.
1849 *******************************************************************************
1851 IMA_API IMA_STATUS IMA_FreeMemory(
1852 void *pMemory
1857 IMA_API IMA_STATUS IMA_GetNonSharedNodeOidList(
1858 IMA_OID_LIST **ppList
1865 *******************************************************************************
1867 * Gets the first burst length properties of the specified logical HBA.
1869 * @param oid
1870 * The object ID of the logical HBA to get the first burst length
1871 * properties of.
1873 * @param pProps
1874 * A pointer to a min/max values structure.
1876 * @return An IMA_STATUS indicating if the operation was successful or if an
1877 * error occurred.
1879 * @retval IMA_SUCCESS
1880 * Returned if the first burst length properties have been
1881 * successfully retrieved.
1883 * @retval IMA_ERROR_INVALID_PARAMETER
1884 * Returned if pProps is NULL or specifies a memory area to which
1885 * data cannot be written.
1887 * @retval IMA_ERROR_INVALID_OBJECT_TYPE
1888 * Returned if 'oid' does not specify any valid object type.
1890 * @retval IMA_ERROR_INCORRECT_OBJECT_TYPE
1891 * Returned if 'oid' does not specify a LHBA.
1893 * @retval IMA_ERROR_OBJECT_NOT_FOUND
1894 * Returned if 'oid' does not specify a LHBA which is currently
1895 * known to the system.
1897 *******************************************************************************
1899 IMA_API IMA_STATUS IMA_GetFirstBurstLengthProperties(
1900 IMA_OID oid,
1901 IMA_MIN_MAX_VALUE *pProps
1906 *******************************************************************************
1908 * Gets the max burst length properties of the specified logical HBA.
1910 * @param oid
1911 * The object ID of the logical HBA to get the max burst length
1912 * properties of.
1914 * @param pProps
1915 * A pointer to an IMA_MIN_MAX_VALUE structure allocated by the
1916 * caller. On successful return this structure will contain the max
1917 * burst length properties of this LHBA.
1919 * @return An IMA_STATUS indicating if the operation was successful or if
1920 * an error occurred.
1922 * @retval IMA_SUCCESS
1923 * Returned if the max burst length properties have been successfully
1924 * retrieved.
1926 * @retval IMA_ERROR_INVALID_PARAMETER
1927 * Returned if pProps is NULL or specifies a memory area to which
1928 * data cannot be written.
1930 * @retval IMA_ERROR_INVALID_OBJECT_TYPE
1931 * Returned if 'oid' does not specify any valid object type.
1933 * @retval IMA_ERROR_INCORRECT_OBJECT_TYPE
1934 * Returned if 'oid' does not specify a LHBA.
1936 * @retval IMA_ERROR_OBJECT_NOT_FOUND
1937 * Returned if 'oid' does not specify a LHBA which is currently
1938 * known to the system.
1940 *******************************************************************************
1942 IMA_API IMA_STATUS IMA_GetMaxBurstLengthProperties(
1943 IMA_OID Oid,
1944 IMA_MIN_MAX_VALUE *pProps
1948 *******************************************************************************
1950 * Gets the maximum receive data segment length properties of the specified
1951 * logical HBA.
1953 * @param oid
1954 * The object ID of the logical HBA to get the max receive data
1955 * segment length properties of.
1957 * @param pProps
1958 * A pointer to an @ref IMA_MIN_MAX_VALUE structure allocated by the
1959 * caller. On successful return this structure will contain the max
1960 * receive data segment length properties of this LHBA.
1962 * @return An IMA_STATUS indicating if the operation was successful or if
1963 * an error occurred.
1965 * @retval IMA_SUCCESS
1966 * Returned if the max receive data segment length properties
1967 * have been successfully retrieved.
1969 * @retval IMA_ERROR_INVALID_PARAMETER
1970 * Returned if 'pProps' is NULL or specifies a memory area to which
1971 * data cannot be written.
1973 * @retval IMA_ERROR_INVALID_OBJECT_TYPE
1974 * Returned if 'oid' does not specify any valid object type.
1976 * @retval IMA_ERROR_INCORRECT_OBJECT_TYPE
1977 * Returned if 'oid' does not specify a LHBA.
1979 * @retval IMA_ERROR_OBJECT_NOT_FOUND
1980 * Returned if 'oid' does not specify a LHBA which is currently
1981 * known to the system.
1983 *******************************************************************************
1985 IMA_API IMA_STATUS IMA_GetMaxRecvDataSegmentLengthProperties(
1986 IMA_OID oid,
1987 IMA_MIN_MAX_VALUE *pProps
1991 /*---------------------------------------------*/
1992 IMA_API IMA_STATUS IMA_PluginIOCtl(
1993 IMA_OID pluginOid,
1994 IMA_UINT command,
1995 const void *pInputBuffer,
1996 IMA_UINT inputBufferLength,
1997 void *pOutputBuffer,
1998 IMA_UINT *pOutputBufferLength
2003 IMA_API IMA_STATUS IMA_GetNetworkPortalOidList(
2004 IMA_OID oid,
2005 IMA_OID_LIST **ppList
2008 IMA_API IMA_STATUS IMA_SetFirstBurstLength(
2009 IMA_OID oid,
2010 IMA_UINT firstBurstLength
2013 IMA_API IMA_STATUS IMA_SetMaxBurstLength(
2014 IMA_OID oid,
2015 IMA_UINT maxBurstLength
2018 IMA_API IMA_STATUS IMA_SetMaxRecvDataSegmentLength(
2019 IMA_OID oid,
2020 IMA_UINT maxRecvDataSegmentLength
2023 IMA_API IMA_STATUS IMA_GetMaxConnectionsProperties(
2024 IMA_OID oid,
2025 IMA_MIN_MAX_VALUE *pProps
2028 IMA_API IMA_STATUS IMA_SetMaxConnections(
2029 IMA_OID oid,
2030 IMA_UINT maxConnections
2033 IMA_API IMA_STATUS IMA_GetDefaultTime2RetainProperties(
2034 IMA_OID oid,
2035 IMA_MIN_MAX_VALUE *pProps
2038 IMA_API IMA_STATUS IMA_SetDefaultTime2Retain(
2039 IMA_OID oid,
2040 IMA_UINT defaultTime2Retain
2043 IMA_API IMA_STATUS IMA_GetDefaultTime2WaitProperties(
2044 IMA_OID oid,
2045 IMA_MIN_MAX_VALUE *pProps
2048 IMA_API IMA_STATUS IMA_SetDefaultTime2Wait(
2049 IMA_OID oid,
2050 IMA_UINT defaultTime2Wait
2053 IMA_API IMA_STATUS IMA_GetMaxOutstandingR2TProperties(
2054 IMA_OID oid,
2055 IMA_MIN_MAX_VALUE *pProps
2058 IMA_API IMA_STATUS IMA_SetMaxOutstandingR2T(
2059 IMA_OID oid,
2060 IMA_UINT maxOutstandingR2T
2063 IMA_API IMA_STATUS IMA_GetErrorRecoveryLevelProperties(
2064 IMA_OID oid,
2065 IMA_MIN_MAX_VALUE *pProps
2068 IMA_API IMA_STATUS IMA_SetErrorRecoveryLevel(
2069 IMA_OID oid,
2070 IMA_UINT errorRecoveryLevel
2073 IMA_API IMA_STATUS IMA_GetInitialR2TProperties(
2074 IMA_OID oid,
2075 IMA_BOOL_VALUE *pProps
2078 IMA_API IMA_STATUS IMA_SetInitialR2T(
2079 IMA_OID oid,
2080 IMA_BOOL initialR2T
2083 IMA_API IMA_STATUS IMA_GetImmediateDataProperties(
2084 IMA_OID oid,
2085 IMA_BOOL_VALUE *pProps
2088 IMA_API IMA_STATUS IMA_SetImmediateData(
2089 IMA_OID oid,
2090 IMA_BOOL immediateData
2093 IMA_API IMA_STATUS IMA_GetDataPduInOrderProperties(
2094 IMA_OID oid,
2095 IMA_BOOL_VALUE *pProps
2098 IMA_API IMA_STATUS IMA_SetDataPduInOrder(
2099 IMA_OID oid,
2100 IMA_BOOL dataPduInOrder
2103 IMA_API IMA_STATUS IMA_GetDataSequenceInOrderProperties(
2104 IMA_OID oid,
2105 IMA_BOOL_VALUE *pProps
2108 IMA_API IMA_STATUS IMA_SetDataSequenceInOrder(
2109 IMA_OID oid,
2110 IMA_BOOL dataSequenceInOrder
2113 IMA_API IMA_STATUS IMA_SetStatisticsCollection(
2114 IMA_OID oid,
2115 IMA_BOOL enableStatisticsCollection
2118 IMA_API IMA_STATUS IMA_GetNetworkPortStatus(
2119 IMA_OID portOid,
2120 IMA_NETWORK_PORT_STATUS *pStatus
2123 IMA_API IMA_STATUS IMA_GetTargetOidList(
2124 IMA_OID oid,
2125 IMA_OID_LIST **ppList
2128 IMA_API IMA_STATUS IMA_RemoveStaleData(
2129 IMA_OID lhbaOid
2132 IMA_API IMA_STATUS IMA_SetIsnsDiscovery(
2133 IMA_OID phbaId,
2134 IMA_BOOL enableIsnsDiscovery,
2135 IMA_ISNS_DISCOVERY_METHOD discoveryMethod,
2136 const IMA_HOST_ID *iSnsHost
2139 IMA_API IMA_STATUS IMA_SetSlpDiscovery(
2140 IMA_OID phbaOid,
2141 IMA_BOOL enableSlpDiscovery
2144 IMA_API IMA_STATUS IMA_SetStaticDiscovery(
2145 IMA_OID phbaOid,
2146 IMA_BOOL enableStaticDiscovery
2149 IMA_API IMA_STATUS IMA_SetSendTargetsDiscovery(
2150 IMA_OID oid,
2151 IMA_BOOL enableSendTargetsDiscovery
2154 IMA_API IMA_STATUS IMA_RemoveStaticDiscoveryTarget(
2155 IMA_OID targetOid
2158 IMA_API IMA_STATUS IMA_GetIpsecProperties(
2159 IMA_OID phbaOid,
2160 IMA_IPSEC_PROPERTIES *pProps
2163 IMA_API IMA_STATUS IMA_GetPnpOidList(
2164 IMA_OID oid,
2165 IMA_OID_LIST **ppList
2168 IMA_API IMA_STATUS IMA_GetPhbaDownloadProperties(
2169 IMA_OID phbaOid,
2170 IMA_PHBA_DOWNLOAD_PROPERTIES *pProps
2173 IMA_API IMA_STATUS IMA_IsPhbaDownloadFile(
2174 IMA_OID phbaOid,
2175 const IMA_WCHAR *pFileName,
2176 IMA_PHBA_DOWNLOAD_IMAGE_PROPERTIES *pProps
2179 IMA_API IMA_STATUS IMA_PhbaDownload(
2180 IMA_OID phbaOid,
2181 IMA_PHBA_DOWNLOAD_IMAGE_TYPE imageType,
2182 const IMA_WCHAR *pFileName
2185 IMA_API IMA_STATUS IMA_GetNetworkPortalProperties(
2186 IMA_OID networkPortalOid,
2187 IMA_NETWORK_PORTAL_PROPERTIES *pProps
2190 IMA_API IMA_STATUS IMA_SetNetworkPortalIpAddress(
2191 IMA_OID networkPortalOid,
2192 const IMA_IP_ADDRESS NewIpAddress
2195 IMA_API IMA_STATUS IMA_GetLnpOidList(
2196 IMA_OID_LIST **ppList
2199 IMA_API IMA_STATUS IMA_GetLnpProperties(
2200 IMA_OID lnpOid,
2201 IMA_LNP_PROPERTIES *pProps
2204 IMA_API IMA_STATUS IMA_GetPnpProperties(
2205 IMA_OID pnpOid,
2206 IMA_PNP_PROPERTIES *pProps
2209 IMA_API IMA_STATUS IMA_GetPnpStatistics(
2210 IMA_OID pnpOid,
2211 IMA_PNP_STATISTICS *pStats
2214 IMA_API IMA_STATUS IMA_GetTargetProperties(
2215 IMA_OID targetOid,
2216 IMA_TARGET_PROPERTIES *pProps
2219 IMA_API IMA_STATUS IMA_GetTargetErrorStatistics(
2220 IMA_OID targetOid,
2221 IMA_TARGET_ERROR_STATISTICS *pStats
2224 IMA_API IMA_STATUS IMA_GetLuOidList(
2225 IMA_OID oid,
2226 IMA_OID_LIST **ppList
2229 IMA_API IMA_STATUS IMA_GetLuOid(
2230 IMA_OID targetOid,
2231 IMA_UINT64 lun,
2232 IMA_OID *pluOid
2235 IMA_API IMA_STATUS IMA_GetLuProperties(
2236 IMA_OID luOid,
2237 IMA_LU_PROPERTIES *pProps
2240 IMA_API IMA_STATUS IMA_GetStatisticsProperties(
2241 IMA_OID oid,
2242 IMA_STATISTICS_PROPERTIES *pProps
2245 IMA_API IMA_STATUS IMA_GetDeviceStatistics(
2246 IMA_OID oid,
2247 IMA_DEVICE_STATISTICS *pStats
2250 IMA_API IMA_STATUS IMA_LuInquiry(
2251 IMA_OID deviceOid,
2252 IMA_BOOL evpd,
2253 IMA_BOOL cmddt,
2254 IMA_BYTE pageCode,
2256 IMA_BYTE *pOutputBuffer,
2257 IMA_UINT *pOutputBufferLength,
2259 IMA_BYTE *pSenseBuffer,
2260 IMA_UINT *pSenseBufferLength
2263 IMA_API IMA_STATUS IMA_LuReadCapacity(
2264 IMA_OID deviceOid,
2265 IMA_UINT cdbLength,
2266 IMA_BYTE *pOutputBuffer,
2267 IMA_UINT *pOutputBufferLength,
2269 IMA_BYTE *pSenseBuffer,
2270 IMA_UINT *pSenseBufferLength
2273 IMA_API IMA_STATUS IMA_LuReportLuns(
2274 IMA_OID deviceOid,
2275 IMA_BOOL sendToWellKnownLun,
2276 IMA_BYTE selectReport,
2278 IMA_BYTE *pOutputBuffer,
2279 IMA_UINT *pOutputBufferLength,
2281 IMA_BYTE *pSenseBuffer,
2282 IMA_UINT *pSenseBufferLength
2285 IMA_API IMA_STATUS IMA_ExposeLu(
2286 IMA_OID luOid
2289 IMA_API IMA_STATUS IMA_UnexposeLu(
2290 IMA_OID luOid
2293 IMA_API IMA_STATUS IMA_GetPhbaStatus(
2294 IMA_OID hbaOid,
2295 IMA_PHBA_STATUS *pStatus
2298 IMA_API IMA_STATUS IMA_RegisterForObjectVisibilityChanges (
2299 IMA_OBJECT_VISIBILITY_FN pClientFn
2302 IMA_API IMA_STATUS IMA_DeregisterForObjectVisibilityChanges (
2303 IMA_OBJECT_VISIBILITY_FN pClientFn
2306 IMA_API IMA_STATUS IMA_RegisterForObjectPropertyChanges (
2307 IMA_OBJECT_PROPERTY_FN pClientFn
2310 IMA_API IMA_STATUS IMA_DeregisterForObjectPropertyChanges (
2311 IMA_OBJECT_PROPERTY_FN pClientFn
2315 IMA_API IMA_STATUS IMA_GetAddressKeyProperties(
2316 IMA_OID targetOid,
2317 IMA_ADDRESS_KEY_PROPERTIES **ppProps
2320 IMA_API IMA_STATUS IMA_GetIpProperties(
2321 IMA_OID oid,
2322 IMA_IP_PROPERTIES *pProps
2325 IMA_API IMA_STATUS IMA_SetIpConfigMethod(
2326 IMA_OID oid,
2327 IMA_BOOL enableDhcpIpConfiguration
2330 IMA_API IMA_STATUS IMA_SetIsnsDiscovery(
2331 IMA_OID oid,
2332 IMA_BOOL enableIsnsDiscovery,
2333 IMA_ISNS_DISCOVERY_METHOD discoveryMethod,
2334 const IMA_HOST_ID *iSnsHost
2338 IMA_API IMA_STATUS IMA_SetSubnetMask(
2339 IMA_OID oid,
2340 IMA_IP_ADDRESS subnetMask
2343 IMA_API IMA_STATUS IMA_SetDnsServerAddress(
2344 IMA_OID oid,
2345 const IMA_IP_ADDRESS *pPrimaryDnsServerAddress,
2346 const IMA_IP_ADDRESS *pAlternateDnsServerAddress
2349 IMA_API IMA_STATUS IMA_SetDefaultGateway(
2350 IMA_OID oid,
2351 IMA_IP_ADDRESS defaultGateway
2354 IMA_API IMA_STATUS IMA_GetSupportedAuthMethods(
2355 IMA_OID lhbaOid,
2356 IMA_BOOL getSettableMethods,
2357 IMA_UINT *pMethodCount,
2358 IMA_AUTHMETHOD *pMethodList
2361 IMA_API IMA_STATUS IMA_GetInUseInitiatorAuthMethods(
2362 IMA_OID lhbaOid,
2363 IMA_UINT *pMethodCount,
2364 IMA_AUTHMETHOD *pMethodList
2367 IMA_API IMA_STATUS IMA_GetInitiatorAuthParms(
2368 IMA_OID lhbaOid,
2369 IMA_AUTHMETHOD method,
2370 IMA_INITIATOR_AUTHPARMS *pParms
2373 IMA_API IMA_STATUS IMA_SetInitiatorAuthMethods(
2374 IMA_OID lhbaOid,
2375 IMA_UINT methodCount,
2376 const IMA_AUTHMETHOD *pMethodList
2379 IMA_API IMA_STATUS IMA_SetInitiatorAuthParms(
2380 IMA_OID lhbaOid,
2381 IMA_AUTHMETHOD method,
2382 const IMA_INITIATOR_AUTHPARMS *pParms
2386 IMA_API IMA_STATUS IMA_GetStaticDiscoveryTargetOidList (
2387 IMA_OID oid,
2388 IMA_OID_LIST **ppList
2391 IMA_API IMA_STATUS IMA_GetStaticDiscoveryTargetProperties(
2392 IMA_OID staticDiscoveryTargetOid,
2393 IMA_STATIC_DISCOVERY_TARGET_PROPERTIES *pProps
2396 IMA_API IMA_STATUS IMA_SetStaticDiscovery(
2397 IMA_OID oid,
2398 IMA_BOOL enableStaticDiscovery
2401 IMA_API IMA_STATUS IMA_GetDiscoveryProperties(
2402 IMA_OID oid,
2403 IMA_DISCOVERY_PROPERTIES *pProps
2406 IMA_API IMA_STATUS IMA_AddDiscoveryAddress(
2407 IMA_OID oid,
2408 const IMA_TARGET_ADDRESS discoveryAddress,
2409 IMA_OID *pDiscoveryAddressOid
2412 IMA_API IMA_STATUS IMA_AddStaticDiscoveryTarget(
2413 IMA_OID oid,
2414 const IMA_STATIC_DISCOVERY_TARGET staticDiscoveryTarget,
2415 IMA_OID *pStaticDiscoveryTargetOid
2418 IMA_API IMA_STATUS IMA_GetAddressKeys(
2419 IMA_OID targetOid,
2420 IMA_ADDRESS_KEYS **ppKeys
2423 IMA_API IMA_STATUS IMA_GetSessionOidList (
2424 IMA_OID oid,
2425 IMA_OID_LIST **ppList
2428 IMA_API IMA_STATUS IMA_GetConnectionOidList (
2429 IMA_OID oid,
2430 IMA_OID_LIST **ppList
2433 IMA_API IMA_STATUS IMA_GetDiscoveryAddressOidList (
2434 IMA_OID oid,
2435 IMA_OID_LIST **ppList
2438 IMA_API IMA_STATUS IMA_GetDiscoveryAddressProperties (
2439 IMA_OID discoveryAddressOid,
2440 IMA_DISCOVERY_ADDRESS_PROPERTIES *pProps
2443 IMA_API IMA_STATUS IMA_RemoveDiscoveryAddress (
2444 IMA_OID oid
2447 IMA_API IMA_STATUS QIMA_SetUpdateInterval(IMA_OID pluginOid, time_t interval);
2449 IMA_API IMA_STATUS IMA_CommitHbaParameters (IMA_OID lhba, IMA_COMMIT_LEVEL commitLevel);
2451 #endif
2453 #ifdef __cplusplus
2455 #endif