adding generic csv output module
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
#include "../state.h"
|
||||
#include "../fieldset.h"
|
||||
|
||||
#ifndef HEADER_PROBE_MODULES_H
|
||||
#define HEADER_PROBE_MODULES_H
|
||||
#ifndef PROBE_MODULES_H
|
||||
#define PROBE_MODULES_H
|
||||
|
||||
typedef struct probe_response_type {
|
||||
const uint8_t is_success;
|
||||
@ -10,14 +10,21 @@ typedef struct probe_response_type {
|
||||
} response_type_t;
|
||||
|
||||
typedef int (*probe_global_init_cb)(struct state_conf *);
|
||||
typedef int (*probe_thread_init_cb)(void* packetbuf, macaddr_t* src_mac, macaddr_t* gw_mac, port_n_t src_port);
|
||||
typedef int (*probe_make_packet_cb)(void* packetbuf, ipaddr_n_t src_ip, ipaddr_n_t dst_ip,
|
||||
uint32_t *validation, int probe_num);
|
||||
typedef void (*probe_print_packet_cb)(FILE *, void* packetbuf);
|
||||
typedef int (*probe_close_cb)(struct state_conf*, struct state_send*, struct state_recv*);
|
||||
typedef int (*probe_validate_packet_cb)(const struct iphdr *ip_hdr, uint32_t len, uint32_t *src_ip, uint32_t *validation);
|
||||
typedef int (*probe_thread_init_cb)(void* packetbuf, macaddr_t* src_mac,
|
||||
macaddr_t* gw_mac, port_n_t src_port);
|
||||
|
||||
typedef void (*probe_classify_packet_cb)(const u_char* packetbuf, uint32_t len, fieldset_t*);
|
||||
typedef int (*probe_make_packet_cb)(void* packetbuf, ipaddr_n_t src_ip,
|
||||
ipaddr_n_t dst_ip,
|
||||
uint32_t *validation, int probe_num);
|
||||
|
||||
typedef void (*probe_print_packet_cb)(FILE *, void* packetbuf);
|
||||
typedef int (*probe_close_cb)(struct state_conf*,
|
||||
struct state_send*, struct state_recv*);
|
||||
typedef int (*probe_validate_packet_cb)(const struct iphdr *ip_hdr,
|
||||
uint32_t len, uint32_t *src_ip, uint32_t *validation);
|
||||
|
||||
typedef void (*probe_classify_packet_cb)(const u_char* packetbuf,
|
||||
uint32_t len, fieldset_t*);
|
||||
|
||||
typedef struct probe_module {
|
||||
const char *name;
|
||||
@ -37,6 +44,7 @@ typedef struct probe_module {
|
||||
probe_classify_packet_cb process_packet;
|
||||
probe_close_cb close;
|
||||
fielddef_t *fields;
|
||||
int numfields;
|
||||
const char *helptext;
|
||||
|
||||
} probe_module_t;
|
||||
@ -47,4 +55,8 @@ void fs_add_ip_fields(fieldset_t *fs, struct iphdr *ip);
|
||||
void fs_add_system_fields(fieldset_t *fs, int is_repeat, int in_cooldown);
|
||||
void print_probe_modules(void);
|
||||
|
||||
extern fielddef_t ip_fields[];
|
||||
extern fielddef_t sys_fields[];
|
||||
|
||||
#endif // HEADER_PROBE_MODULES_H
|
||||
|
||||
|
Reference in New Issue
Block a user