From d8c2e4888b465313f1c89820bde8a5353715d293 Mon Sep 17 00:00:00 2001 From: Pavel Odintsov Date: Sun, 22 Mar 2015 13:36:58 +0300 Subject: [PATCH] Move all code to src folder --- .travis.yml | 1 + docs/INSTALL.md | 2 +- CMakeLists.txt => src/CMakeLists.txt | 0 asn_geoip_update.sh => src/asn_geoip_update.sh | 0 .../build_plugin_tester.sh | 0 .../example_plugin}/example_collector.cpp | 0 .../example_plugin}/example_collector.h | 0 fast_library.cpp => src/fast_library.cpp | 0 fast_library.h => src/fast_library.h | 0 .../fast_priority_queue.cpp | 0 fast_priority_queue.h => src/fast_priority_queue.h | 0 fastnetmon.cpp => src/fastnetmon.cpp | 0 fastnetmon_client.cpp => src/fastnetmon_client.cpp | 0 fastnetmon_install.pl => src/fastnetmon_install.pl | 2 +- .../fastnetmon_packet_parser.c | 0 .../fastnetmon_packet_parser.h | 0 fastnetmon_types.h => src/fastnetmon_types.h | 0 .../ipfix_csv_processor.pl | 0 {libpatricia => src/libpatricia}/copyright | 0 {libpatricia => src/libpatricia}/credits.txt | 0 {libpatricia => src/libpatricia}/patricia.c | 0 {libpatricia => src/libpatricia}/patricia.h | 0 {netflow_plugin => src/netflow_plugin}/netflow.h | 0 .../netflow_plugin}/netflow_collector.cpp | 0 .../netflow_plugin}/netflow_collector.h | 0 .../netmap_plugin}/netmap_collector.cpp | 0 .../netmap_plugin}/netmap_collector.h | 0 .../netmap_plugin}/netmap_includes/net/netmap.h | 0 .../netmap_includes/net/netmap_user.h | 0 {pcap_plugin => src/pcap_plugin}/pcap_collector.cpp | 0 {pcap_plugin => src/pcap_plugin}/pcap_collector.h | 0 .../pfring_plugin}/pfring_collector.cpp | 0 .../pfring_plugin}/pfring_collector.h | 0 plugin_runner.cpp => src/plugin_runner.cpp | 0 {sflow_plugin => src/sflow_plugin}/sflow.h | 0 .../sflow_plugin}/sflow_collector.cpp | 0 .../sflow_plugin}/sflow_collector.h | 0 {tests => src/tests}/DATA_STRUCTURES.md | 0 {tests => src/tests}/build_lpm_test.bash | 0 {tests => src/tests}/build_netmap.bash | 0 {tests => src/tests}/build_pcap_reader.sh | 0 {tests => src/tests}/ip_lookup.cpp | 0 .../tests}/long_prefix_match_unused_code.cpp | 0 {tests => src/tests}/lpm_performance_tests.cpp | 0 {tests => src/tests}/lru_cache/README | 0 {tests => src/tests}/lru_cache/lru_cache.cpp | 0 {tests => src/tests}/lru_cache/lru_cache.h | 0 {tests => src/tests}/lru_cache/lru_cache.h.gch | Bin {tests => src/tests}/netmap.cpp | 0 {tests => src/tests}/pcap_reader.cpp | 0 {tests => src/tests}/pfring_parser_zc_issue.c | 0 {tests => src/tests}/sort_struct.cpp | 0 {tests => src/tests}/test_cidr.cpp | 0 .../tests}/traffic_structures_performance_tests.cpp | 0 54 files changed, 3 insertions(+), 2 deletions(-) rename CMakeLists.txt => src/CMakeLists.txt (100%) rename asn_geoip_update.sh => src/asn_geoip_update.sh (100%) rename build_plugin_tester.sh => src/build_plugin_tester.sh (100%) rename {example_plugin => src/example_plugin}/example_collector.cpp (100%) rename {example_plugin => src/example_plugin}/example_collector.h (100%) rename fast_library.cpp => src/fast_library.cpp (100%) rename fast_library.h => src/fast_library.h (100%) rename fast_priority_queue.cpp => src/fast_priority_queue.cpp (100%) rename fast_priority_queue.h => src/fast_priority_queue.h (100%) rename fastnetmon.cpp => src/fastnetmon.cpp (100%) rename fastnetmon_client.cpp => src/fastnetmon_client.cpp (100%) rename fastnetmon_install.pl => src/fastnetmon_install.pl (99%) rename fastnetmon_packet_parser.c => src/fastnetmon_packet_parser.c (100%) rename fastnetmon_packet_parser.h => src/fastnetmon_packet_parser.h (100%) rename fastnetmon_types.h => src/fastnetmon_types.h (100%) rename ipfix_csv_processor.pl => src/ipfix_csv_processor.pl (100%) rename {libpatricia => src/libpatricia}/copyright (100%) rename {libpatricia => src/libpatricia}/credits.txt (100%) rename {libpatricia => src/libpatricia}/patricia.c (100%) rename {libpatricia => src/libpatricia}/patricia.h (100%) rename {netflow_plugin => src/netflow_plugin}/netflow.h (100%) rename {netflow_plugin => src/netflow_plugin}/netflow_collector.cpp (100%) rename {netflow_plugin => src/netflow_plugin}/netflow_collector.h (100%) rename {netmap_plugin => src/netmap_plugin}/netmap_collector.cpp (100%) rename {netmap_plugin => src/netmap_plugin}/netmap_collector.h (100%) rename {netmap_plugin => src/netmap_plugin}/netmap_includes/net/netmap.h (100%) rename {netmap_plugin => src/netmap_plugin}/netmap_includes/net/netmap_user.h (100%) rename {pcap_plugin => src/pcap_plugin}/pcap_collector.cpp (100%) rename {pcap_plugin => src/pcap_plugin}/pcap_collector.h (100%) rename {pfring_plugin => src/pfring_plugin}/pfring_collector.cpp (100%) rename {pfring_plugin => src/pfring_plugin}/pfring_collector.h (100%) rename plugin_runner.cpp => src/plugin_runner.cpp (100%) rename {sflow_plugin => src/sflow_plugin}/sflow.h (100%) rename {sflow_plugin => src/sflow_plugin}/sflow_collector.cpp (100%) rename {sflow_plugin => src/sflow_plugin}/sflow_collector.h (100%) rename {tests => src/tests}/DATA_STRUCTURES.md (100%) rename {tests => src/tests}/build_lpm_test.bash (100%) rename {tests => src/tests}/build_netmap.bash (100%) rename {tests => src/tests}/build_pcap_reader.sh (100%) rename {tests => src/tests}/ip_lookup.cpp (100%) rename {tests => src/tests}/long_prefix_match_unused_code.cpp (100%) rename {tests => src/tests}/lpm_performance_tests.cpp (100%) rename {tests => src/tests}/lru_cache/README (100%) rename {tests => src/tests}/lru_cache/lru_cache.cpp (100%) rename {tests => src/tests}/lru_cache/lru_cache.h (100%) rename {tests => src/tests}/lru_cache/lru_cache.h.gch (100%) rename {tests => src/tests}/netmap.cpp (100%) rename {tests => src/tests}/pcap_reader.cpp (100%) rename {tests => src/tests}/pfring_parser_zc_issue.c (100%) rename {tests => src/tests}/sort_struct.cpp (100%) rename {tests => src/tests}/test_cidr.cpp (100%) rename {tests => src/tests}/traffic_structures_performance_tests.cpp (100%) diff --git a/.travis.yml b/.travis.yml index 092994e..287037a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,7 @@ before_script: - sudo apt-get install -y build-essential bison flex libnuma-dev wget tar make - cd PF_RING-6.0.2; sudo cp kernel/linux/pf_ring.h /usr/include/linux; cd userland/lib; ./configure --prefix=/opt/pf_ring; make; sudo make install - cd `cat /tmp/old_current_path` + - cd src script: mkdir -p build; cd build; cmake ..; make notifications: email: diff --git a/docs/INSTALL.md b/docs/INSTALL.md index 93de3f3..1bcccd2 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -1,6 +1,6 @@ For Debian 6, 7 and CentOS 6 and 7 you should use the automatic installer: ```bash -wget https://raw.githubusercontent.com/FastVPSEestiOu/fastnetmon/master/fastnetmon_install.pl +wget https://raw.githubusercontent.com/FastVPSEestiOu/fastnetmon/master/src/fastnetmon_install.pl perl fastnetmon_install.pl ``` If you want to use netmap module, please install it: [netmap install](NETMAP_INSTALL.md) diff --git a/CMakeLists.txt b/src/CMakeLists.txt similarity index 100% rename from CMakeLists.txt rename to src/CMakeLists.txt diff --git a/asn_geoip_update.sh b/src/asn_geoip_update.sh similarity index 100% rename from asn_geoip_update.sh rename to src/asn_geoip_update.sh diff --git a/build_plugin_tester.sh b/src/build_plugin_tester.sh similarity index 100% rename from build_plugin_tester.sh rename to src/build_plugin_tester.sh diff --git a/example_plugin/example_collector.cpp b/src/example_plugin/example_collector.cpp similarity index 100% rename from example_plugin/example_collector.cpp rename to src/example_plugin/example_collector.cpp diff --git a/example_plugin/example_collector.h b/src/example_plugin/example_collector.h similarity index 100% rename from example_plugin/example_collector.h rename to src/example_plugin/example_collector.h diff --git a/fast_library.cpp b/src/fast_library.cpp similarity index 100% rename from fast_library.cpp rename to src/fast_library.cpp diff --git a/fast_library.h b/src/fast_library.h similarity index 100% rename from fast_library.h rename to src/fast_library.h diff --git a/fast_priority_queue.cpp b/src/fast_priority_queue.cpp similarity index 100% rename from fast_priority_queue.cpp rename to src/fast_priority_queue.cpp diff --git a/fast_priority_queue.h b/src/fast_priority_queue.h similarity index 100% rename from fast_priority_queue.h rename to src/fast_priority_queue.h diff --git a/fastnetmon.cpp b/src/fastnetmon.cpp similarity index 100% rename from fastnetmon.cpp rename to src/fastnetmon.cpp diff --git a/fastnetmon_client.cpp b/src/fastnetmon_client.cpp similarity index 100% rename from fastnetmon_client.cpp rename to src/fastnetmon_client.cpp diff --git a/fastnetmon_install.pl b/src/fastnetmon_install.pl similarity index 99% rename from fastnetmon_install.pl rename to src/fastnetmon_install.pl index 14da997..99e56f3 100755 --- a/fastnetmon_install.pl +++ b/src/fastnetmon_install.pl @@ -150,7 +150,7 @@ sub install { print "Clone FastNetMon repo\n"; chdir "/usr/src"; - my $fastnetmon_code_dir = "/usr/src/fastnetmon"; + my $fastnetmon_code_dir = "/usr/src/fastnetmon/src"; if (-e $fastnetmon_code_dir) { # Code already downloaded diff --git a/fastnetmon_packet_parser.c b/src/fastnetmon_packet_parser.c similarity index 100% rename from fastnetmon_packet_parser.c rename to src/fastnetmon_packet_parser.c diff --git a/fastnetmon_packet_parser.h b/src/fastnetmon_packet_parser.h similarity index 100% rename from fastnetmon_packet_parser.h rename to src/fastnetmon_packet_parser.h diff --git a/fastnetmon_types.h b/src/fastnetmon_types.h similarity index 100% rename from fastnetmon_types.h rename to src/fastnetmon_types.h diff --git a/ipfix_csv_processor.pl b/src/ipfix_csv_processor.pl similarity index 100% rename from ipfix_csv_processor.pl rename to src/ipfix_csv_processor.pl diff --git a/libpatricia/copyright b/src/libpatricia/copyright similarity index 100% rename from libpatricia/copyright rename to src/libpatricia/copyright diff --git a/libpatricia/credits.txt b/src/libpatricia/credits.txt similarity index 100% rename from libpatricia/credits.txt rename to src/libpatricia/credits.txt diff --git a/libpatricia/patricia.c b/src/libpatricia/patricia.c similarity index 100% rename from libpatricia/patricia.c rename to src/libpatricia/patricia.c diff --git a/libpatricia/patricia.h b/src/libpatricia/patricia.h similarity index 100% rename from libpatricia/patricia.h rename to src/libpatricia/patricia.h diff --git a/netflow_plugin/netflow.h b/src/netflow_plugin/netflow.h similarity index 100% rename from netflow_plugin/netflow.h rename to src/netflow_plugin/netflow.h diff --git a/netflow_plugin/netflow_collector.cpp b/src/netflow_plugin/netflow_collector.cpp similarity index 100% rename from netflow_plugin/netflow_collector.cpp rename to src/netflow_plugin/netflow_collector.cpp diff --git a/netflow_plugin/netflow_collector.h b/src/netflow_plugin/netflow_collector.h similarity index 100% rename from netflow_plugin/netflow_collector.h rename to src/netflow_plugin/netflow_collector.h diff --git a/netmap_plugin/netmap_collector.cpp b/src/netmap_plugin/netmap_collector.cpp similarity index 100% rename from netmap_plugin/netmap_collector.cpp rename to src/netmap_plugin/netmap_collector.cpp diff --git a/netmap_plugin/netmap_collector.h b/src/netmap_plugin/netmap_collector.h similarity index 100% rename from netmap_plugin/netmap_collector.h rename to src/netmap_plugin/netmap_collector.h diff --git a/netmap_plugin/netmap_includes/net/netmap.h b/src/netmap_plugin/netmap_includes/net/netmap.h similarity index 100% rename from netmap_plugin/netmap_includes/net/netmap.h rename to src/netmap_plugin/netmap_includes/net/netmap.h diff --git a/netmap_plugin/netmap_includes/net/netmap_user.h b/src/netmap_plugin/netmap_includes/net/netmap_user.h similarity index 100% rename from netmap_plugin/netmap_includes/net/netmap_user.h rename to src/netmap_plugin/netmap_includes/net/netmap_user.h diff --git a/pcap_plugin/pcap_collector.cpp b/src/pcap_plugin/pcap_collector.cpp similarity index 100% rename from pcap_plugin/pcap_collector.cpp rename to src/pcap_plugin/pcap_collector.cpp diff --git a/pcap_plugin/pcap_collector.h b/src/pcap_plugin/pcap_collector.h similarity index 100% rename from pcap_plugin/pcap_collector.h rename to src/pcap_plugin/pcap_collector.h diff --git a/pfring_plugin/pfring_collector.cpp b/src/pfring_plugin/pfring_collector.cpp similarity index 100% rename from pfring_plugin/pfring_collector.cpp rename to src/pfring_plugin/pfring_collector.cpp diff --git a/pfring_plugin/pfring_collector.h b/src/pfring_plugin/pfring_collector.h similarity index 100% rename from pfring_plugin/pfring_collector.h rename to src/pfring_plugin/pfring_collector.h diff --git a/plugin_runner.cpp b/src/plugin_runner.cpp similarity index 100% rename from plugin_runner.cpp rename to src/plugin_runner.cpp diff --git a/sflow_plugin/sflow.h b/src/sflow_plugin/sflow.h similarity index 100% rename from sflow_plugin/sflow.h rename to src/sflow_plugin/sflow.h diff --git a/sflow_plugin/sflow_collector.cpp b/src/sflow_plugin/sflow_collector.cpp similarity index 100% rename from sflow_plugin/sflow_collector.cpp rename to src/sflow_plugin/sflow_collector.cpp diff --git a/sflow_plugin/sflow_collector.h b/src/sflow_plugin/sflow_collector.h similarity index 100% rename from sflow_plugin/sflow_collector.h rename to src/sflow_plugin/sflow_collector.h diff --git a/tests/DATA_STRUCTURES.md b/src/tests/DATA_STRUCTURES.md similarity index 100% rename from tests/DATA_STRUCTURES.md rename to src/tests/DATA_STRUCTURES.md diff --git a/tests/build_lpm_test.bash b/src/tests/build_lpm_test.bash similarity index 100% rename from tests/build_lpm_test.bash rename to src/tests/build_lpm_test.bash diff --git a/tests/build_netmap.bash b/src/tests/build_netmap.bash similarity index 100% rename from tests/build_netmap.bash rename to src/tests/build_netmap.bash diff --git a/tests/build_pcap_reader.sh b/src/tests/build_pcap_reader.sh similarity index 100% rename from tests/build_pcap_reader.sh rename to src/tests/build_pcap_reader.sh diff --git a/tests/ip_lookup.cpp b/src/tests/ip_lookup.cpp similarity index 100% rename from tests/ip_lookup.cpp rename to src/tests/ip_lookup.cpp diff --git a/tests/long_prefix_match_unused_code.cpp b/src/tests/long_prefix_match_unused_code.cpp similarity index 100% rename from tests/long_prefix_match_unused_code.cpp rename to src/tests/long_prefix_match_unused_code.cpp diff --git a/tests/lpm_performance_tests.cpp b/src/tests/lpm_performance_tests.cpp similarity index 100% rename from tests/lpm_performance_tests.cpp rename to src/tests/lpm_performance_tests.cpp diff --git a/tests/lru_cache/README b/src/tests/lru_cache/README similarity index 100% rename from tests/lru_cache/README rename to src/tests/lru_cache/README diff --git a/tests/lru_cache/lru_cache.cpp b/src/tests/lru_cache/lru_cache.cpp similarity index 100% rename from tests/lru_cache/lru_cache.cpp rename to src/tests/lru_cache/lru_cache.cpp diff --git a/tests/lru_cache/lru_cache.h b/src/tests/lru_cache/lru_cache.h similarity index 100% rename from tests/lru_cache/lru_cache.h rename to src/tests/lru_cache/lru_cache.h diff --git a/tests/lru_cache/lru_cache.h.gch b/src/tests/lru_cache/lru_cache.h.gch similarity index 100% rename from tests/lru_cache/lru_cache.h.gch rename to src/tests/lru_cache/lru_cache.h.gch diff --git a/tests/netmap.cpp b/src/tests/netmap.cpp similarity index 100% rename from tests/netmap.cpp rename to src/tests/netmap.cpp diff --git a/tests/pcap_reader.cpp b/src/tests/pcap_reader.cpp similarity index 100% rename from tests/pcap_reader.cpp rename to src/tests/pcap_reader.cpp diff --git a/tests/pfring_parser_zc_issue.c b/src/tests/pfring_parser_zc_issue.c similarity index 100% rename from tests/pfring_parser_zc_issue.c rename to src/tests/pfring_parser_zc_issue.c diff --git a/tests/sort_struct.cpp b/src/tests/sort_struct.cpp similarity index 100% rename from tests/sort_struct.cpp rename to src/tests/sort_struct.cpp diff --git a/tests/test_cidr.cpp b/src/tests/test_cidr.cpp similarity index 100% rename from tests/test_cidr.cpp rename to src/tests/test_cidr.cpp diff --git a/tests/traffic_structures_performance_tests.cpp b/src/tests/traffic_structures_performance_tests.cpp similarity index 100% rename from tests/traffic_structures_performance_tests.cpp rename to src/tests/traffic_structures_performance_tests.cpp