![]() |
flowmon-http-plugins
1.0
FlowMon HTTP Input/Process/export plugins
|
Export plugin for flowmon, export HTTP data to postgres. More...
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <flowmonexp/plugin_export.h>
#include <libpq-fe.h>
#include <inttypes.h>
#include <time.h>
#include <stdbool.h>
Go to the source code of this file.
Data Structures | |
struct | plugin_private_export |
Plugin private structure. More... |
Macros | |
#define | PRINTV(format, args...) do {if (VERBOSE) { fprintf(stdout, format, ##args); fflush(stdout); } } while (0) |
#define | PRINTD(format, args...) do {if (DEBUG) { fprintf(stdout, format, ##args); fflush(stdout); } } while (0) |
#define | PRINTA(format, args...) do {if (VERBOSE || DEBUG) { fprintf(stdout, format, ##args); fflush(stdout); } } while (0) |
#define | MAX_CONNINFO_LENGTH 2000 |
#define | VALUES_SIZE 600 |
Functions | |
SET_PLUGIN_TYPE (PLUGIN_TYPE_EXPORT) | |
Set plugin type for flowmon. | |
int | parse_conninfo (char *params, plugin_private_export *conf) |
function parse parameters for remote connection | |
int | SQLconnection (plugin_private_export *p) |
Function connect to database specified in plugin private structure. |
Variables | |
int | verbose_level |
int | debug_level |
bool | VERBOSE |
bool | DEBUG |
Export plugin for flowmon, export HTTP data to postgres.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
This software is provided ``as is'', and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the company or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.
Definition in file flowmon-export-http_postgres.c.
#define PRINTV | ( | format, | |
args... | |||
) | do {if (VERBOSE) { fprintf(stdout, format, ##args); fflush(stdout); } } while (0) |
Print when verbose mode is on
Definition at line 50 of file flowmon-export-http_postgres.c.
#define PRINTD | ( | format, | |
args... | |||
) | do {if (DEBUG) { fprintf(stdout, format, ##args); fflush(stdout); } } while (0) |
Print when debug mode is on
Definition at line 52 of file flowmon-export-http_postgres.c.
#define PRINTA | ( | format, | |
args... | |||
) | do {if (VERBOSE || DEBUG) { fprintf(stdout, format, ##args); fflush(stdout); } } while (0) |
Print when debug of verbose mode is on
Definition at line 54 of file flowmon-export-http_postgres.c.
#define MAX_CONNINFO_LENGTH 2000 |
Definition at line 56 of file flowmon-export-http_postgres.c.
#define VALUES_SIZE 600 |
Definition at line 57 of file flowmon-export-http_postgres.c.
SET_PLUGIN_TYPE | ( | PLUGIN_TYPE_EXPORT | ) |
Set plugin type for flowmon.
int parse_conninfo | ( | char * | params, |
plugin_private_export * | conf | ||
) |
function parse parameters for remote connection
*params | pointer to start of string with parameters |
*conf | pointer to plugin private structure |
Definition at line 161 of file flowmon-export-http_postgres.c.
int SQLconnection | ( | plugin_private_export * | p | ) |
Function connect to database specified in plugin private structure.
*p | pointer to plugin private structire |
Definition at line 284 of file flowmon-export-http_postgres.c.
int verbose_level |
verbose flag
int debug_level |
debug flag
bool VERBOSE |
verbose flag
Definition at line 71 of file flowmon-export-http_postgres.c.
bool DEBUG |
debug flag
Definition at line 74 of file flowmon-export-http_postgres.c.