HP (Hewlett-Packard) B6941-90001 Server User Manual


 
484 Appendix A
ITO Managed Node APIs and Libraries
ITO APIs for Novell NetWare Managed Nodes
ITO APIs for Novell NetWare Managed
Nodes
A set of ITO agent APIs is provided for Novell NetWare agents. These
APIs provide inter-process communication between ITO agents and the
custom NLMs; in particular, the parent/child relationship. See Table A-2
on page 484 for more information about these APIs.
Table A-2 ITO APIs on Novell NetWare Managed Nodes
Writing ITO-enabled NetWare
Loadable Modules
An example of an action, HELLO.NLM, is given below. This action is
executed by the ITO action agent and the output is captured as an ITO
annotation:
#define OPC_NLM
#include “opcnwapi.h”
main( int argc, char **argv )
{
int handle;
OVnlm_init( argc, argv, &handle );
printf( “%s: Hello world!\n”, argv[0] );
OVnlm_exit( handle, 0 );
}
Command Description
OVnlm_init() Must be the first function called in the main() function of
an ITO-enabled NetWare Loadable Module (NLM). This
function initializes the ITO related variables and returns
a handle which must be used in all subsequent calls in
this NLM.
OVnlm_exit() Must be used to terminate the execution of ITO-enabled
NLM instead of the usual exit() function.
OVnlm_exit() is required to inform the parent ITO
Agent NLM that the custom NLM has finished and to
provide exit code to the parent.