/*
* Description
* ImaLib.c - Implements a sample common IMA library
*
* 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)
*
* 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().
*
* 01/21/2005 Updated to support IMA 1.1.3.
*/
#ifdef WIN32
#include <windows.h>
#else
#include <dlfcn.h>
#include <stdarg.h>
#endif
#include <string.h>
#include <strings.h>
#include <stdlib.h>
#include <unistd.h>
#include <time.h>
#include <stdio.h>
#include <netdb.h>
#include "libsun_ima.h"
#include "ima.h"
#include "ima-plugin.h"
/* Linux only */
#ifdef WIN32
#else
#endif
void InitLibrary();
void ExitLibrary();
#ifdef WIN32
#else
#endif
}
#ifdef WIN32
/* Begin implementation */
LPVOID lpReserved) {
switch (ul_reason_for_call) {
case DLL_PROCESS_ATTACH:
// InitLibrary();
break;
case DLL_PROCESS_DETACH:
ExitLibrary();
break;
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
break;
}
return (TRUE);
}
void so_init(void);
void so_fini(void);
static int os_createmutex(int *semid);
static void os_obtainmutex(int semid);
static void os_releasemutex(int semid);
static void os_destroymutex(int semid);
void so_init() {
InitLibrary();
}
void so_fini() {
ExitLibrary();
}
int ret;
int i;
if (number_of_plugins == -1)
InitLibrary();
for (i = 0; i < number_of_plugins; i++) {
"libsun_ima.so") == NULL) {
continue;
}
PassFunc =
plugintable[i].hPlugin,
"IMA_GetNodeProperties");
}
}
break;
}
return (status);
}
if (status != IMA_STATUS_SUCCESS) {
return (status);
}
return (status);
}
if (status != IMA_STATUS_SUCCESS) {
return (status);
}
return (status);
}
int ret;
int i;
if (number_of_plugins == -1)
InitLibrary();
for (i = 0; i < number_of_plugins; i++) {
"libsun_ima.so") == NULL) {
continue;
}
PassFunc =
"IMA_SetNodeName");
}
}
break;
}
return (status);
}
int ret;
int i;
if (number_of_plugins == -1)
InitLibrary();
for (i = 0; i < number_of_plugins; i++) {
"libsun_ima.so") == NULL) {
continue;
}
PassFunc =
"IMA_SetNodeAlias");
}
}
break;
}
return (status);
}
#else
/*
* add code in .init and .fini,
* "__attribute__ ((constructor))" and "__attribute__ ((destructor))"
* are used with gcc
*/
InitLibrary();
}
ExitLibrary();
}
#endif
#ifdef WIN32
return (FALSE);
}
return (TRUE);
}
}
}
}
}
#else
#if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)
#else
union semun {
};
#endif
/* Create the semaphore. Return 1 if successful, 0 otherwise */
int retVal;
return (0);
}
if (retVal == -1) {
return (0);
}
if (retVal == -1) {
return (0);
}
return (1);
}
int retVal;
}
int retVal;
}
/* Destroy the SNMP semaphore. */
int retVal;
}
#endif
void InitLibrary() {
char *charPtr;
IMA_UINT i = 0;
if (number_of_plugins != -1)
return;
number_of_plugins = 0;
if (os_createmutex(&libMutex) == 0) {
return;
}
sharedNodeAlias[0] = 0;
dwStrLength = 255;
/* Open configuration file from known location */
#ifdef WIN32
else
#else
#endif
return;
}
/* Read in each line and load library */
/* Take out the '\n' */
*charPtr = '\0';
/* look for the first tab */
/* Set Null termination for library name if found */
*charPtr++ = '\0';
/*
* Skip spaces and tabs until
* the next character found
*/
charPtr++;
}
else
continue; /* May be invalid entry */
/* Copy library name and path */
/*
* Continue to the next line if library name or
* path is invalid
*/
if ((strlen(pluginname) == 0) ||
(strlen(pluginpath) == 0))
continue;
#ifdef WIN32
/* Load the DLL now */
#else
/* Load the DLL now */
#endif
typedef int (*InitializeFn)();
(char *)&pluginname, 64);
memcpy((char *)
&plugintable[i].PluginPath,
(char *)&pluginpath, 256);
#ifdef WIN32
PassFunc = (InitializeFn)
#else
PassFunc = (InitializeFn)
#endif
status =
}
plugintable[i].number_of_vbcallbacks = 0;
plugintable[i].number_of_pccallbacks = 0;
i++;
}
}
}
number_of_plugins = i;
}
void ExitLibrary() {
IMA_UINT j;
IMA_UINT i;
if (number_of_plugins == -1)
return;
for (i = 0; i < number_of_plugins; i++) {
for (j = 0; j < plugintable[i].number_of_vbcallbacks;
j++) {
#ifdef WIN32
PassFunc =
#else
PassFunc =
#endif
}
}
plugintable[i].number_of_vbcallbacks = 0;
for (j = 0; j < plugintable[i].number_of_pccallbacks;
j++) {
#ifdef WIN32
PassFunc =
"IMA_DeregisterForObjectPropertyChangesFn");
#else
PassFunc =
"IMA_DeregisterForObjectPropertyChangesFn");
#endif
}
}
plugintable[i].number_of_pccallbacks = 0;
#ifdef WIN32
#else
#endif
if (ExitPassFunc != NULL) {
ExitPassFunc();
}
#ifdef WIN32
/* Unload DLL from memory */
#else
/* Unload DLL from memory */
#endif
}
}
number_of_plugins = -1;
}
static void VisibilityCallback(
IMA_UINT i, j;
for (i = 0; i < number_of_plugins; i++) {
for (j = 0;
j < plugintable[i].number_of_vbcallbacks;
j++) {
(plugintable[i].vbcallback[j])
}
}
}
}
static void PropertyCallback(
IMA_UINT i, j;
for (i = 0; i < number_of_plugins; i++) {
for (j = 0;
j < plugintable[i].number_of_pccallbacks;
j++) {
}
}
}
}
/*
* Gets the date and time, in the form of an IMA_DATETIME, from the build
* script when compiled.
*/
#ifdef WIN32
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
int i;
for (i = 0; i < 7; i++) {
break;
}
}
for (i = 0; i < 12; i++) {
break;
}
}
#else
#if defined(BUILD_DATE)
}
#else
#endif
#endif
}
/*
* Gets the properties of the IMA library that is being used.
*
* @param pProps A pointer to an @ref 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 @a pProps is NULL or
* specifies a memory area to which data cannot be written.
*/
#ifdef WIN32
#endif
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
// Fill in the library properties.
#ifdef WIN32
imaPath[0] = 0;
}
#else
// mbstowcs(pProps->fileName, imaPath, 256);
#endif
return (IMA_STATUS_SUCCESS);
}
/*
* Gets a list of the object IDs of all currently loaded plugins.
*
* @param ppList A pointer to a pointer to an @ref 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 @a ppList is NULL or
* specifies a memory area to which data cannot be written.
*/
IMA_OID_LIST **ppList) {
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_UNEXPECTED_OS_ERROR);
for (i = 0; i < number_of_plugins; i++) {
}
return (IMA_STATUS_SUCCESS);
}
/*
* Gets the properties of the specified vendor plugin.
*
* @param pluginId 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 pluginId.
* @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 @a pluginId does not
* specify any valid object type.
* @retval IMA_ERROR_INCORRECT_OBJECT_TYPE Returned if @a pluginId does not
* specify a plugin object.
* @retval IMA_ERROR_OBJECT_NOT_FOUND Returned if @a pluginId refers to a
* plugin, but not one that is currently loaded.
* @retval IMA_ERROR_INVALID_PARAMETER Returned if @a pProps is NULL or
* specify a memory area to which data cannot be written.
*/
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
(pluginOid.objectSequenceNumber != 0))
return (IMA_ERROR_INVALID_PARAMETER);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_GetPluginProperties");
#else
"IMA_GetPluginProperties");
#endif
}
}
break;
}
}
return (status);
}
/*
* Gets the object ID for the plugin associated with the specified object ID.
*
* @param objectId The object ID of an object that has been received from
* a previous library call.
* @param pPluginId A pointer to an @ref 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 @a pPluginId is NULL
* or specifes a memory area to which data cannot be written.
* @retval IMA_ERROR_INVALID_PARAMETER Returned if @a objectId 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 @a objectId specifies
* an object with an invalid type.
*/
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INVALID_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
}
}
return (status);
}
/*
* Gets the object ID of the shared node.
*
* @param pSharedNodeId A pointer to an @ref 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 @a pSharedNodeId is NULL
* or specifies a memory area to which data cannot be written.
*/
IMA_OID *pSharedNodeId) {
if (pSharedNodeId == NULL)
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_STATUS_SUCCESS);
}
IMA_UINT i;
if (pObjectType == NULL)
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INVALID_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
}
}
return (status);
}
/*
* Gets the properties of the specified iSCSI node.
* @param nodeId The ID of the node to get the properties of.
* @param pProps A pointer to an @ref IMA_NODE_PROPERTIES structure
* which on successfully 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 @a pProps is NULL
* or specifies a memory area to which data cannot be written.
* @retval IMA_ERROR_INVALID_OBJECT_TYPE Returned if @a nodeId does
* not specify any valid object type.
* @retval IMA_ERROR_INCORRECT_OBJECT_TYPE Returned if @a nodeId does
* not specify a node object.
* @retval IMA_ERROR_OBJECT_NOT_FOUND Returned if @a nodeId does not
* specify a node which is currently known to the system.
*/
IMA_UINT i;
#if defined(_WINDOWS)
#endif
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
if (sharedNodeName[0] == 0) {
#if defined(_WINDOWS)
GetComputerName((char *)fullline,
(LPDWORD)&dwStrLength);
sharedNodeName, 256);
gethostname((char *)fullline,
sizeof (fullline));
}
#else
#endif
}
if (sharedNodeName[0] != 0) {
}
else
#if defined(SOLARIS)
if (sharedNodeAlias[0] == 0) {
}
#endif
if (sharedNodeAlias[0] != 0) {
}
else
return (IMA_STATUS_SUCCESS);
}
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_GetNodeProperties");
#else
"IMA_GetNodeProperties");
#endif
}
}
break;
}
}
return (status);
}
/*
* Sets the name of the specified node.
*
* @param nodeId 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 @a 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 @a nodeId does not
* specify any valid object type.
* @retval IMA_ERROR_INCORRECT_OBJECT_TYPE Returned if @a nodeId does not
* specify a node object.
* @retval IMA_ERROR_OBJECT_NOT_FOUND Returned if @a nodeId does not specify a
* node which is currently known to the system.
* @retval IMA_ERROR_NAME_TOO_LONG Returned if @a newName contains too many
* characters.
*/
const IMA_NODE_NAME newName) {
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_NAME_TOO_LONG);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
#if defined(SOLARIS)
return (IMA_ERROR_UNKNOWN_ERROR);
}
#endif
return (IMA_STATUS_SUCCESS);
}
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_SetNodeName");
#else
"IMA_SetNodeName");
#endif
}
}
break;
}
}
return (status);
}
/*
* Generates an 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 @a generatedname is NULL
* or specifies a memory area to which data cannot be written.
*/
#if defined(_WINDOWS)
#endif
#ifndef _WINDOWS
#ifndef SOLARIS
int i;
#endif
#endif
if (generatedname == NULL)
return (IMA_ERROR_INVALID_PARAMETER);
#if defined(_WINDOWS)
generatedname, 256);
}
#else
i = 0;
while (computername[i] != '\0') {
i++;
}
#endif
return (IMA_STATUS_SUCCESS);
}
/*
* Sets the alias of the specified node.
*
* @param nodeId 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 affect.
* @retval IMA_ERROR_INVALID_OBJECT_TYPE Returned if @a nodeId does not
* specify any valid object type.
* @retval IMA_ERROR_INCORRECT_OBJECT_TYPE Returned if @a nodeId does not
* specify a node object.
* @retval IMA_ERROR_OBJECT_NOT_FOUND Returned if @a nodeId does not specify
* a node which is currently known to the system.
* @retval IMA_ERROR_NAME_TOO_LONG Returned if @a newAlias contains too many
* characters.
*/
const IMA_NODE_ALIAS newAlias) {
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_NAME_TOO_LONG);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
#if defined(SOLARIS)
return (IMA_ERROR_UNKNOWN_ERROR);
}
#endif
else
return (IMA_STATUS_SUCCESS);
}
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_SetNodeAlias");
#else
plugintable[i].hPlugin,
"IMA_SetNodeAlias");
#endif
}
}
break;
}
}
return (status);
}
/*
* 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
* @ref 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 @a ppList is NULL or
* specifies a
* memory area to which data cannot be written.
*/
IMA_OID_LIST **ppList) {
IMA_UINT i;
IMA_UINT j;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
// Get total id count first
totalIdCount = 0;
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_GetLhbaOidList");
#else
"IMA_GetLhbaOidList");
#endif
if (status == IMA_STATUS_SUCCESS) {
#ifdef WIN32
plugintable[i].hPlugin,
"IMA_FreeMemory");
#else
"IMA_FreeMemory");
#endif
}
}
}
}
if (status != IMA_STATUS_SUCCESS) {
break;
}
}
return (IMA_ERROR_UNEXPECTED_OS_ERROR);
}
// 2nd pass to copy the id lists
totalIdCount = 0;
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_GetLhbaOidList");
#else
"IMA_GetLhbaOidList");
#endif
if (status == IMA_STATUS_SUCCESS) {
for (j = 0;
(totalIdCount <
j++) {
ownerId =
totalIdCount++;
}
#ifdef WIN32
plugintable[i].hPlugin,
"IMA_FreeMemory");
#else
"IMA_FreeMemory");
#endif
}
}
}
}
if (status != IMA_STATUS_SUCCESS) {
break;
}
}
return (status);
}
/*
* Gets the properties of the specified logical HBA.
*
* @param lhbaId The object ID of the LHBA whose properties are being
* retrieved.
* @param pProps A pointer to an @ref IMA_LHBA_PROPERTIES structure.
* On successful
* return this will contain the properties of the LHBA specified by
* @a lhbaId.
* @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 @a pProps is NULL or
* specify a memory area to which data cannot be written.
* @retval IMA_ERROR_INVALID_OBJECT_TYPE Returned if @a lhbaId does not
* specify any valid object type.
* @retval IMA_ERROR_INCORRECT_OBJECT_TYPE Returned if @a lhbaId does not
* specify a LHBA.
* @retval IMA_ERROR_OBJECT_NOT_FOUND Returned if @a lhbaId does not
* specify a LHBA which is currently known to the system.
*/
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_GetLhbaProperties");
#else
"IMA_GetLhbaProperties");
#endif
}
}
break;
}
}
return (status);
}
/*
* Gets a list of the object IDs of all the physical 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
* @ref 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 ID list has been successfully
* returned.
* @retval IMA_ERROR_INVALID_PARAMETER Returned if @a ppList is NULL or
* specify a memory area to which data cannot be written.
* @retval IMA_SUCCESS Returned if the properties of the specified PHBA
* have been successfully retrieved.
* @retval IMA_ERROR_OBJECT_NOT_FOUND Returned if @a phbaId does not
* specify a PHBA which is currently known to the system.
* @retval IMA_ERROR_INVALID_PARAMETER Returned if @a ppList is NULL or
* specify a memory area to which data cannot be written.
*/
IMA_OID_LIST **ppList) {
IMA_UINT i;
IMA_UINT j;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
// Get total id count first
totalIdCount = 0;
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_GetPhbaOidList");
#else
"IMA_GetPhbaOidList");
#endif
if (status == IMA_STATUS_SUCCESS) {
#ifdef WIN32
plugintable[i].hPlugin,
"IMA_FreeMemory");
#else
"IMA_FreeMemory");
#endif
}
}
}
}
if (status != IMA_STATUS_SUCCESS) {
break;
}
}
return (IMA_ERROR_UNEXPECTED_OS_ERROR);
}
// 2nd pass to copy the id lists
totalIdCount = 0;
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_GetPhbaOidList");
#else
"IMA_GetPhbaOidList");
#endif
if (status == IMA_STATUS_SUCCESS) {
for (j = 0;
(totalIdCount <
j++) {
ownerId =
totalIdCount++;
}
#ifdef WIN32
(plugintable[i].hPlugin,
"IMA_FreeMemory");
#else
"IMA_FreeMemory");
#endif
}
}
}
}
if (status != IMA_STATUS_SUCCESS) {
break;
}
}
return (status);
}
/*
* Gets the general properties of a physical HBA.
*
* @param phbaId 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 @a phbaId.
* @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 @a pProps is NULL or specifies a
* memory area to which data cannot be written.
* @retval IMA_ERROR_INVALID_OBJECT_TYPE Returned
* if @a phbaId does not specify any
* valid object type.
* @retval IMA_ERROR_INCORRECT_OBJECT_TYPE Returned
* if @a phbaId does not specify a
* PHBA.
* @retval IMA_ERROR_OBJECT_NOT_FOUND Returned
* if @a phbaId does not specify a PHBA
* which is currently known to the system.
*/
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_GetPhbaProperties");
#else
"IMA_GetPhbaProperties");
#endif
}
}
break;
}
}
return (status);
}
/*
* Frees a previously allocated IMA_OID_LIST structure.
*
* @param pList A pointer to an @ref 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 @a pList is NULL or specifies a
* memory area from which data cannot be read.
*/
void *pMemory) {
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_STATUS_SUCCESS);
}
IMA_OID_LIST **ppList) {
IMA_UINT i;
IMA_UINT j;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
// Get total id count first
totalIdCount = 0;
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_GetNonSharedNodeOidList");
#else
"IMA_GetNonSharedNodeOidList");
#endif
if (status == IMA_STATUS_SUCCESS) {
#ifdef WIN32
plugintable[i].hPlugin,
"IMA_FreeMemory");
#else
"IMA_FreeMemory");
#endif
}
}
}
}
if (status != IMA_STATUS_SUCCESS) {
break;
}
}
return (IMA_ERROR_UNEXPECTED_OS_ERROR);
}
// 2nd pass to copy the id lists
totalIdCount = 0;
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_GetNonSharedNodeOidList");
#else
"IMA_GetNonSharedNodeOidList");
#endif
if (status == IMA_STATUS_SUCCESS) {
for (j = 0;
(totalIdCount < (
j++) {
ownerId =
totalIdCount++;
}
#ifdef WIN32
plugintable[i].hPlugin,
"IMA_FreeMemory");
#else
"IMA_FreeMemory");
#endif
}
}
}
}
if (status != IMA_STATUS_SUCCESS) {
break;
}
}
return (status);
}
/*
* Gets the first burst length properties of
* the specified logical HBA.
*
* @param lhbaId The object ID of the logical HBA
* to get the first burst length
* properties of.
* structure.
* @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 @a pProps is NULL or specifies a
* memory area to which data cannot be written.
* @retval IMA_ERROR_INVALID_OBJECT_TYPE Returned
* if @a lhbaId does not specify any
* valid object type.
* @retval IMA_ERROR_INCORRECT_OBJECT_TYPE Returned
* if @a lhbaId does not specify a LHBA.
* @retval IMA_ERROR_OBJECT_NOT_FOUND Returned
* @a lhbaId does not specify a LHBA
* which is currently known to the system.
*/
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
PassFunc =
"IMA_GetFirstBurstLengthProperties");
#else
PassFunc =
"IMA_GetFirstBurstLengthProperties");
#endif
}
}
break;
}
}
return (status);
}
/*
* Gets the max burst length properties of the
* specified logical HBA.
*
* @param lhbaId The object ID of the logical HBA to
* get the max burst 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
* 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 @a pProps is NULL or specifies a
* memory area to which data cannot be written.
* @retval IMA_ERROR_INVALID_OBJECT_TYPE Returned
* if @a lhbaId does not specify any
* valid object type.
* @retval IMA_ERROR_INCORRECT_OBJECT_TYPE Returned
* if @a lhbaId does not specify a HBA.
* @retval IMA_ERROR_OBJECT_NOT_FOUND Returned
* if @a lhbaId does not specify a LHBA
* which is currently known to the system.
*/
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
PassFunc =
"IMA_GetMaxBurstLengthProperties");
#else
PassFunc =
"IMA_GetMaxBurstLengthProperties");
#endif
}
}
break;
}
}
return (status);
}
/*
* Gets the maximum receive data segment length properties
* of the specified logical HBA.
*
* @param lhbaId 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
* @a pProps is NULL or specifies a
* memory area to which data cannot be written.
* @retval IMA_ERROR_INVALID_OBJECT_TYPE Returned if
* @a lhbaId does not specify any
* valid object type.
* @retval IMA_ERROR_INCORRECT_OBJECT_TYPE Returned if
* a lhbaId does not specify a LHBA.
* @retval IMA_ERROR_OBJECT_NOT_FOUND Returned if @a
* lhbaId does not specify a LHBA
* which is currently known to the system.
*/
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
PassFunc =
#else
PassFunc =
#endif
}
}
break;
}
}
return (status);
}
/* --------------------------------------------- */
const void *pInputBuffer,
void *pOutputBuffer,
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
*pOutputBufferLength == 0)
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_PluginIOCtl");
#else
"IMA_PluginIOCtl");
#endif
}
}
break;
}
}
return (status);
}
IMA_OID_LIST **ppList) {
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_GetNetworkPortalOidList");
#else
"IMA_GetNetworkPortalOidList");
#endif
listSize = sizeof (IMA_OID_LIST);
if (IMA_SUCCESS(status)) {
*ppList = (IMA_OID_LIST*)
calloc(1,
sizeof (IMA_OID_LIST)
+ (ppOidList->
oidCount - 1)*
sizeof (IMA_OID));
return (EUOS_ERROR);
}
else
+ (ppOidList->
oidCount - 1)*
sizeof (IMA_OID));
#ifdef WIN32
plugintable[i].hPlugin,
"IMA_FreeMemory");
#else
plugintable[i].hPlugin,
"IMA_FreeMemory");
#endif
}
}
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_SetFirstBurstLength");
#else
plugintable[i].hPlugin,
"IMA_SetFirstBurstLength");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_SetMaxBurstLength");
#else
"IMA_SetMaxBurstLength");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
PassFunc =
"IMA_SetMaxRecvDataSegmentLength");
#else
PassFunc =
"IMA_SetMaxRecvDataSegmentLength");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
PassFunc =
"IMA_GetMaxConnectionsProperties");
#else
PassFunc =
"IMA_GetMaxConnectionsProperties");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_SetMaxConnections");
#else
"IMA_SetMaxConnections");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
PassFunc =
"IMA_GetDefaultTime2RetainProperties");
#else
PassFunc =
"IMA_GetDefaultTime2RetainProperties");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
PassFunc =
"IMA_SetDefaultTime2Retain");
#else
PassFunc =
"IMA_SetDefaultTime2Retain");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
PassFunc =
"IMA_GetDefaultTime2WaitProperties");
#else
PassFunc =
"IMA_GetDefaultTime2WaitProperties");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
PassFunc =
"IMA_SetDefaultTime2Wait");
#else
PassFunc =
"IMA_SetDefaultTime2Wait");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
PassFunc =
"IMA_GetMaxOutstandingR2TProperties");
#else
PassFunc =
"IMA_GetMaxOutstandingR2TProperties");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
PassFunc =
"IMA_SetMaxOutstandingR2T");
#else
PassFunc =
"IMA_SetMaxOutstandingR2T");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
PassFunc =
"IMA_GetErrorRecoveryLevelProperties");
#else
PassFunc =
"IMA_GetErrorRecoveryLevelProperties");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
PassFunc =
"IMA_SetErrorRecoveryLevel");
#else
PassFunc =
"IMA_SetErrorRecoveryLevel");
#endif
}
}
break;
}
}
return (status);
}
IMA_BOOL_VALUE *pProps) {
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
PassFunc =
"IMA_GetInitialR2TProperties");
#else
PassFunc =
"IMA_GetInitialR2TProperties");
#endif
}
}
break;
}
}
return (status);
}
{
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
if (initialR2T != IMA_TRUE &&
initialR2T != IMA_FALSE)
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
PassFunc =
plugintable[i].hPlugin,
"IMA_SetInitialR2T");
#else
PassFunc =
"IMA_SetInitialR2T");
#endif
}
}
break;
}
}
return (status);
}
IMA_BOOL_VALUE *pProps) {
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
PassFunc =
"IMA_GetImmediateDataProperties");
#else
PassFunc =
"IMA_GetImmediateDataProperties");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
if (immediateData != IMA_TRUE &&
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
PassFunc =
"IMA_SetImmediateData");
#else
PassFunc =
"IMA_SetImmediateData");
#endif
}
}
break;
}
}
return (status);
}
IMA_BOOL_VALUE *pProps) {
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
PassFunc =
"IMA_GetDataPduInOrderProperties");
#else
PassFunc =
"IMA_GetDataPduInOrderProperties");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
if (dataPduInOrder != IMA_TRUE &&
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
PassFunc =
"IMA_SetDataPduInOrder");
#else
PassFunc =
"IMA_SetDataPduInOrder");
#endif
}
}
break;
}
}
return (status);
}
IMA_BOOL_VALUE *pProps) {
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
PassFunc =
"IMA_GetDataSequenceInOrderProperties");
#else
PassFunc =
"IMA_GetDataSequenceInOrderProperties");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
if (dataSequenceInOrder != IMA_TRUE &&
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
PassFunc =
"IMA_SetDataSequenceInOrder");
#else
PassFunc =
"IMA_SetDataSequenceInOrder");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
if (enableStatisticsCollection != IMA_TRUE &&
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
PassFunc =
"IMA_SetStatisticsCollection");
#else
PassFunc =
"IMA_SetStatisticsCollection");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
PassFunc =
"IMA_GetNetworkPortStatus");
#else
PassFunc =
"IMA_GetNetworkPortStatus");
#endif
}
}
break;
}
}
return (status);
}
IMA_OID_LIST **ppList) {
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
PassFunc =
"IMA_GetTargetOidList");
#else
PassFunc =
"IMA_GetTargetOidList");
#endif
listSize = sizeof (IMA_OID_LIST);
if (IMA_SUCCESS(status)) {
*ppList =
sizeof (IMA_OID_LIST) +
sizeof (IMA_OID)));
return (EUOS_ERROR);
}
else
+ (ppOidList->
oidCount - 1)*
sizeof (IMA_OID));
#ifdef WIN32
plugintable[i].hPlugin,
"IMA_FreeMemory");
#else
plugintable[i].hPlugin,
"IMA_FreeMemory");
#endif
}
}
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_RemoveStaleData");
#else
"IMA_RemoveStaleData");
#endif
}
}
break;
}
}
return (status);
}
const IMA_HOST_ID *iSnsHost) {
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
if (enableIsnsDiscovery != IMA_TRUE &&
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
}
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
PassFunc =
"IMA_SetIsnsDiscovery");
#else
PassFunc =
"IMA_SetIsnsDiscovery");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
if (enableSlpDiscovery != IMA_TRUE &&
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
PassFunc =
"IMA_SetSlpDiscovery");
#else
"IMA_SetSlpDiscovery");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
if (enableStaticDiscovery != IMA_TRUE &&
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_SetStaticDiscovery");
#else
"IMA_SetStaticDiscovery");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
if (enableSendTargetsDiscovery != IMA_TRUE &&
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
}
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_SetSendTargetsDiscovery");
#else
"IMA_SetSendTargetsDiscovery");
#endif
}
plugintable[i].pluginMutex);
}
break;
}
}
return (status);
}
/*
* this forces plugins to rescan all iscsi targets on this
* list of discovered targets.
* according to IMA spec., pTargetOidList is allocated by
* the caller for library to return data,
* how does a caller know how much space it will be?
* like IMA_GetLnpOidList
*/
const IMA_TARGET_ADDRESS targetAddress,
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
PassFunc =
"IMA_AddPhbaStaticDiscoveryTarget");
#else
PassFunc =
"IMA_AddPhbaStaticDiscoveryTarget");
#endif
listSize =
sizeof (IMA_OID_LIST);
if (IMA_SUCCESS(status)) {
(*pTargetOidList) =
(IMA_OID_LIST*)
sizeof (IMA_OID));
if ((*pTargetOidList) == NULL) {
status =
}
memcpy((*pTargetOidList),
listSize +
sizeof (IMA_OID));
#ifdef WIN32
plugintable[i].hPlugin,
"IMA_FreeMemory");
#else
plugintable[i].hPlugin,
"IMA_FreeMemory");
#endif
}
}
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
PassFunc =
"IMA_RemovePhbaStaticDiscoveryTarget");
#else
PassFunc =
"IMA_RemovePhbaStaticDiscoveryTarget");
#endif
}
}
break;
}
}
return (status);
}
IMA_OID_LIST **ppList) {
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_GetPnpOidList");
#else
"IMA_GetPnpOidList");
#endif
if (IMA_SUCCESS(status)) {
listSize =
sizeof (IMA_OID_LIST);
*ppList = (IMA_OID_LIST*)
sizeof (IMA_OID));
status =
}
else
listSize +
(ppOidList->
oidCount - 1)*
sizeof (IMA_OID));
#ifdef WIN32
plugintable[i].hPlugin,
"IMA_FreeMemory");
#else
plugintable[i].hPlugin,
"IMA_FreeMemory");
#endif
}
}
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
PassFunc =
"IMA_GetPhbaDownloadProperties");
#else
"IMA_GetPhbaDownloadProperties");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_IsPhbaDownloadFile");
#else
"IMA_IsPhbaDownloadFile");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
if (imageType != IMA_DOWNLOAD_IMAGE_TYPE_FIRMWARE &&
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INVALID_PARAMETER);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_PhbaDownload");
#else
"IMA_PhbaDownload");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
PassFunc =
"IMA_GetNetworkPortalProperties");
#else
PassFunc =
"IMA_GetNetworkPortalProperties");
#endif
}
}
break;
}
}
return (status);
}
const IMA_IP_ADDRESS NewIpAddress) {
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
PassFunc =
"IMA_SetNetworkPortalIpAddress");
#else
"IMA_SetNetworkPortalIpAddress");
#endif
}
}
break;
}
}
return (status);
}
IMA_OID_LIST **ppList) {
IMA_UINT i;
IMA_UINT j;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
// Get total id count first
totalIdCount = 0;
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_GetLnpOidList");
#else
"IMA_GetLnpOidList");
#endif
if (status == IMA_STATUS_SUCCESS) {
#ifdef WIN32
plugintable[i].hPlugin,
"IMA_FreeMemory");
#else
"IMA_FreeMemory");
#endif
}
}
}
}
if (status != IMA_STATUS_SUCCESS) {
break;
}
}
return (IMA_ERROR_UNEXPECTED_OS_ERROR);
}
// 2nd pass to copy the id lists
totalIdCount = 0;
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_GetLnpOidList");
#else
"IMA_GetLnpOidList");
#endif
if (status == IMA_STATUS_SUCCESS) {
(totalIdCount <
j++) {
ownerId =
totalIdCount++;
}
#ifdef WIN32
plugintable[i].hPlugin,
"IMA_FreeMemory");
#else
"IMA_FreeMemory");
#endif
}
}
}
}
if (status != IMA_STATUS_SUCCESS) {
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_GetLnpProperties");
#else
"IMA_GetLnpProperties");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_GetPnpProperties");
#else
"IMA_GetPnpProperties");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_GetPnpStatistics");
#else
"IMA_GetPnpStatistics");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_GetTargetProperties");
#else
"IMA_GetTargetProperties");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_GetSessionProperties");
#else
"IMA_GetSessionProperties");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_GetConnectionProperties");
#else
"IMA_GetConnectionProperties");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_GetTargetErrorStatistics");
#else
"IMA_GetTargetErrorStatistics");
#endif
}
}
break;
}
}
return (status);
}
IMA_OID_LIST **ppList) {
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_GetLuOidList");
#else
"IMA_GetLuOidList");
#endif
if (IMA_SUCCESS(status)) {
listSize =
sizeof (IMA_OID_LIST);
*ppList = (IMA_OID_LIST*)
sizeof (IMA_OID));
status = EUOS_ERROR;
}
else
listSize +
(ppOidList->
oidCount - 1)*
sizeof (IMA_OID));
#ifdef WIN32
plugintable[i].hPlugin,
"IMA_FreeMemory");
#else
plugintable[i].hPlugin,
"IMA_FreeMemory");
#endif
}
}
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
plugintable[i].pluginMutex);
#ifdef WIN32
plugintable[i].hPlugin,
"IMA_GetLuOid");
#else
"IMA_GetLuOid");
#endif
status =
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_GetLuProperties");
#else
"IMA_GetLuProperties");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
PassFunc =
"IMA_GetStatisticsProperties");
#else
PassFunc =
"IMA_GetStatisticsProperties");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
PassFunc =
"IMA_GetDeviceStatistics");
#else
PassFunc =
"IMA_GetDeviceStatistics");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
*pOutputBufferLength == 0 ||
*pSenseBufferLength != 0))
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_LuInquiry");
#else
"IMA_LuInquiry");
#endif
status =
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
*pOutputBufferLength == 0) ||
*pSenseBufferLength != 0))
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_LuReadCapacity");
#else
"IMA_LuReadCapacity");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
*pOutputBufferLength == 0) ||
*pSenseBufferLength != 0))
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_LuReportLuns");
#else
"IMA_LuReportLuns");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_ExposeLu");
#else
"IMA_ExposeLu");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_UnexposeLu");
#else
"IMA_UnexposeLu");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_GetPhbaStatus");
#else
"IMA_GetPhbaStatus");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
IMA_UINT j;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
for (i = 0; i < number_of_plugins; i++) {
if (plugintable[i].number_of_vbcallbacks >=
continue;
}
/* check if registered already */
for (j = 0;
j < plugintable[i].number_of_vbcallbacks; j++) {
break;
}
}
if (status != IMA_STATUS_SUCCESS) {
#ifdef WIN32
PassFunc =
"IMA_RegisterForObjectVisibilityChanges");
#else
PassFunc =
"IMA_RegisterForObjectVisibilityChanges");
#endif
if (status == IMA_STATUS_SUCCESS) {
j = plugintable[i].
plugintable[i].vbcallback[j] =
plugintable[i].
}
}
}
}
if (status != IMA_STATUS_SUCCESS)
break;
}
return (status);
}
IMA_UINT i;
IMA_UINT j;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
for (i = 0; i < number_of_plugins; i++) {
/* check if deregistered already */
for (j = 0;
j < plugintable[i].number_of_vbcallbacks; j++) {
/*
* use IMA_ERROR_UNKNOWN_ERROR
* as a flag
*/
break;
}
}
if (status != IMA_STATUS_SUCCESS) {
#ifdef WIN32
PassFunc =
"IMA_DeregisterForObjectVisibilityChanges");
#else
PassFunc =
"IMA_DeregisterForObjectVisibilityChanges");
#endif
if (status == IMA_STATUS_SUCCESS) {
/*
* where plugintable[i].
* vbcallback[j] == pClientFn
*/
for (; j <
plugintable[i].
j++) {
plugintable[i].
vbcallback[j] =
plugintable[i].
vbcallback[j+1];
}
plugintable[i].
}
}
}
}
if (status != IMA_STATUS_SUCCESS)
break;
}
return (status);
}
IMA_UINT i;
IMA_UINT j;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
for (i = 0; i < number_of_plugins; i++) {
if (plugintable[i].number_of_pccallbacks >=
continue;
}
/* check if registered already */
for (j = 0;
j < plugintable[i].number_of_pccallbacks;
j++) {
if (plugintable[i].pccallback[j] ==
pClientFn) {
break;
}
}
if (status != IMA_STATUS_SUCCESS) {
#ifdef WIN32
PassFunc =
"IMA_RegisterForObjectPropertyChanges");
#else
PassFunc =
"IMA_RegisterForObjectPropertyChanges");
#endif
if (status == IMA_STATUS_SUCCESS) {
j = plugintable[i].
plugintable[i].pccallback[j] =
plugintable[i].
}
}
}
}
if (status != IMA_STATUS_SUCCESS)
break;
}
return (status);
}
IMA_UINT i;
IMA_UINT j;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
for (i = 0; i < number_of_plugins; i++) {
/* check if deregistered already */
for (j = 0;
j < plugintable[i].number_of_pccallbacks;
j++) {
if (plugintable[i].pccallback[j] ==
pClientFn) {
/*
* use IMA_ERROR_UNKNOWN_ERROR
* as a flag
*/
break;
}
}
if (status != IMA_STATUS_SUCCESS) {
#ifdef WIN32
PassFunc =
"IMA_DeregisterForObjectPropertyChanges");
#else
PassFunc =
"IMA_DeregisterForObjectPropertyChanges");
#endif
if (status == IMA_STATUS_SUCCESS) {
/*
* where plugintable[i].vbcallback[
* j] == pClientFn
*/
for (; j < plugintable[i].
j++) {
plugintable[i].
pccallback[j]
= plugintable[i].
pccallback[j+1];
}
plugintable[i].
}
}
}
}
if (status != IMA_STATUS_SUCCESS)
break;
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_GetIpProperties");
#else
"IMA_GetIpProperties");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
if (enableDhcpIpConfiguration != IMA_TRUE &&
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_SetIpConfigMethod");
#else
"IMA_SetIpConfigMethod");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_SetSubnetMask");
#else
"IMA_SetSubnetMask");
#endif
}
}
break;
}
}
return (status);
}
const IMA_IP_ADDRESS *alternateDnsServerAddress) {
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
if (primaryDnsServerAddress == NULL &&
return (IMA_ERROR_INVALID_PARAMETER);
if (primaryDnsServerAddress != NULL &&
sizeof (primaryDnsServerAddress->ipAddress)) == 0)
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_SetDnsServerAddress");
#else
"IMA_SetDnsServerAddress");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_SetDefaultGateway");
#else
"IMA_SetDefaultGateway");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
if (pMethodCount == NULL)
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_GetSupportedAuthMethods");
#else
"IMA_GetSupportedAuthMethods");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
if (pMethodCount == NULL)
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_GetInUseInitiatorAuthMethods");
#else
"IMA_GetInUseInitiatorAuthMethods");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
if (method != IMA_AUTHMETHOD_NONE &&
method != IMA_AUTHMETHOD_CHAP &&
method != IMA_AUTHMETHOD_SRP &&
method != IMA_AUTHMETHOD_KRB5 &&
method != IMA_AUTHMETHOD_SPKM1 &&
return (IMA_ERROR_INVALID_PARAMETER);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_GetInitiatorAuthParms");
#else
"IMA_GetInitiatorAuthParms");
#endif
}
}
break;
}
}
return (status);
}
const IMA_AUTHMETHOD *pMethodList) {
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_SetInitiatorAuthMethods");
#else
"IMA_SetInitiatorAuthMethods");
#endif
}
}
break;
}
}
return (status);
}
const IMA_INITIATOR_AUTHPARMS *pParms) {
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
if (method != IMA_AUTHMETHOD_NONE &&
method != IMA_AUTHMETHOD_CHAP &&
method != IMA_AUTHMETHOD_SRP &&
method != IMA_AUTHMETHOD_KRB5 &&
method != IMA_AUTHMETHOD_SPKM1 &&
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_SetInitiatorAuthParms");
#else
"IMA_SetInitiatorAuthParms");
#endif
status =
}
}
break;
}
}
return (status);
}
IMA_OID_LIST **ppList) {
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
PassFunc =
"IMA_GetStaticDiscoveryTargetOidList");
#else
PassFunc =
"IMA_GetStaticDiscoveryTargetOidList");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_GetDiscoveryProperties");
#else
"IMA_GetDiscoveryProperties");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_AddDiscoveryAddress");
#else
"IMA_AddDiscoveryAddress");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_AddStaticDiscoveryTarget");
#else
"IMA_AddStaticDiscoveryTarget");
#endif
}
}
break;
}
}
return (status);
}
{
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_CommitHbaParameters");
#else
"IMA_CommitHbaParameters");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_RemoveStaticDiscoveryTarget");
#else
"IMA_RemoveStaticDiscoveryTarget");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
if (plugintable[i].ownerId ==
#ifdef WIN32
PassFunc =
"IMA_GetStaticDiscoveryTargetProperties");
#else
PassFunc =
"IMA_GetStaticDiscoveryTargetProperties");
#endif
}
}
break;
}
}
return (status);
}
IMA_OID_LIST **ppList) {
IMA_UINT i;
IMA_UINT j;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
}
// Get total id count first
totalIdCount = 0;
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_GetDiscoveryAddressOidList");
#else
"IMA_GetDiscoveryAddressOidList");
#endif
if (status == IMA_STATUS_SUCCESS) {
totalIdCount +=
#ifdef WIN32
plugintable[i].hPlugin,
"IMA_FreeMemory");
#else
plugintable[i].hPlugin,
"IMA_FreeMemory");
#endif
}
}
}
}
if (status != IMA_STATUS_SUCCESS) {
break;
}
}
}
return (IMA_ERROR_UNEXPECTED_OS_ERROR);
}
// 2nd pass to copy the id lists
totalIdCount = 0;
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_GetDiscoveryAddressOidList");
#else
"IMA_GetDiscoveryAddressOidList");
#endif
if (status == IMA_STATUS_SUCCESS) {
for (j = 0;
(totalIdCount <
j++) {
[totalIdCount].
= OBJ_SEQ_NUM;
ownerId =
totalIdCount++;
}
#ifdef WIN32
plugintable[i].hPlugin,
"IMA_FreeMemory");
#else
plugintable[i].hPlugin,
"IMA_FreeMemory");
#endif
}
}
}
}
if (status != IMA_STATUS_SUCCESS) {
break;
}
}
}
return (status);
}
IMA_OID_LIST **ppList) {
IMA_UINT i;
IMA_UINT j;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
}
// Get total id count first
totalIdCount = 0;
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_GetSessionOidList");
#else
"IMA_GetSessionOidList");
#endif
if (status == IMA_STATUS_SUCCESS) {
totalIdCount +=
#ifdef WIN32
plugintable[i].hPlugin,
"IMA_FreeMemory");
#else
plugintable[i].hPlugin,
"IMA_FreeMemory");
#endif
}
}
}
}
if (status != IMA_STATUS_SUCCESS) {
break;
}
}
}
return (IMA_ERROR_UNEXPECTED_OS_ERROR);
}
// 2nd pass to copy the id lists
totalIdCount = 0;
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_GetSessionOidList");
#else
"IMA_GetSessionOidList");
#endif
if (status == IMA_STATUS_SUCCESS) {
for (j = 0;
(totalIdCount <
j++) {
= OBJ_SEQ_NUM;
ownerId =
totalIdCount++;
}
#ifdef WIN32
plugintable[i].hPlugin,
"IMA_FreeMemory");
#else
plugintable[i].hPlugin,
"IMA_FreeMemory");
#endif
}
}
}
}
if (status != IMA_STATUS_SUCCESS) {
break;
}
}
}
return (status);
}
IMA_OID_LIST **ppList) {
IMA_UINT i;
IMA_UINT j;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
}
// Get total id count first
totalIdCount = 0;
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_GetConnectionOidList");
#else
"IMA_GetConnectionOidList");
#endif
if (status == IMA_STATUS_SUCCESS) {
totalIdCount +=
#ifdef WIN32
plugintable[i].hPlugin,
"IMA_FreeMemory");
#else
plugintable[i].hPlugin,
"IMA_FreeMemory");
#endif
}
}
}
}
if (status != IMA_STATUS_SUCCESS) {
break;
}
}
}
return (IMA_ERROR_UNEXPECTED_OS_ERROR);
}
// 2nd pass to copy the id lists
totalIdCount = 0;
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_GetConnectionOidList");
#else
"IMA_GetConnectionOidList");
#endif
if (status == IMA_STATUS_SUCCESS) {
for (j = 0; (
(totalIdCount <
j++) {
(*ppList)->
oids[j].objectType;
(*ppList)->
= OBJ_SEQ_NUM;
(*ppList)->
ownerId =
totalIdCount++;
}
#ifdef WIN32
plugintable[i].hPlugin,
"IMA_FreeMemory");
#else
plugintable[i].hPlugin,
"IMA_FreeMemory");
#endif
}
}
}
}
if (status != IMA_STATUS_SUCCESS) {
break;
}
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
if (discoveryAddressOid.objectType !=
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
}
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_RemoveDiscoveryAddress");
#else
"IMA_RemoveDiscoveryAddress");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
}
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
"IMA_GetIpsecProperties");
#else
"IMA_GetIpsecProperties");
#endif
}
}
break;
}
}
return (status);
}
IMA_ADDRESS_KEYS **ppKeys) {
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
PassFunc =
plugintable[i].hPlugin,
"IMA_GetAddressKeys");
#else
plugintable[i].hPlugin,
"IMA_GetAddressKeys");
#endif
addrSize = sizeof (IMA_ADDRESS_KEYS);
status =
if (IMA_SUCCESS(status)) {
*ppKeys =
addrSize +
- 1) * addrSize);
status = EUOS_ERROR;
} else {
addrSize +
(ppKeysList->
addressKeyCount-1)*
addrSize);
}
#ifdef WIN32
plugintable[i].hPlugin,
"IMA_FreeMemory");
#else
plugintable[i].hPlugin,
"IMA_FreeMemory");
#endif
}
}
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
return (IMA_ERROR_INVALID_PARAMETER);
return (IMA_ERROR_INCORRECT_OBJECT_TYPE);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
PassFunc =
plugintable[i].hPlugin,
"IMA_GetDiscoveryAddressProperties");
#else
PassFunc =
plugintable[i].hPlugin,
"IMA_GetDiscoveryAddressProperties");
#endif
}
}
break;
}
}
return (status);
}
IMA_UINT i;
if (number_of_plugins == -1)
InitLibrary();
if (interval <= 1)
return (IMA_ERROR_INVALID_PARAMETER);
(pluginOid.objectSequenceNumber != 0))
return (IMA_ERROR_INVALID_PARAMETER);
for (i = 0; i < number_of_plugins; i++) {
#ifdef WIN32
plugintable[i].hPlugin,
"QIMA_SetUpdateInterval");
#else
plugintable[i].hPlugin,
"QIMA_SetUpdateInterval");
#endif
}
}
break;
}
}
return (status);
}