fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Description
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * ImaLib.c - Implements a sample common IMA library
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * The contents of this file are subject to the SNIA Public License
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Version 1.0(the "License"); you may not use this file except in
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * compliance with the License. You may obtain a copy of the License at
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * /http://www.snia.org/English/Resources/Code/OpenSource.html
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Software distributed under the License is distributed on an "AS IS"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * the License for the specific language governing rights and limitations
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * under the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * The Original Code is SNIA HBA API and IMA general header file
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * The Initial Developer of the Original Code is:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Benjamin F. Kuo, Troika Networks, Inc. (benk@troikanetworks.com)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * David Dillard VERITAS Software david.dillard@veritas.com
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Contributor(s):
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Jeff Ding, Adaptec, Inc. (jding@corp.adaptec.com)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * 09/24/2003 Initial Draft
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * (for other changes... see the CVS logs)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * 12/15/2003 corrected the defined parameter in IMA_SetPhbaIsnsDiscovery().
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * lower case the computer name as iscsi name in IMA_GenerateNodeName().
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * 01/21/2005 Updated to support IMA 1.1.3.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte// #include <sys/sem.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte// #include <sys/ipc.h>
aff4bce51ecc47df7e5a6351b7cee6bc20408c63yi zhang - Sun Microsystems - Beijing China#include "libsun_ima.h"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define LIBRARY_PROPERTY_IMPLEMENTATION_VERSION L"1.0.2"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define DEFAULT_NODE_NAME_FORMAT "iqn.1986-03.com.sun.central.%s"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* Linux only */
aff4bce51ecc47df7e5a6351b7cee6bc20408c63yi zhang - Sun Microsystems - Beijing ChinaIMA_PLUGIN_INFO plugintable[IMA_MAX_NUM_PLUGINS];
aff4bce51ecc47df7e5a6351b7cee6bc20408c63yi zhang - Sun Microsystems - Beijing Chinaint number_of_plugins = -1;
aff4bce51ecc47df7e5a6351b7cee6bc20408c63yi zhang - Sun Microsystems - Beijing Chinaint libMutex = -1;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void libSwprintf(wchar_t *wcs, const wchar_t *lpszFormat, ...) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* Begin implementation */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte // InitLibrary();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic IMA_STATUS getSolarisNodeProps(IMA_NODE_PROPERTIES *nodeProps);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic IMA_STATUS getSolarisSharedNodeName(IMA_NODE_NAME name);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic IMA_STATUS getSolarisSharedNodeAlias(IMA_NODE_ALIAS alias);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic IMA_STATUS setSolarisSharedNodeName(const IMA_NODE_NAME name);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic IMA_STATUS setSolarisSharedNodeAlias(const IMA_NODE_ALIAS alias);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic IMA_STATUS getSolarisNodeProps(IMA_NODE_PROPERTIES *nodeProps) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetNodeProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic IMA_STATUS getSolarisSharedNodeName(IMA_NODE_NAME name) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte bcopy(&nodeProps.name, name, sizeof (IMA_NODE_NAME));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic IMA_STATUS getSolarisSharedNodeAlias(IMA_NODE_ALIAS alias) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte bcopy(&nodeProps.alias, alias, sizeof (IMA_NODE_ALIAS));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic IMA_STATUS setSolarisSharedNodeName(const IMA_NODE_NAME name) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (IMA_SetNodeNameFn) dlsym(plugintable[i].hPlugin,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetNodeName");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic IMA_STATUS setSolarisSharedNodeAlias(const IMA_NODE_ALIAS alias) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (IMA_SetNodeAliasFn) dlsym(plugintable[i].hPlugin,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetNodeAlias");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * add code in .init and .fini,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * "__attribute__ ((constructor))" and "__attribute__ ((destructor))"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * are used with gcc
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte struct semid_ds *bf; /* buffer for IPC_STAT, IPC_SET */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte unsigned short int *array; /* array for GETALL, SETALL */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* Create the semaphore. Return 1 if successful, 0 otherwise */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *semid = retVal; /* save key of created semaphore */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte sem_union.val = 1; /* start semaphore off signaled */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* Destroy the SNMP semaphore. */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte char fullline[512]; /* Full line read in from IMA.conf */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte char pluginname[64]; /* Read in from file IMA.conf */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte char pluginpath[256]; /* Read in from file IMA.conf */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* Open configuration file from known location */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (GetSystemDirectory(systemPath, sizeof (systemPath)))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte sprintf(imaConfFilePath, "%s\\drivers\\etc\\ima.conf",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if ((imaconf = fopen(imaConfFilePath, "r")) == NULL) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* Read in each line and load library */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if ((fullline[0] != '#') && (fullline[0] != '\n')) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* Take out the '\n' */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if ((charPtr = (char *)strchr(fullline, '\n')) != NULL)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* look for the first tab */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if ((charPtr = (char *)strchr(fullline, '\t')) == NULL)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* Set Null termination for library name if found */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Skip spaces and tabs until
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * the next character found
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte continue; /* May be invalid entry */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* Copy library name and path */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Continue to the next line if library name or
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * path is invalid
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* Load the DLL now */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte plugintable[i].hPlugin = LoadLibrary(pluginpath);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* Load the DLL now */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte plugintable[i].hPlugin = dlopen(pluginpath, RTLD_LAZY);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (j = 0; j < plugintable[i].number_of_vbcallbacks;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define IMA_DFOBC_STR "IMA_DeregisterForObjectVisibilityChangesFn"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (j = 0; j < plugintable[i].number_of_pccallbacks;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_DeregisterForObjectPropertyChangesFn");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_DeregisterForObjectPropertyChangesFn");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* Unload DLL from memory */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* Unload DLL from memory */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Gets the date and time, in the form of an IMA_DATETIME, from the build
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * script when compiled.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void GetBuildTime(IMA_DATETIME* pdatetime) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte char *dayToken[] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte char *monthToken[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte sscanf(__TIME__, "%u:%u:%u", &pdatetime->tm_hour,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < 7; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < 12; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (strptime(BUILD_DATE, "%Y/%m/%d %T %Z", pdatetime) == NULL) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Gets the properties of the IMA library that is being used.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @param pProps A pointer to an @ref IMA_LIBRARY_PROPERTIES structure
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * allocated by the caller. On successful return this structure will
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * contain the properties of the IMA library.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @return An IMA_STATUS indicating if the operation was successful or if
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * an error occurred.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_SUCCESS Returned if the library properties were successfully
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_INVALID_PARAMETER Returned if @a pProps is NULL or
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * specifies a memory area to which data cannot be written.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte // Fill in the library properties.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte pProps->supportedImaVersion = LIBRARY_PROPERTY_SUPPORTED_IMA_VERSION;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte libSwprintf(pProps->implementationVersion, L"%ls",
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte libSwprintf(pProps->vendor, L"%ls", LIBRARY_PROPERTY_VENDOR);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte libSwprintf(pProps->fileName, LIBRARY_FILE_NAME);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte // mbstowcs(pProps->fileName, imaPath, 256);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Gets a list of the object IDs of all currently loaded plugins.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @param ppList A pointer to a pointer to an @ref IMA_OID_LIST.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * On successful return this will contain a pointer to an @ref
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * IMA_OID_LIST which contains the object IDs of all of the plugins
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * currently loaded by the library.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @return An IMA_STATUS indicating if the operation was successful
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * or if an error occurred.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_SUCCESS Returned if the plugin ID list was successfully
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_INVALID_PARAMETER Returned if @a ppList is NULL or
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * specifies a memory area to which data cannot be written.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *ppList = (IMA_OID_LIST*)calloc(1, sizeof (IMA_OID_LIST) +
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (*ppList)->oids[i].objectType = IMA_OBJECT_TYPE_PLUGIN;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (*ppList)->oids[i].ownerId = plugintable[i].ownerId;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Gets the properties of the specified vendor plugin.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @param pluginId The ID of the plugin whose properties are being retrieved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @param pProps A pointer to an @ref IMA_PLUGIN_PROPERTIES structure
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * allocated by the caller. On successful return this will contain the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * properties of the plugin specified by pluginId.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @return An IMA_STATUS indicating if the operation was successful or if
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * an error occurred.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_SUCCESS Returned if the plugin properties were successfully
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_INVALID_OBJECT_TYPE Returned if @a pluginId does not
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * specify any valid object type.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_INCORRECT_OBJECT_TYPE Returned if @a pluginId does not
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * specify a plugin object.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_OBJECT_NOT_FOUND Returned if @a pluginId refers to a
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * plugin, but not one that is currently loaded.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_INVALID_PARAMETER Returned if @a pProps is NULL or
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * specify a memory area to which data cannot be written.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if ((pluginOid.objectType != IMA_OBJECT_TYPE_PLUGIN) ||
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (plugintable[i].ownerId == pluginOid.ownerId) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetPluginProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetPluginProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Gets the object ID for the plugin associated with the specified object ID.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @param objectId The object ID of an object that has been received from
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * a previous library call.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @param pPluginId A pointer to an @ref IMA_OID structure allocated by the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * caller. On successful return this will contain the object ID of the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * plugin associated with the object specified by @a objectId. This
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * can then be used to work with the plugin, e.g., to get the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * properties of the plugin or the send the plugin an IOCtl.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @return An IMA_STATUS indicating if the operation was successful or if
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * an error occurred.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_SUCCESS Returned if the associated plugin ID was
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * successfully returned.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_INVALID_PARAMETER Returned if @a pPluginId is NULL
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * or specifes a memory area to which data cannot be written.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_INVALID_PARAMETER Returned if @a objectId specifies
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * an object not owned by a plugin, but instead one that is owned by
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * the library.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_INVALID_OBJECT_TYPE Returned if @a objectId specifies
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * an object with an invalid type.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (pPluginId == NULL || objectId.ownerId == RL_LIBRARY_SEQNUM)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (objectId.objectType != IMA_OBJECT_TYPE_UNKNOWN &&
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte objectId.objectType != IMA_OBJECT_TYPE_NETWORK_PORTAL &&
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte objectId.objectType != IMA_OBJECT_TYPE_PORTAL_GROUP &&
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte objectId.objectType != IMA_OBJECT_TYPE_DISCOVERY_ADDRESS &&
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte objectId.objectType != IMA_OBJECT_TYPE_STATIC_DISCOVERY_TARGET)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (objectId.ownerId == plugintable[i].ownerId) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Gets the object ID of the shared node.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @param pSharedNodeId A pointer to an @ref IMA_OID structure allocated by
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * the caller. On successful return it will contain the object ID of the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * shared node of the currently executing system is placed.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @return An IMA_STATUS indicating if the operation was successful or if
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * an error occurred.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_SUCCESS Returned if the shared node ID has been successfully
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * retrieved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_INVALID_PARAMETER Returned if @a pSharedNodeId is NULL
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * or specifies a memory area to which data cannot be written.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte pSharedNodeId->objectType = IMA_OBJECT_TYPE_NODE;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte pSharedNodeId->objectSequenceNumber = RL_SHARED_NODE_SEQNUM;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte oid.objectType != IMA_OBJECT_TYPE_NETWORK_PORTAL &&
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte oid.objectType != IMA_OBJECT_TYPE_PORTAL_GROUP &&
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte oid.objectType != IMA_OBJECT_TYPE_DISCOVERY_ADDRESS &&
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte oid.objectType != IMA_OBJECT_TYPE_STATIC_DISCOVERY_TARGET)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Gets the properties of the specified iSCSI node.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @param nodeId The ID of the node to get the properties of.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @param pProps A pointer to an @ref IMA_NODE_PROPERTIES structure
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * which on successfully return
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * will contain the properties of the specified node.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @return An IMA_STATUS indicating if the operation was successful or
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * if an error occurred.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_SUCCESS Returned if the node properties have been
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * successfully retrieved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_INVALID_PARAMETER Returned if @a pProps is NULL
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * or specifies a memory area to which data cannot be written.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_INVALID_OBJECT_TYPE Returned if @a nodeId does
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * not specify any valid object type.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_INCORRECT_OBJECT_TYPE Returned if @a nodeId does
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * not specify a node object.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_OBJECT_NOT_FOUND Returned if @a nodeId does not
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * specify a node which is currently known to the system.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte char fullline[512]; /* Full line read in from IMA.conf */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (nodeOid.objectSequenceNumber == RL_SHARED_NODE_SEQNUM)) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (sharedNodeName[0] == 0) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte sprintf(nodename, DEFAULT_NODE_NAME_FORMAT, fullline);
5d539a8e4ead06ddda1d7f0274efee3d06c20e22Matt Barden gethostname((char *)fullline, sizeof (fullline));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte sprintf(nodename, DEFAULT_NODE_NAME_FORMAT, fullline);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (sharedNodeName[0] != 0) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte libSwprintf(pProps->name, L"%ls", sharedNodeName);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte libSwprintf(pProps->alias, L"%ls", sharedNodeAlias);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetNodeProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetNodeProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Sets the name of the specified node.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @param nodeId The object ID of the node whose name is being set.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @param newName The new name of the node.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @return An IMA_STATUS indicating if the operation was successful or if
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * an error occurred.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_SUCCESS Returned if the node name was successfully changed.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_STATUS_REBOOT_NECESSARY Returned if a reboot is necessary
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * before the setting of the name actually takes affect.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_INVALID_PARAMETER Returned if @a newname is NULL, or
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * specifies a memory area to which data cannot be written, or has a
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * length of 0.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_INVALID_OBJECT_TYPE Returned if @a nodeId does not
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * specify any valid object type.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_INCORRECT_OBJECT_TYPE Returned if @a nodeId does not
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * specify a node object.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_OBJECT_NOT_FOUND Returned if @a nodeId does not specify a
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * node which is currently known to the system.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_NAME_TOO_LONG Returned if @a newName contains too many
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * characters.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (nodeOid.objectSequenceNumber == RL_SHARED_NODE_SEQNUM)) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (setSolarisSharedNodeName(newName) != IMA_STATUS_SUCCESS) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetNodeName");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetNodeName");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Generates an unique node name for the currently running system.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @param generatedname On successful return contains the generated node
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @return An IMA_STATUS indicating if the operation was successful or if
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * an error occurred.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_INVALID_PARAMETER Returned if @a generatedname is NULL
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * or specifies a memory area to which data cannot be written.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte GetComputerName((char *)computername, (LPDWORD)&dwStrLength);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte _snprintf(nodename, 256, DEFAULT_NODE_NAME_FORMAT, computername);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (getSolarisSharedNodeName(generatedname) != IMA_STATUS_SUCCESS) {
5d539a8e4ead06ddda1d7f0274efee3d06c20e22Matt Barden gethostname(computername, sizeof (computername));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte sprintf(nodename, DEFAULT_NODE_NAME_FORMAT, generatedname);
5d539a8e4ead06ddda1d7f0274efee3d06c20e22Matt Barden gethostname((char *)computername, sizeof (computername));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte snprintf(nodename, 256, DEFAULT_NODE_NAME_FORMAT, computername);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Sets the alias of the specified node.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @param nodeId The object ID of the node whose alias is being set.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @param newAlias A pointer to a Unicode string which contains the new node
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * alias.If this parameter is NULL then the current alias is deleted, in
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * which case the specified node no longer has an alias.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @return An IMA_STATUS indicating if the operation was successful or if
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * an error occurred.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_SUCCESS Returned if the node's alias has been successfully set.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_STATUS_REBOOT_NECESSARY A reboot is necessary before
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * the setting of the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * alias actually takes affect.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_INVALID_OBJECT_TYPE Returned if @a nodeId does not
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * specify any valid object type.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_INCORRECT_OBJECT_TYPE Returned if @a nodeId does not
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * specify a node object.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_OBJECT_NOT_FOUND Returned if @a nodeId does not specify
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * a node which is currently known to the system.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_NAME_TOO_LONG Returned if @a newAlias contains too many
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * characters.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (nodeOid.objectSequenceNumber == RL_SHARED_NODE_SEQNUM)) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (setSolarisSharedNodeAlias(newAlias) != IMA_STATUS_SUCCESS) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetNodeAlias");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetNodeAlias");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Gets a list of the object IDs of all the logical HBAs in the system.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @param ppList A pointer to a pointer to an @ref IMA_OID_LIST structure.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * on successful return this will contain a pointer to an
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @ref IMA_OID_LIST which contains the object IDs of all of the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * LHBAs currently in the system.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @return An IMA_STATUS indicating if the operation was successful or if
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * an error occurred.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_SUCCESS Returned if the LHBA ID list has been successfully
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_INVALID_PARAMETER Returned if @a ppList is NULL or
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * specifies a
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * memory area to which data cannot be written.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte // Get total id count first
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetLhbaOidList");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetLhbaOidList");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_FreeMemory");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_FreeMemory");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *ppList = (IMA_OID_LIST*)calloc(1, sizeof (IMA_OID_LIST) +
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte // 2nd pass to copy the id lists
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetLhbaOidList");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetLhbaOidList");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_FreeMemory");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_FreeMemory");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Gets the properties of the specified logical HBA.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @param lhbaId The object ID of the LHBA whose properties are being
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * retrieved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @param pProps A pointer to an @ref IMA_LHBA_PROPERTIES structure.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * On successful
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * return this will contain the properties of the LHBA specified by
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @a lhbaId.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @return An IMA_STATUS indicating if the operation was successful or if
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * an error occurred.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_SUCCESS Returned if the properties of the specified LHBA
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * have been successfully retrieved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_INVALID_PARAMETER Returned if @a pProps is NULL or
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * specify a memory area to which data cannot be written.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_INVALID_OBJECT_TYPE Returned if @a lhbaId does not
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * specify any valid object type.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_INCORRECT_OBJECT_TYPE Returned if @a lhbaId does not
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * specify a LHBA.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_OBJECT_NOT_FOUND Returned if @a lhbaId does not
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * specify a LHBA which is currently known to the system.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetLhbaProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetLhbaProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Gets a list of the object IDs of all the physical HBAs in the system.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @param ppList A pointer to a pointer to an @ref IMA_OID_LIST structure.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * on successful return this will contain a pointer to an
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @ref IMA_OID_LIST which contains the object IDs of all of the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * PHBAs currently in the system.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @return An IMA_STATUS indicating if the operation was successful or if
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * an error occurred.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_SUCCESS Returned if the PHBA ID list has been successfully
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_INVALID_PARAMETER Returned if @a ppList is NULL or
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * specify a memory area to which data cannot be written.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_SUCCESS Returned if the properties of the specified PHBA
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * have been successfully retrieved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_OBJECT_NOT_FOUND Returned if @a phbaId does not
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * specify a PHBA which is currently known to the system.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_INVALID_PARAMETER Returned if @a ppList is NULL or
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * specify a memory area to which data cannot be written.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte // Get total id count first
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetPhbaOidList");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetPhbaOidList");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_FreeMemory");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_FreeMemory");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *ppList = (IMA_OID_LIST*)calloc(1, sizeof (IMA_OID_LIST) +
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte // 2nd pass to copy the id lists
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetPhbaOidList");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetPhbaOidList");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_FreeMemory");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_FreeMemory");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Gets the general properties of a physical HBA.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @param phbaId The object ID of the PHBA whose
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * properties are being queried.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @param pProps A pointer to an @ref
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * IMA_PHBA_PROPERTIES structure. On successful
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * return this will contain the properties of
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * the PHBA specified by @a phbaId.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @return An IMA_STATUS indicating if the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * operation was successful or if an error
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_SUCCESS Returned if the properties
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * of the specified PHBA have been
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * successfully retrieved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_INVALID_PARAMETER Returned
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * if @a pProps is NULL or specifies a
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * memory area to which data cannot be written.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_INVALID_OBJECT_TYPE Returned
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * if @a phbaId does not specify any
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * valid object type.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_INCORRECT_OBJECT_TYPE Returned
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * if @a phbaId does not specify a
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_OBJECT_NOT_FOUND Returned
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * if @a phbaId does not specify a PHBA
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * which is currently known to the system.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetPhbaProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetPhbaProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Frees a previously allocated IMA_OID_LIST structure.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @param pList A pointer to an @ref IMA_OID_LIST
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * structure allocated by the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * library. On successful return the memory
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * allocated by the list is freed.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @return An IMA_STATUS indicating if the operation
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * was successful or if an error occurred.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_SUCCESS Returned if the specified object
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * ID list was successfully freed.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_INVALID_PARAMETER Returned
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * if @a pList is NULL or specifies a
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * memory area from which data cannot be read.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte // Get total id count first
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetNonSharedNodeOidList");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetNonSharedNodeOidList");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_FreeMemory");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_FreeMemory");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *ppList = (IMA_OID_LIST*)calloc(1, sizeof (IMA_OID_LIST) +
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte // 2nd pass to copy the id lists
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetNonSharedNodeOidList");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetNonSharedNodeOidList");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_FreeMemory");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_FreeMemory");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Gets the first burst length properties of
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * the specified logical HBA.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @param lhbaId The object ID of the logical HBA
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * to get the first burst length
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * properties of.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @param pProps A pointer to a min/max values
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * structure.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @return An IMA_STATUS indicating if the operation
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * was successful or if an error
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_SUCCESS Returned if the first burst
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * length properties have been
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * successfully retrieved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_INVALID_PARAMETER Returned
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * if @a pProps is NULL or specifies a
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * memory area to which data cannot be written.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_INVALID_OBJECT_TYPE Returned
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * if @a lhbaId does not specify any
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * valid object type.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_INCORRECT_OBJECT_TYPE Returned
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * if @a lhbaId does not specify a LHBA.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_OBJECT_NOT_FOUND Returned
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @a lhbaId does not specify a LHBA
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * which is currently known to the system.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteIMA_API IMA_STATUS IMA_GetFirstBurstLengthProperties(
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetFirstBurstLengthProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetFirstBurstLengthProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Gets the max burst length properties of the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * specified logical HBA.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @param lhbaId The object ID of the logical HBA to
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * get the max burst length properties of.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @param pProps A pointer to an @ref IMA_MIN_MAX_VALUE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * structure allocated by the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * caller. On successful return this structure
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * will contain the max
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * burst length properties of this LHBA.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @return An IMA_STATUS indicating if the operation
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * was successful or if an error occurred.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_SUCCESS Returned if the max burst
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * length properties have been
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * successfully retrieved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_INVALID_PARAMETER Returned
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * if @a pProps is NULL or specifies a
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * memory area to which data cannot be written.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_INVALID_OBJECT_TYPE Returned
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * if @a lhbaId does not specify any
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * valid object type.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_INCORRECT_OBJECT_TYPE Returned
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * if @a lhbaId does not specify a HBA.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_OBJECT_NOT_FOUND Returned
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * if @a lhbaId does not specify a LHBA
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * which is currently known to the system.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteIMA_API IMA_STATUS IMA_GetMaxBurstLengthProperties(
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetMaxBurstLengthProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetMaxBurstLengthProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Gets the maximum receive data segment length properties
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * of the specified logical HBA.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @param lhbaId The object ID of the logical HBA to
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * get the max receive data
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * segment length properties of.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @param pProps A pointer to an @ref IMA_MIN_MAX_VALUE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * structure allocated by the caller.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * On successful return this structure will contain the max
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * receive data segment length properties of this LHBA.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @return An IMA_STATUS indicating if the operation
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * was successful or if an error occurred.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_SUCCESS Returned if the max receive
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * data segment length properties
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * have been successfully retrieved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_INVALID_PARAMETER Returned if
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @a pProps is NULL or specifies a
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * memory area to which data cannot be written.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_INVALID_OBJECT_TYPE Returned if
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @a lhbaId does not specify any
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * valid object type.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_INCORRECT_OBJECT_TYPE Returned if
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * a lhbaId does not specify a LHBA.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @retval IMA_ERROR_OBJECT_NOT_FOUND Returned if @a
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * lhbaId does not specify a LHBA
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * which is currently known to the system.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteIMA_API IMA_STATUS IMA_GetMaxRecvDataSegmentLengthProperties(
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_GetMaxRecvDataSegmentLengthPropertiesFn PassFunc;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define IMA_GMRDSLPFN IMA_GetMaxRecvDataSegmentLengthPropertiesFn
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define IMA_GMRDSLP "IMA_GetMaxRecvDataSegmentLengthProperties"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* --------------------------------------------- */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (pInputBuffer == NULL || inputBufferLength == 0 ||
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte pOutputBuffer == NULL || pOutputBufferLength == NULL ||
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (pluginOid.objectType != IMA_OBJECT_TYPE_PLUGIN)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (plugintable[i].ownerId == pluginOid.ownerId) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_PluginIOCtl");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_PluginIOCtl");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetNetworkPortalOidList");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetNetworkPortalOidList");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_FreeMemory");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_FreeMemory");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetFirstBurstLength");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetFirstBurstLength");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetMaxBurstLength");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetMaxBurstLength");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteIMA_API IMA_STATUS IMA_SetMaxRecvDataSegmentLength(
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetMaxRecvDataSegmentLength");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetMaxRecvDataSegmentLength");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteIMA_API IMA_STATUS IMA_GetMaxConnectionsProperties(
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetMaxConnectionsProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetMaxConnectionsProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetMaxConnections");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetMaxConnections");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteIMA_API IMA_STATUS IMA_GetDefaultTime2RetainProperties(
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetDefaultTime2RetainProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetDefaultTime2RetainProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetDefaultTime2Retain");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetDefaultTime2Retain");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteIMA_API IMA_STATUS IMA_GetDefaultTime2WaitProperties(
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetDefaultTime2WaitProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetDefaultTime2WaitProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetDefaultTime2Wait");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetDefaultTime2Wait");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteIMA_API IMA_STATUS IMA_GetMaxOutstandingR2TProperties(
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetMaxOutstandingR2TProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetMaxOutstandingR2TProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetMaxOutstandingR2T");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetMaxOutstandingR2T");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteIMA_API IMA_STATUS IMA_GetErrorRecoveryLevelProperties(
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetErrorRecoveryLevelProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetErrorRecoveryLevelProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetErrorRecoveryLevel");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetErrorRecoveryLevel");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetInitialR2TProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetInitialR2TProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetInitialR2T");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetInitialR2T");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteIMA_API IMA_STATUS IMA_GetImmediateDataProperties(
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetImmediateDataProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetImmediateDataProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetImmediateData");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetImmediateData");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteIMA_API IMA_STATUS IMA_GetDataPduInOrderProperties(
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetDataPduInOrderProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetDataPduInOrderProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetDataPduInOrder");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetDataPduInOrder");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteIMA_API IMA_STATUS IMA_GetDataSequenceInOrderProperties(
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetDataSequenceInOrderProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetDataSequenceInOrderProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetDataSequenceInOrder");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetDataSequenceInOrder");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetStatisticsCollection");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetStatisticsCollection");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetNetworkPortStatus");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetNetworkPortStatus");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetTargetOidList");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetTargetOidList");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_FreeMemory");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_FreeMemory");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_RemoveStaleData");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_RemoveStaleData");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (enableIsnsDiscovery == IMA_TRUE && iSnsHost == NULL)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (discoveryMethod != IMA_ISNS_DISCOVERY_METHOD_STATIC &&
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte discoveryMethod != IMA_ISNS_DISCOVERY_METHOD_DHCP &&
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte discoveryMethod != IMA_ISNS_DISCOVERY_METHOD_SLP)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetIsnsDiscovery");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetIsnsDiscovery");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetSlpDiscovery");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetSlpDiscovery");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetStaticDiscovery");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetStaticDiscovery");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetSendTargetsDiscovery");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetSendTargetsDiscovery");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * this forces plugins to rescan all iscsi targets on this
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * ipaddress/port and return a
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * list of discovered targets.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * according to IMA spec., pTargetOidList is allocated by
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * the caller for library to return data,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * how does a caller know how much space it will be?
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * pTargetOidList should be allocated by the library/plugin
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * like IMA_GetLnpOidList
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteIMA_API IMA_STATUS IMA_AddPhbaStaticDiscoveryTarget(
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_AddPhbaStaticDiscoveryTarget");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_AddPhbaStaticDiscoveryTarget");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_FreeMemory");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_FreeMemory");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteIMA_API IMA_STATUS IMA_RemovePhbaStaticDiscoveryTarget(
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (plugintable[i].ownerId == targetOid.ownerId) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_RemovePhbaStaticDiscoveryTarget");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_RemovePhbaStaticDiscoveryTarget");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetPnpOidList");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetPnpOidList");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_FreeMemory");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_FreeMemory");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetPhbaDownloadProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetPhbaDownloadProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_IsPhbaDownloadFile");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_IsPhbaDownloadFile");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (imageType != IMA_DOWNLOAD_IMAGE_TYPE_FIRMWARE &&
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte imageType != IMA_DOWNLOAD_IMAGE_TYPE_OPTION_ROM &&
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_PhbaDownload");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_PhbaDownload");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteIMA_API IMA_STATUS IMA_GetNetworkPortalProperties(
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (networkPortalId.objectType != IMA_OBJECT_TYPE_NETWORK_PORTAL)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (plugintable[i].ownerId == networkPortalId.ownerId) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetNetworkPortalProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetNetworkPortalProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (networkPortalId.objectType != IMA_OBJECT_TYPE_NETWORK_PORTAL)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (plugintable[i].ownerId == networkPortalId.ownerId) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetNetworkPortalIpAddress");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetNetworkPortalIpAddress");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte // Get total id count first
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetLnpOidList");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetLnpOidList");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_FreeMemory");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_FreeMemory");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte sizeof (IMA_OID_LIST) + (totalIdCount - 1)* sizeof (IMA_OID));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte // 2nd pass to copy the id lists
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetLnpOidList");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetLnpOidList");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_FreeMemory");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_FreeMemory");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetLnpProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetLnpProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetPnpProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetPnpProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetPnpStatistics");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetPnpStatistics");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (targetId.objectType != IMA_OBJECT_TYPE_TARGET)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (plugintable[i].ownerId == targetId.ownerId) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetTargetProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetTargetProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (sessionId.objectType != IMA_OBJECT_TYPE_SESSION)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (plugintable[i].ownerId == sessionId.ownerId) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetSessionProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetSessionProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (connectionId.objectType != IMA_OBJECT_TYPE_CONNECTION)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (plugintable[i].ownerId == connectionId.ownerId) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetConnectionProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetConnectionProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (targetId.objectType != IMA_OBJECT_TYPE_TARGET)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (plugintable[i].ownerId == targetId.ownerId) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetTargetErrorStatistics");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetTargetErrorStatistics");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetLuOidList");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetLuOidList");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_FreeMemory");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_FreeMemory");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (targetId.objectType != IMA_OBJECT_TYPE_TARGET)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (plugintable[i].ownerId == targetId.ownerId) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetLuOid");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetLuOid");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetLuProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetLuProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetStatisticsProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetStatisticsProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetDeviceStatistics");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetDeviceStatistics");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (pOutputBuffer == NULL || pOutputBufferLength == NULL ||
146832db19eb2048b216b5dd0ba4424c7d0dfd17Milos Muzik (pSenseBuffer == NULL && pSenseBufferLength != NULL &&
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (deviceId.objectType != IMA_OBJECT_TYPE_TARGET &&
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (plugintable[i].ownerId == deviceId.ownerId) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_LuInquiry");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_LuInquiry");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if ((pOutputBuffer == NULL || pOutputBufferLength == NULL ||
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (pSenseBuffer == NULL && pSenseBufferLength != NULL &&
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (deviceId.objectType != IMA_OBJECT_TYPE_TARGET &&
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (plugintable[i].ownerId == deviceId.ownerId) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_LuReadCapacity");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_LuReadCapacity");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if ((pOutputBuffer == NULL || pOutputBufferLength == NULL ||
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (pSenseBuffer == NULL && pSenseBufferLength != NULL &&
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (sendToWellKnownLun != IMA_TRUE && sendToWellKnownLun != IMA_FALSE)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (deviceId.objectType != IMA_OBJECT_TYPE_TARGET &&
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (plugintable[i].ownerId == deviceId.ownerId) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_LuReportLuns");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_LuReportLuns");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_ExposeLu");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_ExposeLu");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_UnexposeLu");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_UnexposeLu");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetPhbaStatus");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetPhbaStatus");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteIMA_API IMA_STATUS IMA_RegisterForObjectVisibilityChanges(
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_RegisterForObjectVisibilityChangesFn PassFunc;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* check if registered already */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_RegisterForObjectVisibilityChanges");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_RegisterForObjectVisibilityChanges");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteIMA_API IMA_STATUS IMA_DeregisterForObjectVisibilityChanges(
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_DeregisterForObjectVisibilityChangesFn PassFunc;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* check if deregistered already */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * use IMA_ERROR_UNKNOWN_ERROR
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_DeregisterForObjectVisibilityChanges");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_DeregisterForObjectVisibilityChanges");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * where plugintable[i].
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * vbcallback[j] == pClientFn
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteIMA_API IMA_STATUS IMA_RegisterForObjectPropertyChanges(
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* check if registered already */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_RegisterForObjectPropertyChanges");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_RegisterForObjectPropertyChanges");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteIMA_API IMA_STATUS IMA_DeregisterForObjectPropertyChanges(
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_DeregisterForObjectPropertyChangesFn PassFunc;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* check if deregistered already */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * use IMA_ERROR_UNKNOWN_ERROR
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_DeregisterForObjectPropertyChanges");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_DeregisterForObjectPropertyChanges");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * where plugintable[i].vbcallback[
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * j] == pClientFn
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (; j < plugintable[i].
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetIpProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetIpProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetIpConfigMethod");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetIpConfigMethod");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetSubnetMask");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetSubnetMask");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte const IMA_IP_ADDRESS *alternateDnsServerAddress) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte sizeof (primaryDnsServerAddress->ipAddress)) == 0)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetDnsServerAddress");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetDnsServerAddress");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetDefaultGateway");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetDefaultGateway");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetSupportedAuthMethods");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetSupportedAuthMethods");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteIMA_API IMA_STATUS IMA_GetInUseInitiatorAuthMethods(
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetInUseInitiatorAuthMethods");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetInUseInitiatorAuthMethods");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetInitiatorAuthParms");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetInitiatorAuthParms");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetInitiatorAuthMethods");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetInitiatorAuthMethods");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetInitiatorAuthParms");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_SetInitiatorAuthParms");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteIMA_API IMA_STATUS IMA_GetStaticDiscoveryTargetOidList(
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetStaticDiscoveryTargetOidList");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetStaticDiscoveryTargetOidList");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetDiscoveryProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetDiscoveryProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_AddDiscoveryAddress");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_AddDiscoveryAddress");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte const IMA_STATIC_DISCOVERY_TARGET staticDiscoveryTarget,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_AddStaticDiscoveryTarget");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_AddStaticDiscoveryTarget");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteIMA_API IMA_STATUS IMA_CommitHbaParameters(IMA_OID oid,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_CommitHbaParameters");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_CommitHbaParameters");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteIMA_API IMA_STATUS IMA_RemoveStaticDiscoveryTarget(
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (oid.objectType != IMA_OBJECT_TYPE_STATIC_DISCOVERY_TARGET)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_RemoveStaticDiscoveryTarget");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_RemoveStaticDiscoveryTarget");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteIMA_API IMA_STATUS IMA_GetStaticDiscoveryTargetProperties(
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_STATIC_DISCOVERY_TARGET_PROPERTIES *pProps) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_GetStaticDiscoveryTargetPropertiesFn PassFunc;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetStaticDiscoveryTargetProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetStaticDiscoveryTargetProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteIMA_API IMA_STATUS IMA_GetDiscoveryAddressOidList(
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte // Get total id count first
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetDiscoveryAddressOidList");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetDiscoveryAddressOidList");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_FreeMemory");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_FreeMemory");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *ppList = (IMA_OID_LIST*)calloc(1, sizeof (IMA_OID_LIST) +
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte // 2nd pass to copy the id lists
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetDiscoveryAddressOidList");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetDiscoveryAddressOidList");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define OBJ_SEQ_NUM ppOidList->oids[j].objectSequenceNumber
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_FreeMemory");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_FreeMemory");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte // Get total id count first
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetSessionOidList");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetSessionOidList");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_FreeMemory");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_FreeMemory");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *ppList = (IMA_OID_LIST*)calloc(1, sizeof (IMA_OID_LIST) +
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte // 2nd pass to copy the id lists
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetSessionOidList");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetSessionOidList");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define OBJ_SEQ_NUM ppOidList->oids[j].objectSequenceNumber
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_FreeMemory");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_FreeMemory");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte // Get total id count first
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetConnectionOidList");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetConnectionOidList");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_FreeMemory");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_FreeMemory");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *ppList = (IMA_OID_LIST*)calloc(1, sizeof (IMA_OID_LIST)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte // 2nd pass to copy the id lists
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetConnectionOidList");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetConnectionOidList");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (j = 0; (
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define OBJ_SEQ_NUM ppOidList->oids[j].objectSequenceNumber
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_FreeMemory");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_FreeMemory");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (plugintable[i].ownerId == discoveryAddressOid.ownerId) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_RemoveDiscoveryAddress");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_RemoveDiscoveryAddress");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetIpsecProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetIpsecProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (targetOid.objectType != IMA_OBJECT_TYPE_TARGET)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (plugintable[i].ownerId == targetOid.ownerId) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetAddressKeys");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetAddressKeys");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_FreeMemory");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_FreeMemory");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteIMA_API IMA_STATUS IMA_GetDiscoveryAddressProperties(
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (oid.objectType != IMA_OBJECT_TYPE_DISCOVERY_ADDRESS)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetDiscoveryAddressProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "IMA_GetDiscoveryAddressProperties");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if ((pluginOid.objectType != IMA_OBJECT_TYPE_PLUGIN) ||
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for (i = 0; i < number_of_plugins; i++) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (plugintable[i].ownerId == pluginOid.ownerId) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "QIMA_SetUpdateInterval");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte "QIMA_SetUpdateInterval");