From 32105bdab7115fde65f8bbc5513aa7c8e62cc1b1 Mon Sep 17 00:00:00 2001 From: Pavel Odintsov Date: Wed, 11 Mar 2015 12:47:10 +0300 Subject: [PATCH] Add visualization of unparsed packets in netmap mode --- netmap_plugin/netmap_collector.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/netmap_plugin/netmap_collector.cpp b/netmap_plugin/netmap_collector.cpp index 2c0dae6a..b62b114a 100644 --- a/netmap_plugin/netmap_collector.cpp +++ b/netmap_plugin/netmap_collector.cpp @@ -42,6 +42,9 @@ void consume_pkt(u_char* buffer, int len); // Get log4cpp logger from main programm extern log4cpp::Category& logger; +// Pass unparsed packets number to main programm +extern uint64_t total_unparsed_packets; + // Global configuration map extern std::map configuration_map; @@ -106,6 +109,8 @@ void consume_pkt(u_char* buffer, int len) { } netmap_process_func_ptr(packet); + } else { + total_unparsed_packets++; } }