ima.h revision aff4bce51ecc47df7e5a6351b7cee6bc20408c63
/*
* 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 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/******************************************************************************
*
* Description
* Ima.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 and IMA general header file
*
* The Initial Developer of the Original Code is:
* Benjamin F. Kuo, Troika Networks, Inc. (benk@troikanetworks.com)
* David Dillard VERITAS Software david.dillard@veritas.com
*
* Contributor(s):
* Jeff Ding, Adaptec, Inc. (jding@corp.adaptec.com)
* Dave Wysochanski, Network Appliance, Inc. (davidw@netapp.com)
*
******************************************************************************
*
* Changes:
* 09/24/2003 Initial Draft
* (for other changes... see the CVS logs)
* 12/15/2003 corrected the defined parameter in IMA_SetPhbaIsnsDiscovery().
* lower case the computer name as iscsi name in
* IMA_GenerateNodeName().
* 03/01/2004 Brought up to date with respect to IMA v1.0.1; made formatting
* changes - lines to 80 cols - for readability.
*
* 01/21/2005 Updated to support IMA 1.1.3.
*****************************************************************************/
#ifdef __cplusplus
extern "C" {
#endif
#ifndef IMA_H
#define IMA_H
#include <time.h>
#include <wchar.h>
/* Library version string */
#define HBA_LIBVERSION 2
#define IMA_MAX_CALLBACK_PER_PLUGIN 64
#define IMA_MAX_NUM_PLUGINS 32
/* DLL imports for WIN32 operation */
#ifdef WIN32
#ifdef IMA_EXPORTS
#else
#endif
#else
#define IMA_API
#endif
/* OS specific definitions */
#ifdef WIN32
typedef unsigned char IMA_UINT8; // Unsigned 8 bits
typedef char IMA_INT8; // Signed 8 bits
typedef unsigned short IMA_UINT16; // Unsigned 16 bits
typedef short IMA_INT16; // Signed 16 bits
typedef unsigned int IMA_UINT32; // Unsigned 32 bits
typedef int IMA_INT32; // Signed 32 bits
typedef void* IMA_PVOID; // Pointer to void
/* Don't confuse, _WIN32 with WIN32... OK, how do you accompish that */
#ifdef _WIN32
typedef unsigned __int64 IMA_UINT64;
#else
typedef struct {
} IMA_INT64;
typedef struct {
} IMA_UINT64;
#endif /* #ifdef _WIN32 */
#else
/* Note this section needs to be cleaned up for various Unix platforms */
typedef unsigned char IMA_UINT8; /* Unsigned 8 bits */
typedef char IMA_INT8; /* Signed 8 bits */
typedef unsigned short IMA_UINT16; /* Unsigned 16 bits */
typedef short IMA_INT16; /* Signed 16 bits */
typedef unsigned int IMA_UINT32; /* Unsigned 32 bits */
typedef int IMA_INT32; /* Signed 32 bits */
typedef void* IMA_PVOID; /* Pointer to void */
typedef long long IMA_INT64;
typedef long long IMA_UINT64;
#endif /* #ifdef WIN32 */
/**
*******************************************************************************
*
* Generic IMA Constant Definitions
*
*******************************************************************************
*/
#define RL_LIBRARY_SEQNUM 0
#define RL_SHARED_NODE_SEQNUM 0
/**
* Value which can be assigned to an IMA_BOOL and or an IMA_XBOOL.
*/
#define IMA_TRUE 1
/**
* Value which can be assigned to an IMA_BOOL and or an IMA_XBOOL.
*/
#define IMA_FALSE 0
/**
* Value which can be assigned to an IMA_XBOOL.
*/
#define IMA_UNKNOWN 0xFFFFFFFF
/**
*******************************************************************************
*
* Base IMA Type Definitions
*
* @note Types that have a specific size must be defined ImaOsTypes.h which is
* an OS specific include file which is included by this file.
*
*******************************************************************************
*/
/**
* A character.
*/
typedef char IMA_CHAR;
/**
* A wide character.
*/
/**
* An integer. Spec states this is 32 bits on 32-bit systems, and 64-bit
* on 64-bit systems.
*/
typedef unsigned long IMA_UINT;
/**
* A boolean.
*/
typedef IMA_UINT32 IMA_BOOL;
/**
* An extended boolean: can have the values @ref IMA_TRUE, @ref IMA_FALSE, and
* @ref IMA_UNKNOWN.
*/
typedef IMA_UINT32 IMA_XBOOL;
/**
* A date and time.
*/
typedef struct tm IMA_DATETIME;
typedef unsigned char IMA_BYTE;
/**
*******************************************************************************
*
* Constants and macros declarations related to IMA_STATUS
*
*******************************************************************************
*/
#ifdef SOLARIS
typedef IMA_UINT IMA_STATUS;
#define IMA_STATUS_SUCCESS 0x00000000
#define IMA_STATUS_ERROR 0x80000000
#define MAKE_IMA_STATUS(x) ((IMA_STATUS)(x))
#else
typedef enum {
IMA_STATUS_SUCCESS = 0x00000000,
IMA_STATUS_REBOOT_NECESSARY = 0x00000001,
IMA_STATUS_INCONSISTENT_NODE_PROPERTIES = 0x00000002,
IMA_STATUS_SCSI_STATUS_CONDITION_MET = 0x00000100,
IMA_STATUS_ERROR = 0x80000000,
IMA_ERROR_NOT_SUPPORTED = 0x80000001,
IMA_ERROR_INSUFFICIENT_MEMORY = 0x80000002,
IMA_ERROR_LAST_PRIMARY_DISCOVERY_METHOD = 0x80000003,
IMA_ERROR_UNEXPECTED_OS_ERROR = 0x80000004,
IMA_ERROR_SYNC_TIMEOUT = 0x80000005,
IMA_ERROR_LU_EXPOSED = 0x80000006,
IMA_ERROR_LU_NOT_EXPOSED = 0x80000007,
IMA_ERROR_LU_IN_USE = 0x80000008,
IMA_ERROR_TARGET_TIMEOUT = 0x80000009,
IMA_ERROR_LOGIN_REJECTED = 0x8000000A,
IMA_ERROR_STATS_COLLECTION_NOT_ENABLED = 0x8000000B,
IMA_ERROR_SCSI_STATUS_CHECK_CONDITION = 0x80000100,
IMA_ERROR_SCSI_STATUS_BUSY = 0x80000101,
IMA_ERROR_SCSI_STATUS_RESERVATION_CONFLICT = 0x80000102,
IMA_ERROR_SCSI_STATUS_TASK_SET_FULL = 0x80000103,
IMA_ERROR_SCSI_STATUS_ACA_ACTIVE = 0x80000104,
IMA_ERROR_SCSI_STATUS_TASK_ABORTED = 0x80000105,
IMA_ERROR_INVALID_PARAMETER = 0xC0000000,
IMA_ERROR_INVALID_OBJECT_TYPE = 0xC0000001,
IMA_ERROR_INCORRECT_OBJECT_TYPE = 0xC0000002,
IMA_ERROR_OBJECT_NOT_FOUND = 0xC0000003,
IMA_ERROR_NAME_TOO_LONG = 0xC0000004,
IMA_ERROR_UNKNOWN_ERROR = 0x8FFFFFFF
} IMA_STATUS;
/*
#define IMA_SUCCESS(status) ( (IMA_UINT32)(status) & \
(IMA_UINT32)IMA_STATUS_ERROR == 0 ? \
IMA_TRUE : IMA_FALSE )
#define IMA_ERROR(status) ( (IMA_UINT32)(status) & \
(IMA_UINT32)IMA_STATUS_ERROR == 0x8000000 ? \
IMA_TRUE : IMA_FALSE )
*/
#endif
/**
*******************************************************************************
*
* Declaration of the IMA_OBJECT_TYPE enumeration
*
*******************************************************************************
*/
typedef enum
{
IMA_OBJECT_TYPE_NODE = 2,
IMA_OBJECT_TYPE_LHBA = 3,
IMA_OBJECT_TYPE_PHBA = 4,
IMA_OBJECT_TYPE_LNP = 7,
IMA_OBJECT_TYPE_PNP = 8,
IMA_OBJECT_TYPE_LU = 10,
typedef enum
{
typedef enum
{
typedef enum
{
typedef enum
{
typedef enum
{
typedef enum
{
IMA_AUTHMETHOD_NONE = 0,
IMA_AUTHMETHOD_CHAP = 1,
IMA_AUTHMETHOD_SRP = 2,
IMA_AUTHMETHOD_KRB5 = 3,
IMA_AUTHMETHOD_SPKM1 = 4,
typedef enum
{
IMA_COMMIT_TYPE_AUTO = 0,
typedef enum
{
IMA_DIGEST_NONE = 0,
/**
*******************************************************************************
*
* Declaration of the IMA_OID structure
*
* This structure should be treated as opaque by clients of the API.
* Appropriate APIs should be used to extract information from the structure.
*
*******************************************************************************
*/
typedef struct _IMA_OID
{
/**
* The type of the object. When an object ID is supplied as a parameter
* to an API the library uses this value to insure that the supplied
* object's type is appropriate for the API.
*/
/**
* A value determined by the library which it uses to uniquely identify the
* owner of an object. The owner of an object is either the library itself
* or a plugin. When an object ID is supplied as a parameter to an API the
* library uses this value to determine if it should handle the call itself
* or direct the call to one or more plugins.
*/
/**
* A value determined by a plugin which a plugin uses, perhaps in
* combination with the object type, to uniquely identify one of its
* objects.
*/
} IMA_OID;
/**
*******************************************************************************
*
* Declaration of the IMA_OID_LIST structure
*
* This structure is used by a number of APIs to return lists of objects. Any
* instance of this structure returned by an API must be freed by a client
* using the IMA_FreeObjectIdList API. Although oids is declared to be an
* array of one
* @ref IMA_OID structure it can in fact contain any number of
* @ref IMA_OID structures.
*
* @note The @a oids array is a variable length array, despite its declaration
* below it can be of any length.
*
*******************************************************************************
*/
typedef struct _IMA_OID_LIST
{
/**
* The number of object IDs in the @a oids array.
*/
/**
* A variable length array of zero or more object IDs. There are
* 'oidCount' object IDs in this array.
*/
} IMA_OID_LIST;
#define IMA_HOST_NAME_LEN 256
/**
*******************************************************************************
*
* Declaration of the IMA_LIBRARY_PROPERTIES structure
*
*******************************************************************************
*/
typedef struct _IMA_LIBRARY_PROPERTIES
{
/**
* The version of the iSCSI Management API implemented by the library.
* The value returned by a library for the API as described in this
* document is one.
*/
/**
* A nul terminated ASCII string containing the name of the vendor that
* created the binary version of the library.
*/
/**
* A nul terminated ASCII string containing the implementation version
* of the library from the vendor specified in the 'vendor' field.
*/
/**
* A nul terminated ASCII string ideally containing the path and file
* name of the library that is being used by the currently executing
* process can be found. If the path cannot be determined then it is
* acceptable to fill this field with only the name (and extension if
* applicable) of the file of the library. If this cannot be determined
* then this field should be an empty string.
*/
/**
* The time and date that the library that is executing was built.
*/
/**
*******************************************************************************
*
* Declaration of the IMA_PLUGIN_PROPERTIES structure
*
*******************************************************************************
*/
typedef struct _IMA_PLUGIN_PROPERTIES
{
typedef struct _IMA_IP_ADDRESS
{
typedef struct _IMA_ADDRESS_KEY
{
typedef struct _IMA_ADDRESS_KEYS
{
typedef struct _IMA_ADDRESS_KEY_PROPERTIES
{
typedef struct _IMA_IP_PROPERTIES
{
typedef struct _IMA_HOST_ID
{
union {
} id;
} IMA_HOST_ID;
typedef struct _IMA_TARGET_ADDRESS
{
/**
*******************************************************************************
*
* Declaration of the IMA_NODE_NAME type
*
*******************************************************************************
*/
#define IMA_NODE_NAME_LEN 224
/**
*******************************************************************************
*
* Declaration of the IMA_NODE_ALIAS type
*
*******************************************************************************
*/
#define IMA_NODE_ALIAS_LEN 256
/**
*******************************************************************************
*
* Declaration of the IMA_DOMAIN_NAME type
*
* A variable of this type may be formatted in any of the following four ways:
* 1. An empty string, which indicates that no host or IP address is
* specified
* 2. A DNS host name
* 3. A dotted-decimal IPv4 address
* 4. A bracketed IPv6 address as specified in RFC 2732
*
* In all cases a domain name is terminated by a nul character.
* This type is used by several APIs: IMA_SetPhbaSnsDiscovery(),
* IMA_SetNetworkPortalIpAddress(), and indirectly by
* IMA_GetPhbaDiscoveryProperties().
*
*******************************************************************************
*/
typedef struct _IMA_PHBA_DOWNLOAD_IMAGE_PROPERTIES
{
/**
*******************************************************************************
*
* Declaration of the IMA_NODE_PROPERTIES structure
*
* This structure is returned by the IMA_GetNodeProperties() API.
*
* NOTE: It is possible for both 'runningInInitiatorMode' and
* 'runningInTargetMode' to be set to @c IMA_TRUE. This means that
* the node is operating both as an initiator and as a target.
*
*******************************************************************************
*/
typedef struct _IMA_NODE_PROPERTIES
{
/**
* A boolean indicating if the node is running as initiator or not.
*/
/**
* A boolean indicating if the node is running as a target or not.
*/
/**
* A boolean which indicates if the node's name is set or not.
*/
/**
* A nul terminated Unicode string which contains the name of the node.
* The value in this field is only valid if 'nameValid' is set to
* IMA_TRUE, in which case it will be Unicode NULL terminated. If
* 'nameValid' is set to IMA_FALSE then this field will contain an
* empty string.
*/
/**
* A boolean which indicates if the node's alias is set or not.
*/
/**
* A nul terminated Unicode string which contains the alias of the node.
* This field is only valid if 'aliasValid' is set to IMA_TRUE, in which
* case it will be Unicode NULL terminated. If 'aliasValid' is set to
* IMA_FALSE then this field will contain an empty string.
*/
/*
* Boolean indicating if both the name and alias are settable using
* IMA_SetNodeName() and IMA_SetNodeAlias().
*/
/**
*******************************************************************************
*
* Declaration of the IMA_LHBA_PROPERTIES structure
*
* This structure is returned by the IMA_GetLhbaProperties() API.
*
*******************************************************************************
*/
typedef struct _IMA_LHBA_PROPERTIES
{
/**
*******************************************************************************
*
* Declaration of the IMA_ULP_xxx constants
*
*******************************************************************************
*/
#define IMA_ULP_TCP 0x01
#define IMA_ULP_SCTP 0x02
#define IMA_ULP_UDP 0x04
/**
*******************************************************************************
*
* Declaration of the IMA_MIN_MAX_VALUE structure
*
* Note: If the 'currentValueValid' field is IMA_FALSE then the value of
* 'settable' must also be set to IMA_FALSE.
*
* Note: The fields in this structure contain values which are defined by the
* implementation and not by the iSCSI specification. It is possible
* that an implementation may be more or less restrictive in the values
* that it can accept than the iSCSI specification allows.
*
* Note: An example of how to use 'incrementValue': Suppose that a structure is
* obtained where 'currentValueValid' is IMA_TRUE, 'settable' is
* IMA_TRUE, 'currentValue' is 50, 'defaultValue' is 50, 'minimumValue'
* is 30, 'maximumValue' is 70 and 'incrementValue' is 10. In this case,
* the possible values that the property can be set to are 30, 40, 50,
* 60, and 70. The new value must be the current value plus or minus
* some multiple of 'incrementValue'.
*
*******************************************************************************
*/
typedef struct _IMA_MIN_MAX_VALUE
{
/**
* A boolean indicating if the @a currentValue field contains a valid value.
*/
/**
* Indicates if the corresponding property is settable. If this field
* has the value IMA_TRUE then the 'defaultValue', 'minimumValue',
* 'maximumValue', and 'incrementValue' fields shall contain valid
* values. If this field has the value IMA_FALSE then these fields
* have undefined values.
*/
/**
* If currentValueValid has the value IMA_TRUE then this field contains
* the current value of the associated property. If 'currentValueValid' has
* the value IMA_FALSE then the value of this field is undefined.
*/
/**
* If 'settable' has the value IMA_TRUE then this field contains the
* implementation's default value of the associated property. If 'settable'
* has the value IMA_FALSE then the value of this field is undefined.
*/
/**
* If 'settable' has the value IMA_TRUE then this field contains the
* implementation's minimum value of the associated property. If 'settable'
* has the value IMA_FALSE then the value of this field is undefined.
*/
/**
* If 'settable' has the value IMA_TRUE then this field contains the
* implementation's maximum value of the associated property. If 'settable'
* has the value IMA_FALSE then the value of this field is undefined.
*/
/**
* If 'settable' has the value IMA_TRUE then this field contains a value
* which can be added to or subtracted from 'currentValue' to obtain other
* possible values of the associated property. If 'settable' has the value
* IMA_FALSE then the value of this field is undefined.
*/
typedef struct _IMA_BOOL_VALUE
{
/**
*******************************************************************************
*
* Declaration of the IMA_PHBA_PROPERTIES structure
*
* This structure is returned by the IMA_GetPhbaProperties() API.
*
* Note: Both 'isInitiator' and 'isTarget' cannot be set to IMA_FALSE as this
* would mean that the PHBA was not functioning as either an initiator or
* target, which means that its not functioning at all.
*
*******************************************************************************
*/
typedef struct _IMA_PHBA_PROPERTIES
{
/**
* A nul terminated ASCII string which contains the name of the vendor
* of a PHBA. If the first character in this field is nul then the
* vendor is unknown.
*/
/**
* A nul terminated ASCII string which contains the name of the model of
* a PHBA. If the first character in this field is nul then the model is
* unknown.
*/
/**
* A nul terminated ASCII string which contains a description of a PHBA.
* This is a user friendly description of the PHBA. If the first character
* in this field is nul then there is no description.
*/
/**
* A nul terminated ASCII string which contains the serial number of a
* PHBA. If the first character in this field is nul then the serial
* number is unknown.
*/
/**
* A nul terminated ASCII string which contains the hardware version of
* a PHBA. If the first character in this field is nul then the hardware
* version is unknown.
*/
/**
* A nul terminated ASCII string which contains the ASIC version of a
* PHBA. If the first character in this field is nul then the ASIC
* version is unknown or is not applicable.
*/
/**
* A nul terminated ASCII string which contains the firmware version of
* a PHBA. If the first character in this field is nul then the firmware
* version is unknown or is not applicable.
*/
/**
* A nul terminated ASCII string which contains the option ROM version
* of a PHBA. If the first character in this field is nul then the option
* ROM version is unknown or is not applicable.
*/
/**
* A nul terminated ASCII string which contains the name of the driver
* controlling a PHBA. If the first character in this field is nul then
* the name of the driver is unknown.
*/
/**
* A nul terminated ASCII string which contains the version of the driver
* specified in 'driverName'. If the first character in this field is nul
* then the version of the driver is unknown.
*
* This field can have a known value only if @a driverName has a known
* value as well.
*/
/**
* A field containing flags which indicate what upper level protocols
* are supported by a PHBA. Examples of upper level protocols include:
*
* - TCP, represented by IMA_ULP_TCP
* - SCTP, represented by IMA_ULP_SCTP
* - UDP, represented by IMA_ULP_UDP
*/
/**
* A extended boolean which indicates if a PHBA supports executing SCSI
* commands which cause bidirectional transfers.
*
* Note: The value of this field applies to the entire stack:
* the hardware, ASIC, firmware, driver, etc. All must support SCSI
* commands which cause bidirectional transfers for this field to be
* set to IMA_TRUE.
*/
/**
* The maximum length, in bytes, of a CDB that can be transferred by
* this PHBA. If this field has a value of zero that indicates that
* this value is unknown.
*
* Note: The value of this field applies to the entire stack:
* the hardware, ASIC, firmware, driver, etc. All must support the
* maximum CDB length returned in this field.
*/
/**
* An extended boolean which indicates if a PHBA can also function as
* a standard NIC concurrently with functioning as an iSCSI PHBA.
*/
/**
* A extended boolean which indicates if a PHBA is functioning as a
* standard NIC concurrently with functioning as an iSCSI PHBA.
*/
/**
* An extended boolean indicating if the PHBA is functioning as an
* initiator.
*/
/**
* An extended boolean indicating if the PHBA is functioning as a target.
*/
/**
* An extended boolean indicating if the PHBA is using a TCP offload engine.
*
* Note: This value should only be set to @c IMA_TRUE if a TCP offload
* engine is present and is being used. If it can be determined that a
* TCP offload engine is present, but it cannot be determined if that
* offload engine is being used then this value should be set to
* IMA_UNKNOWN.
*/
/**
* An extended boolean indicating if the PHBA is using a iSCSI offload
* engine.
*
* Note: This value should only be set to @c IMA_TRUE if a iSCSI offload
* engine is present and is being used. If it can be determined that an
* iSCSI offload engine is present, but it cannot be determined if that
* offload engine is being used then this value should be set to
* IMA_UNKNOWN.
*/
/**
*******************************************************************************
*
* Declaration of the IMA_DISCOVERY_PROPERTIES structure
*
*******************************************************************************
*/
typedef struct _IMA_DISCOVERY_PROPERTIES
{
typedef struct _IMA_PHBA_DOWNLOAD_PROPERTIES
{
typedef struct _IMA_IPSEC_PROPERTIES
{
typedef struct _IMA_LNP_PROPERTIES
{
typedef struct _IMA_PNP_PROPERTIES
{
typedef struct _IMA_PNP_STATISTICS
{
typedef struct _IMA_TARGET_PROPERTIES
{
typedef struct _IMA_CONNECTION_PROPERTIES
{
typedef struct _IMA_SESSION_PROPERTIES
{
typedef struct _IMA_TARGET_ERROR_STATISTICS
{
typedef struct _IMA_LU_PROPERTIES
{
typedef struct _IMA_STATISTICS_PROPERTIES
{
typedef struct _IMA_DEVICE_STATISTICS
{
typedef struct _IMA_NETWORK_PORTAL_PROPERTIES
{
typedef void (* IMA_OBJECT_VISIBILITY_FN)(
);
typedef void (* IMA_OBJECT_PROPERTY_FN)(
);
typedef struct _IMA_CHAP_INITIATOR_AUTHPARMS
{
typedef struct _IMA_SRP_INITIATOR_AUTHPARMS
{
typedef struct _IMA_KRB5_INITIATOR_AUTHPARMS
{
typedef struct _IMA_SPKM_INITIATOR_AUTHPARMS
{
typedef union _IMA_INITIATOR_AUTHPARMS
{
typedef struct _IMA_STATIC_DISCOVERY_TARGET
{
typedef struct _IMA_DISCOVERY_ADDRESS_PROPERTIES
{
typedef struct _IMA_STATIC_TGT_PROPERTIES
{
typedef struct ima_plugin_info {
char PluginName[64];
char PluginPath[256];
#ifdef WIN32
#else
void* hPlugin; /* Handle to a loaded DLL */
#endif
#ifdef WIN32
#else
int pluginMutex;
#endif
/**
*******************************************************************************
*
* The individual APIs of the IMA are declared below.
*
*******************************************************************************
*/
/**
*******************************************************************************
*
* Gets the properties of the IMA library that is being used.
*
* @param pProps
* A pointer to an IMA_LIBRARY_PROPERTIES structure allocated by
* the caller. On successful return this structure will contain the
* properties of the IMA library.
*
* @return An IMA_STATUS indicating if the operation was successful or if
* an error occurred.
*
* @retval IMA_SUCCESS
* Returned if the library properties were successfully returned.
*
* @retval IMA_ERROR_INVALID_PARAMETER
* Returned if 'pProps' is NULL or specifies a memory area to which
* data cannot be written.
*
*******************************************************************************
*/
);
/**
*******************************************************************************
*
* Gets a list of the object IDs of all currently loaded plugins.
*
* @param ppList
* A pointer to a pointer to an IMA_OID_LIST. On successful
* return this will contain a pointer to an @ref IMA_OID_LIST
* which contains the object IDs of all of the plugins currently
* loaded by the library.
*
* @return An IMA_STATUS indicating if the operation was successful or
* if an error occurred.
*
* @retval IMA_SUCCESS
* Returned if the plugin ID list was successfully returned.
*
* @retval IMA_ERROR_INVALID_PARAMETER
* Returned if 'ppList' is NULL or specifies a memory area to
* which data cannot be written.
*
*******************************************************************************
*/
);
/**
*******************************************************************************
*
* Gets the properties of the specified vendor plugin.
*
* @param pluginOid
* The ID of the plugin whose properties are being retrieved.
*
* @param pProps
* A pointer to an @ref IMA_PLUGIN_PROPERTIES structure allocated by
* the caller. On successful return this will contain the properties
* of the plugin specified by pluginOid.
*
* @return An IMA_STATUS indicating if the operation was successful or if an
* error occurred.
*
* @retval IMA_SUCCESS
* Returned if the plugin properties were successfully returned.
*
* @retval IMA_ERROR_INVALID_OBJECT_TYPE
* Returned if 'pluginOid' does not specify any valid object type.
*
* @retval IMA_ERROR_INCORRECT_OBJECT_TYPE
* Returned if 'pluginOid' does not specify a plugin object.
*
* @retval IMA_ERROR_OBJECT_NOT_FOUND
* Returned if 'pluginOid' refers to a plugin, but not one that
* is currently loaded.
* @retval IMA_ERROR_INVALID_PARAMETER
* Returned if 'pProps' is NULL or specifies a memory area to
* which data cannot be written.
*
*******************************************************************************
*/
);
/**
*******************************************************************************
*
* Gets the object ID for the plugin associated with the specified object ID.
*
* @param oid
* The object ID of an object that has been received from a previous
* library call.
*
* @param pPluginOid
* A pointer to an IMA_OID structure allocated by the caller. On
* successful return this will contain the object ID of the plugin
* associated with the object specified by @a objectId. This
* can then be used to work with the plugin, e.g., to get the
* properties of the plugin or the send the plugin an IOCtl.
*
* @return An IMA_STATUS indicating if the operation was successful or if
* an error occurred.
*
* @retval IMA_SUCCESS
* Returned if the associated plugin ID was successfully returned.
*
* @retval IMA_ERROR_INVALID_PARAMETER
* Returned if 'pPluginOid' is NULL or specifies a memory area to
* which data cannot be written.
*
* @retval IMA_ERROR_INVALID_PARAMETER
* Returned if 'oid' specifies an object not owned by a plugin, but
* instead one that is owned by the library.
*
* @retval IMA_ERROR_INVALID_OBJECT_TYPE
* Returned if 'oid' specifies an object with an invalid type.
*
*******************************************************************************
*/
);
/**
*******************************************************************************
*
* Gets the object ID of the shared node.
*
* @param pSharedNodeOid
* A pointer to an IMA_OID structure allocated by the caller. On
* successful return it will contain the object ID of the
* shared node of the currently executing system is placed.
*
* @return An IMA_STATUS indicating if the operation was successful or
* if an error occurred.
*
* @retval IMA_SUCCESS
* Returned if the shared node ID has been successfully retrieved.
*
* @retval IMA_ERROR_INVALID_PARAMETER
* Returned if 'pSharedNodeOid' is NULL or specifies a memory area
* to which data cannot be written.
*
*******************************************************************************
*/
);
);
/**
*******************************************************************************
*
* Gets the properties of the specified iSCSI node.
*
* @param nodeOid
* The ID of the node to get the properties of.
*
* @param pProps
* A pointer to an @ref IMA_NODE_PROPERTIES structure which on
* successful return will contain the properties of the specified node.
*
* @return An IMA_STATUS indicating if the operation was successful or if
* an error occurred.
*
* @retval IMA_SUCCESS
* Returned if the node properties have been successfully retrieved.
*
* @retval IMA_ERROR_INVALID_PARAMETER
* Returned if 'pProps' is NULL or specifies a memory area to which
* data cannot be written.
*
* @retval IMA_ERROR_INVALID_OBJECT_TYPE
* Returned if 'nodeOid' does not specify any valid object type.
*
* @retval IMA_ERROR_INCORRECT_OBJECT_TYPE
* Returned if 'nodeOid' does not specify a node object.
*
* @retval IMA_ERROR_OBJECT_NOT_FOUND
* Returned if 'nodeOid' does not specify a node which is currently
* known to the system.
*
*******************************************************************************
*/
);
/**
*******************************************************************************
*
* Sets the name of the specified node.
*
* @param nodeOid
* The object ID of the node whose name is being set.
*
* @param newName
* The new name of the node.
*
* @return An IMA_STATUS indicating if the operation was successful or
* if an error occurred.
*
* @retval IMA_SUCCESS
* Returned if the node name was successfully changed.
*
* @retval IMA_STATUS_REBOOT_NECESSARY
* Returned if a reboot is necessary before the setting of the
* name actually takes affect.
*
* @retval IMA_ERROR_INVALID_PARAMETER
* Returned if 'newName' is NULL, or specifies a memory area
* to which data cannot be written, or has a length of 0.
*
* @retval IMA_ERROR_INVALID_OBJECT_TYPE
* Returned if 'nodeOid' does not specify any valid object type.
*
* @retval IMA_ERROR_INCORRECT_OBJECT_TYPE
* Returned if 'nodeOid' does not specify a node object.
*
* @retval IMA_ERROR_OBJECT_NOT_FOUND
* Returned if 'nodeOid' does not specify a node which is
* currently known to the system.
*
* @retval IMA_ERROR_NAME_TOO_LONG
* Returned if 'newName' contains too many characters.
*
*******************************************************************************
*/
const IMA_NODE_NAME newName
);
/**
*******************************************************************************
*
* Generates a unique node name for the currently running system.
*
* @param generatedName
* On successful return contains the generated node name.
*
* @return An IMA_STATUS indicating if the operation was successful or if an
* error occurred.
*
* @retval IMA_ERROR_INVALID_PARAMETER
* Returned if 'generatedname is NULL or
* specifies a memory area to which data cannot be written.
*
*******************************************************************************
*/
);
/**
*******************************************************************************
*
* Sets the alias of the specified node.
*
* @param nodeOid
* The object ID of the node whose alias is being set.
*
* @param newAlias
* A pointer to a Unicode string which contains the new node alias.
* If this parameter is NULL then the current alias is deleted, in which
* case the specified node no longer has an alias.
*
* @return An IMA_STATUS indicating if the operation was successful or
* if an error occurred.
*
* @retval IMA_SUCCESS
* Returned if the node's alias has been successfully set.
*
* @retval IMA_STATUS_REBOOT_NECESSARY
* A reboot is necessary before the setting of the alias actually
* takes effect.
*
* @retval IMA_ERROR_INVALID_OBJECT_TYPE
* Returned if 'nodeOid' does not specify any valid object type.
*
* @retval IMA_ERROR_INCORRECT_OBJECT_TYPE
* Returned if 'nodeOid' does not specify a node object.
*
* @retval IMA_ERROR_OBJECT_NOT_FOUND
* Returned if 'nodeOid' does not specify a node which is currently
* known to the system.
*
* @retval IMA_ERROR_NAME_TOO_LONG
* Returned if 'newAlias' contains too many characters.
*
*******************************************************************************
*/
const IMA_NODE_ALIAS newAlias
);
/**
*******************************************************************************
*
* Gets a list of the object IDs of all the logical HBAs in the system.
*
* @param ppList
* A pointer to a pointer to an @ref IMA_OID_LIST structure. On
* successful return this will contain a pointer to an
* IMA_OID_LIST which contains the object IDs of all of the
* LHBAs currently in the system.
*
* @return An IMA_STATUS indicating if the operation was successful or if
* an error occurred.
*
* @retval IMA_SUCCESS
* Returned if the LHBA ID list has been successfully returned.
*
* @retval IMA_ERROR_INVALID_PARAMETER
* Returned if 'ppList' is NULL or specifies a memory area to which
* data cannot be written.
*
*******************************************************************************
*/
);
/**
*******************************************************************************
*
* Gets the properties of the specified logical HBA.
*
* @param lhbaOid
* The object ID of the LHBA whose properties are being retrieved.
*
* @param pProps
* A pointer to an IMA_LHBA_PROPERTIES structure. On successful
* return this will contain the properties of the LHBA specified by
* 'lhbaOid'.
*
* @return An IMA_STATUS indicating if the operation was successful or if
* an error occurred.
*
* @retval IMA_SUCCESS
* Returned if the properties of the specified LHBA have been
* successfully retrieved.
*
* @retval IMA_ERROR_INVALID_PARAMETER
* Returned if 'pProps' is NULL or specifies a memory area to which
* data cannot be written.
*
* @retval IMA_ERROR_INVALID_OBJECT_TYPE
* Returned if 'lhbaOid' does not specify any valid object type.
*
* @retval IMA_ERROR_INCORRECT_OBJECT_TYPE
* Returned if 'lhbaOid' does not specify a LHBA.
*
* @retval IMA_ERROR_OBJECT_NOT_FOUND
* Returned if 'lhbaOid' does not specify a LHBA which is currently
* known to the system.
*
*******************************************************************************
*/
);
/**
*******************************************************************************
*
* Gets a list of the object IDs of all the physical HBAs in the system.
*
* @param ppList
* A pointer to a pointer to an IMA_OID_LIST structure. On successful
* return this will contain a pointer to an IMA_OID_LIST which
* contains the object IDs of all of the PHBAs currently in the system.
*
* @return An IMA_STATUS indicating if the operation was successful or if
* an error occurred.
*
* @retval IMA_SUCCESS
* Returned if the PHBA OID list has been successfully returned.
*
* @retval IMA_ERROR_INVALID_PARAMETER
* Returned if 'ppList' is NULL or specifies a memory area to which
* data cannot be written.
*
*******************************************************************************
*/
);
/**
*******************************************************************************
*
* Gets the general properties of a physical HBA.
*
* @param phbaOid
* The object ID of the PHBA whose properties are being queried.
*
* @param pProps
* A pointer to an @ref IMA_PHBA_PROPERTIES structure. On successful
* return this will contain the properties of the PHBA specified by
* 'phbaOid'.
#
* @return An IMA_STATUS indicating if the operation was successful or
* if an error occurred.
*
* @retval IMA_SUCCESS
* Returned if the properties of the specified PHBA have been
* successfully retrieved.
*
* @retval IMA_ERROR_INVALID_PARAMETER
* Returned if 'pProps' is NULL or specifies a memory area to which
* data cannot be written.
*
* @retval IMA_ERROR_INVALID_OBJECT_TYPE
* Returned if 'phbaOid' does not specify any valid object type.
*
* @retval IMA_ERROR_INCORRECT_OBJECT_TYPE
* Returned if 'phbaOid' does not specify a PHBA.
*
* @retval IMA_ERROR_OBJECT_NOT_FOUND
* Returned if 'phbaOid' does not specify a PHBA which is currently
* known to the system.
*
*******************************************************************************
*/
);
/**
*******************************************************************************
*
* Frees a previously allocated IMA_OID_LIST structure.
*
* @param pMemory A pointer to an IMA_OID_LIST structure allocated by the
* library. On successful return the memory allocated by the
* list is freed.
* @return An IMA_STATUS indicating if the operation was successful or if an
* error occurred.
* @retval IMA_SUCCESS
* Returned if the specified object ID list was successfully
* freed.
* @retval IMA_ERROR_INVALID_PARAMETER
* Returned if pMemory is NULL or specifies a memory area from which
* data cannot be read.
*
*******************************************************************************
*/
void *pMemory
);
);
/**
*******************************************************************************
*
* Gets the first burst length properties of the specified logical HBA.
*
* @param oid
* The object ID of the logical HBA to get the first burst length
* properties of.
*
* @param pProps
*
* @return An IMA_STATUS indicating if the operation was successful or if an
* error occurred.
*
* @retval IMA_SUCCESS
* Returned if the first burst length properties have been
* successfully retrieved.
*
* @retval IMA_ERROR_INVALID_PARAMETER
* Returned if pProps is NULL or specifies a memory area to which
* data cannot be written.
*
* @retval IMA_ERROR_INVALID_OBJECT_TYPE
* Returned if 'oid' does not specify any valid object type.
*
* @retval IMA_ERROR_INCORRECT_OBJECT_TYPE
* Returned if 'oid' does not specify a LHBA.
*
* @retval IMA_ERROR_OBJECT_NOT_FOUND
* Returned if 'oid' does not specify a LHBA which is currently
* known to the system.
*
*******************************************************************************
*/
);
/**
*******************************************************************************
*
* Gets the max burst length properties of the specified logical HBA.
*
* @param oid
* The object ID of the logical HBA to get the max burst length
* properties of.
*
* @param pProps
* A pointer to an IMA_MIN_MAX_VALUE structure allocated by the
* caller. On successful return this structure will contain the max
* burst length properties of this LHBA.
*
* @return An IMA_STATUS indicating if the operation was successful or if
* an error occurred.
*
* @retval IMA_SUCCESS
* Returned if the max burst length properties have been successfully
* retrieved.
*
* @retval IMA_ERROR_INVALID_PARAMETER
* Returned if pProps is NULL or specifies a memory area to which
* data cannot be written.
*
* @retval IMA_ERROR_INVALID_OBJECT_TYPE
* Returned if 'oid' does not specify any valid object type.
*
* @retval IMA_ERROR_INCORRECT_OBJECT_TYPE
* Returned if 'oid' does not specify a LHBA.
*
* @retval IMA_ERROR_OBJECT_NOT_FOUND
* Returned if 'oid' does not specify a LHBA which is currently
* known to the system.
*
*******************************************************************************
*/
);
/**
*******************************************************************************
*
* Gets the maximum receive data segment length properties of the specified
* logical HBA.
*
* @param oid
* The object ID of the logical HBA to get the max receive data
* segment length properties of.
*
* @param pProps
* A pointer to an @ref IMA_MIN_MAX_VALUE structure allocated by the
* caller. On successful return this structure will contain the max
* receive data segment length properties of this LHBA.
*
* @return An IMA_STATUS indicating if the operation was successful or if
* an error occurred.
*
* @retval IMA_SUCCESS
* Returned if the max receive data segment length properties
* have been successfully retrieved.
*
* @retval IMA_ERROR_INVALID_PARAMETER
* Returned if 'pProps' is NULL or specifies a memory area to which
* data cannot be written.
*
* @retval IMA_ERROR_INVALID_OBJECT_TYPE
* Returned if 'oid' does not specify any valid object type.
*
* @retval IMA_ERROR_INCORRECT_OBJECT_TYPE
* Returned if 'oid' does not specify a LHBA.
*
* @retval IMA_ERROR_OBJECT_NOT_FOUND
* Returned if 'oid' does not specify a LHBA which is currently
* known to the system.
*
*******************************************************************************
*/
);
/*---------------------------------------------*/
const void *pInputBuffer,
void *pOutputBuffer,
);
);
);
);
);
);
);
);
);
);
);
);
);
);
);
);
);
);
);
);
);
);
);
);
);
);
);
const IMA_HOST_ID *iSnsHost
);
);
);
);
);
);
);
);
);
);
);
const IMA_IP_ADDRESS NewIpAddress
);
);
);
);
);
);
);
);
);
);
);
);
);
);
);
);
);
);
);
);
);
);
);
);
);
const IMA_HOST_ID *iSnsHost
);
);
);
);
);
);
);
const IMA_AUTHMETHOD *pMethodList
);
const IMA_INITIATOR_AUTHPARMS *pParms
);
);
);
);
);
);
);
);
);
);
);
);
);
#endif
#ifdef __cplusplus
};
#endif