z/OS Common Information Model User's Guide
Previous topic | Next topic | Contents | Index | Contact z/OS | Library | PDF


Preparing provider initialization and function signatures

z/OS Common Information Model User's Guide
SC34-2671-00

Preparing provider initialization and function signatures

The nature of a CMPI provider does not require static linking to any of the CIM server's libraries. Instead, for each provider function group a single initialization routine (factory) entry point must be exposed following a defined naming scheme, so that the CIM server can call this entry point by name once it has dynamically loaded a provider dynamic load library. The CIM server will attempt to determine the function groups supported by a provider and the respective entry points by verifying the existence of the according provider factory entry points.

The signature for the factory functions looks like this:

CMPI<mi-type>MI * <mi-name>_Create_<mi-type>MI(CMPIBroker*,
                                               CMPIContext*,
                                               CMPIStatus*);

where <mi-type> refers to the function group of the provider, and <mi-name> refers to the actual provider name as specified during provider registration.

Important:

The actual signature of this function has an additional ’_’ after ’_Create’, which is not described as such in the initial version of the CMPI Technical Standard, but is changed in a corrigendum to match the existing implementations of the CMPI interface.

The factory function must return a pointer to a valid CMPI<mi-type>MI structure, where the major component of this structure is the table holding the function pointers, and thus enabling access to the individual provider group functions for the CIM server. An example of such a function pointer is the pointer to the enumerateInstances function in the CMPIInstanceMI structure.

The function groups for CMPI providers are Instance, Association, Property, Method or Indication, where type Property is not supported by the z/OS CIM server.

In file cmpimacs.h, a set of C preprocessor macros is defined that you may use for the provider initialization code and through which the required code for the <mi-name>_Create_<mi-type>MI function is generated in a convenient way. These macros are called CM<mi-type>MIStub and they are used in many of the examples referenced in Samples.

For further details refer to "MI Factories" in CMPI Technical Standard Document provided by The Open Group.

For each of the CMPI provider function groups, a set of C functions must be implemented as described in "MI Function Signatures" of the CMPI Technical Standard Document.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014