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:
parent
bbbd14d203
commit
3ffb2b875f
16
fastnetmon_types.h
Normal file
16
fastnetmon_types.h
Normal 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
|
9
sflow_plugin/sflow_collector.h
Normal file
9
sflow_plugin/sflow_collector.h
Normal 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
|
Loading…
Reference in New Issue
Block a user