dnxPlugin.h File Reference

Types and definitions for plugin loading and execution. More...

#include <stdio.h>

Go to the source code of this file.

Defines

#define DNX_PLUGIN_RESULT_OK   0
#define DNX_PLUGIN_RESULT_WARNING   1
#define DNX_PLUGIN_RESULT_CRITICAL   2
#define DNX_PLUGIN_RESULT_UNKNOWN   3

Functions

void dnxPluginExecute (char *command, int *resCode, char *resData, int maxData, int timeout, char *myaddr)
 Find an appropriate dnx plugin and use it to execute a commmand.
int dnxPluginInit (char *pluginPath)
 Initialize the dnx client plugin utility library.
void dnxPluginRelease (void)
 Clean up the dnx plugin utility library.


Detailed Description

Types and definitions for plugin loading and execution.

Author:
Robert W. Ingraham (dnx-devel@lists.sourceforge.net)
Attention:
Please submit patches to http://dnx.sourceforge.net

Definition in file dnxPlugin.h.


Define Documentation

#define DNX_PLUGIN_RESULT_CRITICAL   2

DNX plugin result: critical.

Definition at line 35 of file dnxPlugin.h.

Referenced by dnxPluginExternal().

#define DNX_PLUGIN_RESULT_OK   0

DNX plugin result: success.

Definition at line 33 of file dnxPlugin.h.

Referenced by dnxWorker().

#define DNX_PLUGIN_RESULT_UNKNOWN   3

DNX plugin result: unknown.

Definition at line 36 of file dnxPlugin.h.

Referenced by dnxPluginExecute(), dnxPluginExternal(), and dnxPluginInternal().

#define DNX_PLUGIN_RESULT_WARNING   1

DNX plugin result: warning.

Definition at line 34 of file dnxPlugin.h.


Function Documentation

void dnxPluginExecute ( char *  command,
int *  resCode,
char *  resData,
int  maxData,
int  timeout,
char *  myaddr 
)

Find an appropriate dnx plugin and use it to execute a commmand.

Parameters:
[in] command - the command to be executed by the plugin.
[out] resCode - the address of storage for the command's result code.
[out] resData - the address of storage for the command's stdout text.
[in] maxData - the maximum size of the resData buffer.
[in] timeout - the maximum number of seconds to wait for command to complete before returning a timeout error.
[in] myaddr - the address (in human readable format) of this DNX node.

Definition at line 861 of file dnxPlugin.c.

References DNX_ERR_NOTFOUND, DNX_OK, DNX_PLUGIN_RESULT_UNKNOWN, dnxDebug(), dnxPluginExternal(), dnxPluginInternal(), dnxPluginLocate(), and gInitialized.

Referenced by dnxWorker().

int dnxPluginInit ( char *  pluginPath  ) 

Initialize the dnx client plugin utility library.

Parameters:
[in] pluginPath - the file system path where plugin libraries are to be found.
Returns:
Zero on success, or a non-zero error value.

Definition at line 887 of file dnxPlugin.c.

References DNX_ERR_INVALID, DNX_ERR_MEMORY, DNX_OK, dnxLog(), gInitialized, gPluginPath, MAX_PLUGIN_PREFIX, and xmalloc.

Referenced by ehProcessData(), and main().

void dnxPluginRelease ( void   ) 

Clean up the dnx plugin utility library.

Todo:
Release module and plugin chains.

Definition at line 929 of file dnxPlugin.c.

References gInitialized, gPluginPath, and xfree.

Referenced by main().


Generated on Tue Apr 13 15:48:07 2010 for DNX by  doxygen 1.5.6