mirror of
https://github.com/pavel-odintsov/fastnetmon
synced 2024-12-03 17:38:25 +01:00
Fix plugin runner
This commit is contained in:
parent
490728dd11
commit
9cefe96a49
@ -3,7 +3,8 @@
|
||||
g++ netflow_plugin/netflow_collector.cpp -c -onetflow_collector.o
|
||||
g++ sflow_plugin/sflow_collector.cpp -c -osflow_collector.o
|
||||
g++ pcap_plugin/pcap_collector.cpp -c -opcap_collector.o
|
||||
g++ pfring_plugin/pfring_collector.cpp -c -opfring_collector.o -I/opt/pf_ring/include -lpfring
|
||||
g++ plugin_runner.cpp -lpcap -llog4cpp netflow_collector.o sflow_collector.o pcap_collector.o pfring_collector.o -oplugin_tester
|
||||
g++ pfring_plugin/pfring_collector.cpp -c -opfring_collector.o -I/opt/pf_ring/include
|
||||
|
||||
g++ plugin_runner.cpp -lpcap -llog4cpp netflow_collector.o sflow_collector.o pcap_collector.o pfring_collector.o -oplugin_tester -I/opt/pf_ring/include -lpfring -lpthread -L/opt/pf_ring/lib
|
||||
rm -f netflow_collector.o sflow_collector.o pcap_collector.o
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include <iterator>
|
||||
#include <sstream>
|
||||
#include <netinet/ip.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
@ -28,12 +28,19 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
uint64_t total_unparsed_packets = 0;
|
||||
|
||||
std::string log_file_path = "/tmp/fastnetmon_plugin_tester.log";
|
||||
log4cpp::Category& logger = log4cpp::Category::getRoot();
|
||||
|
||||
// Global map with parsed config file
|
||||
std::map<std::string, std::string> configuration_map;
|
||||
|
||||
// convert string to integer
|
||||
int convert_string_to_integer(std::string line) {
|
||||
return atoi(line.c_str());
|
||||
}
|
||||
|
||||
void init_logging() {
|
||||
log4cpp::PatternLayout* layout = new log4cpp::PatternLayout();
|
||||
layout->setConversionPattern ("%d [%p] %m%n");
|
||||
|
Loading…
Reference in New Issue
Block a user