From 6b09a7b1906f605475f644c3fbdbc28c3e4fabed Mon Sep 17 00:00:00 2001 From: Benjamin Drung Date: Mon, 8 May 2017 16:21:52 +0200 Subject: [PATCH] Fix typo programm -> program --- docs/MANUAL_INSTALL.md | 6 +++--- src/afpacket_plugin/afpacket_collector.cpp | 4 ++-- src/example_plugin/example_collector.cpp | 2 +- src/fastnetmon.cpp | 20 +++++++++---------- src/fastnetmon_actions.h | 2 +- src/netflow_plugin/netflow_collector.cpp | 2 +- src/netmap_plugin/netmap_collector.cpp | 4 ++-- src/pfring_plugin/pfring_collector.cpp | 6 +++--- src/sflow_plugin/sflow_collector.cpp | 2 +- .../snabbswitch_collector.cpp | 4 ++-- ...libcuckoo_as_flow_tracking_structure.patch | 2 +- src/tests/pfring_parser_zc_issue.c | 2 +- 12 files changed, 28 insertions(+), 28 deletions(-) diff --git a/docs/MANUAL_INSTALL.md b/docs/MANUAL_INSTALL.md index e38c2cd1..14bcf63e 100644 --- a/docs/MANUAL_INSTALL.md +++ b/docs/MANUAL_INSTALL.md @@ -68,7 +68,7 @@ echo "/opt/pf_ring/lib" > /etc/ld.so.conf.d/pf_ring.conf ldconfig -v ``` -It's REQUIRED to add all your networks in CIDR form to file /etc/networks_list if form when one subnet on one line. Please aggregate your networks because long networks list will significatly slow down programm. And please change REDIS_SUPPORT = yes to no in Makefile if you do not need traffic counting feature. When you running this software in OpenVZ node you may did not specify networks explicitly, we can read it from file /proc/vz/veip. +It's REQUIRED to add all your networks in CIDR form to file /etc/networks_list if form when one subnet on one line. Please aggregate your networks because long networks list will significatly slow down program. And please change REDIS_SUPPORT = yes to no in Makefile if you do not need traffic counting feature. When you running this software in OpenVZ node you may did not specify networks explicitly, we can read it from file /proc/vz/veip. You can add whitelist subnets in similar form to /etc/networks_whitelist (CIDR masks too). @@ -82,12 +82,12 @@ Start it: ./fastnetmon eth1,eth2 ``` -Enable programm start on server startup, please add to /etc/rc.local this lines: +Enable program start on server startup, please add to /etc/rc.local this lines: ```bash screen -S fastnetmon -d -m /root/fastnetmon/fastnetmon ``` -When incoming or outgoing attack arrives programm call bash script (when it exists): /usr/local/bin/notify_about_attack.sh two times. First time when threshold exceed (at this step we know IP, direction and power of attack). Second when we collect 100 packets for detailed audit what did happens. +When incoming or outgoing attack arrives program call bash script (when it exists): /usr/local/bin/notify_about_attack.sh two times. First time when threshold exceed (at this step we know IP, direction and power of attack). Second when we collect 100 packets for detailed audit what did happens. ==Command Line Reference diff --git a/src/afpacket_plugin/afpacket_collector.cpp b/src/afpacket_plugin/afpacket_collector.cpp index 83043e71..c5d78070 100644 --- a/src/afpacket_plugin/afpacket_collector.cpp +++ b/src/afpacket_plugin/afpacket_collector.cpp @@ -43,10 +43,10 @@ #include #include /* the L2 protocols */ -// Get log4cpp logger from main programm +// Get log4cpp logger from main program extern log4cpp::Category& logger; -// Pass unparsed packets number to main programm +// Pass unparsed packets number to main program extern uint64_t total_unparsed_packets; // Global configuration map diff --git a/src/example_plugin/example_collector.cpp b/src/example_plugin/example_collector.cpp index 124822b8..06635bf0 100644 --- a/src/example_plugin/example_collector.cpp +++ b/src/example_plugin/example_collector.cpp @@ -22,7 +22,7 @@ #include "example_collector.h" -// Get log4cpp logger from main programm +// Get log4cpp logger from main program extern log4cpp::Category& logger; // Global configuration map diff --git a/src/fastnetmon.cpp b/src/fastnetmon.cpp index e38fc664..46964443 100644 --- a/src/fastnetmon.cpp +++ b/src/fastnetmon.cpp @@ -315,7 +315,7 @@ bool print_average_traffic_counts = true; // Key used for sorting clients in output. Allowed sort params: packets/bytes/flows std::string sort_parameter = "packets"; -// Number of lines in programm output +// Number of lines in program output unsigned int max_ips_in_list = 7; // Number of lines for sending ben attack details to email @@ -458,7 +458,7 @@ std::string print_ddos_attack_details(); void recalculate_speed(); std::string print_channel_speed(std::string traffic_type, direction packet_direction); void process_packet(simple_packet& current_packet); -void traffic_draw_programm(); +void traffic_draw_program(); void interruption_signal_handler(int signal_number); #ifdef FASTNETMON_API @@ -625,7 +625,7 @@ void sigpipe_handler_for_popen(int signo) { bool exec_with_stdin_params(std::string cmd, std::string params) { FILE* pipe = popen(cmd.c_str(), "w"); if (!pipe) { - logger << log4cpp::Priority::ERROR << "Can't execute programm " << cmd + logger << log4cpp::Priority::ERROR << "Can't execute program " << cmd << " error code: " << errno << " error text: " << strerror(errno); return false; } @@ -636,7 +636,7 @@ bool exec_with_stdin_params(std::string cmd, std::string params) { pclose(pipe); return true; } else { - logger << log4cpp::Priority::ERROR << "Can't pass data to stdin of programm " << cmd; + logger << log4cpp::Priority::ERROR << "Can't pass data to stdin of program " << cmd; pclose(pipe); return false; } @@ -2051,7 +2051,7 @@ void screen_draw_thread() { // Available only from boost 1.54: boost::this_thread::sleep_for( // boost::chrono::seconds(check_period) ); boost::this_thread::sleep(boost::posix_time::seconds(check_period)); - traffic_draw_programm(); + traffic_draw_program(); } } @@ -2107,7 +2107,7 @@ void recalculate_speed() { double time_difference = difftime(start_time, last_call_of_traffic_recalculation); if (time_difference < 1) { - // It could occur on programm start + // It could occur on program start logger << log4cpp::Priority::INFO << "We skip one iteration of speed_calc because it runs so early!"; return; @@ -2313,11 +2313,11 @@ void print_screen_contents_into_file(std::string screen_data_stats_param) { screen_data_file << screen_data_stats_param; screen_data_file.close(); } else { - logger << log4cpp::Priority::ERROR << "Can't print programm screen into file"; + logger << log4cpp::Priority::ERROR << "Can't print program screen into file"; } } -void traffic_draw_programm() { +void traffic_draw_program() { std::stringstream output_buffer; // logger< > flow_tracking_table_new_generation; diff --git a/src/tests/pfring_parser_zc_issue.c b/src/tests/pfring_parser_zc_issue.c index 14d18e53..2d7a2525 100644 --- a/src/tests/pfring_parser_zc_issue.c +++ b/src/tests/pfring_parser_zc_issue.c @@ -59,7 +59,7 @@ int main() { pfring_set_application_name(pf_ring_descr, (char*)"fastnetmon"); if (pfring_set_application_name_result != 0) { - std::cout << "Can't set programm name for PF_RING: pfring_set_application_name"; + std::cout << "Can't set program name for PF_RING: pfring_set_application_name"; } pfring_version(pf_ring_descr, &version);