mirror of
https://github.com/pavel-odintsov/fastnetmon.git
synced 2024-09-21 02:17:16 +00:00
Eliminated non portable dependencies in example plugin
This commit is contained in:
parent
87e9cfc780
commit
55af595b84
@ -1,16 +1,10 @@
|
||||
#include "../all_logcpp_libraries.hpp"
|
||||
|
||||
// For support uint32_t, uint16_t
|
||||
#include <sys/types.h>
|
||||
|
||||
// For config map operations
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
// For support: IPPROTO_TCP, IPPROTO_ICMP, IPPROTO_UDP
|
||||
#include <netinet/in.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/types.h>
|
||||
#include "../iana_ip_protocols.hpp"
|
||||
|
||||
#include "example_collector.hpp"
|
||||
|
||||
@ -53,15 +47,15 @@ void start_example_collection(process_packet_pointer func_ptr) {
|
||||
current_packet.sample_ratio = 1;
|
||||
|
||||
/* ICMP */
|
||||
current_packet.protocol = IPPROTO_ICMP;
|
||||
current_packet.protocol = IpProtocolNumberICMP;
|
||||
|
||||
/* TCP */
|
||||
current_packet.protocol = IPPROTO_TCP;
|
||||
current_packet.protocol = IpProtocolNumberTCP;
|
||||
current_packet.source_port = 0;
|
||||
current_packet.destination_port = 0;
|
||||
|
||||
/* UDP */
|
||||
current_packet.protocol = IPPROTO_UDP;
|
||||
current_packet.protocol = IpProtocolNumberUDP;
|
||||
current_packet.source_port = 0;
|
||||
current_packet.destination_port = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user