1 /*****************************************************************************
3 * NEBMODULES.H - Include file for event broker modules
5 * Copyright (c) 2002-2006 Ethan Galstad (nagios@nagios.org)
6 * Last Modified: 02-27-2006
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 *****************************************************************************/
32 /***** MODULE VERSION INFORMATION *****/
34 #define NEB_API_VERSION(x) int __neb_api_version = x;
35 #define CURRENT_NEB_API_VERSION 3
39 /***** MODULE INFORMATION *****/
41 #define NEBMODULE_MODINFO_NUMITEMS 6
42 #define NEBMODULE_MODINFO_TITLE 0
43 #define NEBMODULE_MODINFO_AUTHOR 1
44 #define NEBMODULE_MODINFO_COPYRIGHT 2
45 #define NEBMODULE_MODINFO_VERSION 3
46 #define NEBMODULE_MODINFO_LICENSE 4
47 #define NEBMODULE_MODINFO_DESC 5
51 /***** MODULE LOAD/UNLOAD OPTIONS *****/
53 #define NEBMODULE_NORMAL_LOAD 0 /* module is being loaded normally */
54 #define NEBMODULE_REQUEST_UNLOAD 0 /* request module to unload (but don't force it) */
55 #define NEBMODULE_FORCE_UNLOAD 1 /* force module to unload */
59 /***** MODULES UNLOAD REASONS *****/
61 #define NEBMODULE_NEB_SHUTDOWN 1 /* event broker is shutting down */
62 #define NEBMODULE_NEB_RESTART 2 /* event broker is restarting */
63 #define NEBMODULE_ERROR_NO_INIT 3 /* _module_init() function was not found in module */
64 #define NEBMODULE_ERROR_BAD_INIT 4 /* _module_init() function returned a bad code */
65 #define NEBMODULE_ERROR_API_VERSION 5 /* module version is incompatible with current api */
69 /***** MODULE STRUCTURES *****/
71 /* NEB module structure */
72 typedef struct nebmodule_struct
{
75 char *info
[NEBMODULE_MODINFO_NUMITEMS
];
77 int is_currently_loaded
;
79 lt_dlhandle module_handle
;
90 struct nebmodule_struct
*next
;
95 /***** MODULE FUNCTIONS *****/
96 int neb_set_module_info(void *,int,char *);