![]() | ![]() | ![]() | [Insert name here] Reference Manual | ![]() |
---|
#define DB_INSERT_END typedef plugin_db_t; #define plugin_escape_func (p) #define plugin_insert_func (p) #define plugin_close_func (p) #define plugin_set_escape_func (p, f) #define plugin_set_insert_func (p, f) #define plugin_set_closing_func (p, f) int db_plugins_available (void); int db_plugins_init (const char *dirname, int argc, char **argv); char* db_plugin_escape (const char *string); int db_plugin_insert (const char *table, const char *fields, const char *fmt, ...); void db_plugins_run (idmef_message_t *idmef); void db_plugins_close (void); plugin_generic_t* plugin_init (int argc, char **argv);
typedef struct { PLUGIN_GENERIC; char *(*db_escape)(const char *input); int (*db_insert)(const char *query); void (*close)(void); } plugin_db_t;
int db_plugins_available (void);
Returns : | 0 if there is active DB plugins, -1 otherwise. |
int db_plugins_init (const char *dirname, int argc, char **argv);
Tell the DB plugins subsystem to load DB plugins from dirname.
dirname : | Pointer to a directory string. |
argc : | Number of command line argument. |
argv : | Array containing the command line arguments. |
Returns : | 0 on success, -1 if an error occured. |
int db_plugin_insert (const char *table, const char *fields, const char *fmt, ...);
table : | |
fields : | |
fmt : | |
... : | |
Returns : |
|
void db_plugins_run (idmef_message_t *idmef);
Will output the IDMEF message to all active database.
idmef : | Pointer to an IDMEF message. |
<<< [Insert title here] | ntp >>> |