1
0
mirror of https://github.com/pavel-odintsov/fastnetmon synced 2024-09-20 03:33:04 +02:00

Add headr files for plugin API

This commit is contained in:
Pavel Odintsov 2014-12-02 01:15:16 +04:00
parent bbbd14d203
commit 3ffb2b875f
2 changed files with 25 additions and 0 deletions

16
fastnetmon_types.h Normal file
View File

@ -0,0 +1,16 @@
#ifndef _FASTNETMON_TYPES_H
#define _FASTNETMON_TYPES_H
// simplified packet struct for lightweight save into memory
struct simple_packet {
uint32_t src_ip;
uint32_t dst_ip;
uint16_t source_port;
uint16_t destination_port;
unsigned int protocol;
unsigned int length;
uint8_t flags; /* tcp flags */
struct timeval ts;
};
#endif

View File

@ -0,0 +1,9 @@
#ifndef _SFLOW_PLUGIN_H
#define _SFLOW_PLUGIN_H
#include "../fastnetmon_types.h"
typedef void (*process_packet_pointer)(simple_packet&);
void start_sflow_collection(process_packet_pointer func_ptr);
#endif