PROXY  WHOIS  RQUOTE  TEXTS  SOFT  FOREX  BBOARD
 Music  Philosophy  Code  Literature  Russian

= ROOT|Technical|Code_Examples|C|nagios-2.9|include|nebmodules.h =

page 1 of 2



/*****************************************************************************
 *
 * NEBMODULES.H - Include file for event broker modules
 *
 * Copyright (c) 2002-2005 Ethan Galstad (nagios@nagios.org)
 * Last Modified:   12-17-2005
 *
 * License:
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 *
 *****************************************************************************/

#ifndef _NEBMODULES_H
#define _NEBMODULES_H

#ifdef __cplusplus
  extern "C" {
#endif

/***** MODULE VERSION INFORMATION *****/

#define NEB_API_VERSION(x) int __neb_api_version = x;
#define CURRENT_NEB_API_VERSION    2



/***** MODULE INFORMATION *****/

#define NEBMODULE_MODINFO_NUMITEMS  6
#define NEBMODULE_MODINFO_TITLE     0
#define NEBMODULE_MODINFO_AUTHOR    1
#define NEBMODULE_MODINFO_COPYRIGHT 2
#define NEBMODULE_MODINFO_VERSION   3
#define NEBMODULE_MODINFO_LICENSE   4
#define NEBMODULE_MODINFO_DESC      5



/***** MODULE LOAD/UNLOAD OPTIONS *****/

#define NEBMODULE_NORMAL_LOAD       0    /* module is being loaded normally */
#define NEBMODULE_REQUEST_UNLOAD    0    /* request module to unload (but don't force it) */
#define NEBMODULE_FORCE_UNLOAD      1    /* force module to unload */



/***** MODULES UNLOAD REASONS *****/

#define NEBMODULE_NEB_SHUTDOWN      1    /* event broker is shutting down */
#define NEBMODULE_NEB_RESTART       2    /* event broker is restarting */
#define NEBMODULE_ERROR_NO_INIT     3    /* _module_init() function was not found in module */
#define NEBMODULE_ERROR_BAD_INIT    4    /* _module_init() function returned a bad code */
#define NEBMODULE_ERROR_API_VERSION 5    /* module version is incompatible with current api */



/***** MODULE STRUCTURES *****/

/* NEB module structure */
typedef struct nebmodule_struct{
	char            *filename;
	char            *args;
	char            *info[NEBMODULE_MODINFO_NUMITEMS];
	int             should_be_loaded;
	int             is_currently_loaded;
#ifdef USE_LTDL
	lt_dlhandle     module_handle;
	lt_ptr          init_func;
	lt_ptr          deinit_func;
#else
	void            *module_handle;
	void            *init_func;
	void            *deinit_func;
#endif
#ifdef HAVE_PTHREAD_H
	pthread_t       thread_id;
#endif
	struct nebmodule_struct *next;
        }nebmodule;



/***** MODULE FUNCTIONS *****/
int neb_set_module_info(void *,int,char *);

#ifdef __cplusplus
  }
#endif
=1=

= PAGE 1 = NEXT > |2

UP TO ROOT | UP TO DIR

Google
 


E-mail Facebook Google Digg del.icio.us BlinkList Fark Furl Ma.gnolia Netscape NewsVine Reddit Slashdot Spurl StumbleUpon Technorati YahooMyWeb LiveJournal Blogmarks TwitThis Live News2.ru BobrDobr.ru Memori.ru MoeMesto.ru

0.231231 wallclock secs ( 0.01 usr + 0.00 sys = 0.01 CPU)