Browse Source

[3481] Move perfdhcp source to src/bin/perfdhcp

Also modifiy Makefiles to install perfdhcp into sbin.
Stephen Morris 10 years ago
parent
commit
1c76dae799
41 changed files with 41 additions and 42 deletions
  1. 22 22
      configure.ac
  2. 1 1
      src/bin/Makefile.am
  3. 0 0
      src/bin/perfdhcp/.gitignore
  4. 3 3
      tests/tools/perfdhcp/Makefile.am
  5. 0 0
      src/bin/perfdhcp/command_options.cc
  6. 0 0
      src/bin/perfdhcp/command_options.h
  7. 0 0
      src/bin/perfdhcp/localized_option.h
  8. 1 2
      tests/tools/perfdhcp/main.cc
  9. 0 0
      src/bin/perfdhcp/packet_storage.h
  10. 0 0
      src/bin/perfdhcp/perf_pkt4.cc
  11. 2 2
      tests/tools/perfdhcp/perf_pkt4.h
  12. 0 0
      src/bin/perfdhcp/perf_pkt6.cc
  13. 0 0
      src/bin/perfdhcp/perf_pkt6.h
  14. 1 1
      tests/tools/perfdhcp/perfdhcp.xml
  15. 0 0
      src/bin/perfdhcp/perfdhcp_internals.dox
  16. 2 2
      tests/tools/perfdhcp/pkt_transform.cc
  17. 0 0
      src/bin/perfdhcp/pkt_transform.h
  18. 0 0
      src/bin/perfdhcp/rate_control.cc
  19. 0 0
      src/bin/perfdhcp/rate_control.h
  20. 0 0
      src/bin/perfdhcp/stats_mgr.h
  21. 0 0
      src/bin/perfdhcp/test_control.cc
  22. 0 0
      src/bin/perfdhcp/test_control.h
  23. 0 0
      src/bin/perfdhcp/tests/.gitignore
  24. 6 6
      tests/tools/perfdhcp/tests/Makefile.am
  25. 0 0
      src/bin/perfdhcp/tests/command_options_helper.h
  26. 2 2
      tests/tools/perfdhcp/tests/command_options_unittest.cc
  27. 0 0
      src/bin/perfdhcp/tests/localized_option_unittest.cc
  28. 0 0
      src/bin/perfdhcp/tests/packet_storage_unittest.cc
  29. 0 0
      src/bin/perfdhcp/tests/perf_pkt4_unittest.cc
  30. 0 0
      src/bin/perfdhcp/tests/perf_pkt6_unittest.cc
  31. 0 0
      src/bin/perfdhcp/tests/rate_control_unittest.cc
  32. 0 0
      src/bin/perfdhcp/tests/run_unittests.cc
  33. 0 0
      src/bin/perfdhcp/tests/stats_mgr_unittest.cc
  34. 0 0
      src/bin/perfdhcp/tests/test_control_unittest.cc
  35. 0 0
      src/bin/perfdhcp/tests/testdata/.gitignore
  36. 0 0
      src/bin/perfdhcp/tests/testdata/Makefile.am
  37. 0 0
      src/bin/perfdhcp/tests/testdata/discover-example.hex
  38. 0 0
      src/bin/perfdhcp/tests/testdata/request4-example.hex
  39. 0 0
      src/bin/perfdhcp/tests/testdata/request6-example.hex
  40. 0 0
      src/bin/perfdhcp/tests/testdata/solicit-example.hex
  41. 1 1
      tests/tools/Makefile.am

+ 22 - 22
configure.ac

@@ -1363,6 +1363,8 @@ AC_CONFIG_FILES([compatcheck/Makefile
                  ext/Makefile
                  m4macros/Makefile
                  Makefile
+                 src/Makefile
+                 src/bin/Makefile
                  src/bin/d2/Makefile
                  src/bin/d2/spec_config.h.pre
                  src/bin/d2/tests/Makefile
@@ -1370,32 +1372,35 @@ AC_CONFIG_FILES([compatcheck/Makefile
                  src/bin/d2/tests/test_data_files_config.h
                  src/bin/dhcp4/Makefile
                  src/bin/dhcp4/spec_config.h.pre
-                 src/bin/dhcp4/tests/dhcp4_process_tests.sh
                  src/bin/dhcp4/tests/Makefile
+                 src/bin/dhcp4/tests/dhcp4_process_tests.sh
                  src/bin/dhcp4/tests/marker_file.h
                  src/bin/dhcp4/tests/test_data_files_config.h
                  src/bin/dhcp4/tests/test_libraries.h
                  src/bin/dhcp6/Makefile
                  src/bin/dhcp6/spec_config.h.pre
-                 src/bin/dhcp6/tests/dhcp6_process_tests.sh
                  src/bin/dhcp6/tests/Makefile
+                 src/bin/dhcp6/tests/dhcp6_process_tests.sh
                  src/bin/dhcp6/tests/marker_file.h
                  src/bin/dhcp6/tests/test_data_files_config.h
                  src/bin/dhcp6/tests/test_libraries.h
-                 src/bin/keactrl/keactrl
+                 src/bin/keactrl/Makefile
                  src/bin/keactrl/kea.conf
+                 src/bin/keactrl/keactrl
                  src/bin/keactrl/keactrl.conf
-                 src/bin/keactrl/Makefile
-                 src/bin/keactrl/tests/keactrl_tests.sh
                  src/bin/keactrl/tests/Makefile
-                 src/bin/Makefile
+                 src/bin/keactrl/tests/keactrl_tests.sh
+                 src/bin/perfdhcp/Makefile
+                 src/bin/perfdhcp/tests/Makefile
+                 src/bin/perfdhcp/tests/testdata/Makefile
                  src/bin/sockcreator/Makefile
                  src/bin/sockcreator/tests/Makefile
+                 src/hooks/Makefile
                  src/hooks/dhcp/Makefile
                  src/hooks/dhcp/user_chk/Makefile
                  src/hooks/dhcp/user_chk/tests/Makefile
                  src/hooks/dhcp/user_chk/tests/test_data_files_config.h
-                 src/hooks/Makefile
+                 src/lib/Makefile
                  src/lib/asiodns/Makefile
                  src/lib/asiodns/tests/Makefile
                  src/lib/asiolink/Makefile
@@ -1405,21 +1410,21 @@ AC_CONFIG_FILES([compatcheck/Makefile
                  src/lib/cc/tests/Makefile
                  src/lib/cc/tests/session_unittests_config.h
                  src/lib/config/Makefile
-                 src/lib/config/tests/data_def_unittests_config.h
                  src/lib/config/tests/Makefile
+                 src/lib/config/tests/data_def_unittests_config.h
                  src/lib/config/tests/testdata/Makefile
                  src/lib/cryptolink/Makefile
                  src/lib/cryptolink/tests/Makefile
+                 src/lib/dhcp/Makefile
+                 src/lib/dhcp/tests/Makefile
                  src/lib/dhcp_ddns/Makefile
                  src/lib/dhcp_ddns/tests/Makefile
-                 src/lib/dhcp/Makefile
                  src/lib/dhcpsrv/Makefile
-                 src/lib/dhcpsrv/testutils/Makefile
                  src/lib/dhcpsrv/tests/Makefile
                  src/lib/dhcpsrv/tests/test_libraries.h
-                 src/lib/dhcp/tests/Makefile
-                 src/lib/dns/gen-rdatacode.py
+                 src/lib/dhcpsrv/testutils/Makefile
                  src/lib/dns/Makefile
+                 src/lib/dns/gen-rdatacode.py
                  src/lib/dns/tests/Makefile
                  src/lib/dns/tests/testdata/Makefile
                  src/lib/exceptions/Makefile
@@ -1428,37 +1433,32 @@ AC_CONFIG_FILES([compatcheck/Makefile
                  src/lib/hooks/tests/Makefile
                  src/lib/hooks/tests/marker_file.h
                  src/lib/hooks/tests/test_libraries.h
+                 src/lib/log/Makefile
                  src/lib/log/compiler/Makefile
                  src/lib/log/interprocess/Makefile
                  src/lib/log/interprocess/tests/Makefile
-                 src/lib/log/Makefile
+                 src/lib/log/tests/Makefile
                  src/lib/log/tests/buffer_logger_test.sh
                  src/lib/log/tests/console_test.sh
                  src/lib/log/tests/destination_test.sh
                  src/lib/log/tests/init_logger_test.sh
                  src/lib/log/tests/local_file_test.sh
                  src/lib/log/tests/logger_lock_test.sh
-                 src/lib/log/tests/Makefile
                  src/lib/log/tests/severity_test.sh
                  src/lib/log/tests/tempdir.h
-                 src/lib/Makefile
-                 src/lib/testutils/dhcp_test_lib.sh
                  src/lib/testutils/Makefile
+                 src/lib/testutils/dhcp_test_lib.sh
                  src/lib/testutils/testdata/Makefile
-                 src/lib/util/io/Makefile
                  src/lib/util/Makefile
-                 src/lib/util/python/gen_wiredata.py
+                 src/lib/util/io/Makefile
                  src/lib/util/python/Makefile
+                 src/lib/util/python/gen_wiredata.py
                  src/lib/util/tests/Makefile
                  src/lib/util/threads/Makefile
                  src/lib/util/threads/tests/Makefile
                  src/lib/util/unittests/Makefile
-                 src/Makefile
                  tests/Makefile
                  tests/tools/Makefile
-                 tests/tools/perfdhcp/Makefile
-                 tests/tools/perfdhcp/tests/Makefile
-                 tests/tools/perfdhcp/tests/testdata/Makefile
 ])
 
  AC_CONFIG_COMMANDS([permissions], [

+ 1 - 1
src/bin/Makefile.am

@@ -1,5 +1,5 @@
 # The following build order must be maintained.
-SUBDIRS = sockcreator dhcp4 dhcp6 d2
+SUBDIRS = sockcreator dhcp4 dhcp6 d2 perfdhcp
 
 if CONFIG_BACKEND_JSON
 SUBDIRS += keactrl

tests/tools/perfdhcp/.gitignore → src/bin/perfdhcp/.gitignore


+ 3 - 3
tests/tools/perfdhcp/Makefile.am

@@ -17,7 +17,7 @@ if USE_STATIC_LINK
 AM_LDFLAGS += -static
 endif
 
-bin_PROGRAMS = perfdhcp
+sbin_PROGRAMS = perfdhcp
 perfdhcp_SOURCES = main.cc
 perfdhcp_SOURCES += command_options.cc command_options.h
 perfdhcp_SOURCES += localized_option.h
@@ -45,13 +45,13 @@ perfdhcp_LDADD += $(top_builddir)/src/lib/asiolink/libkea-asiolink.la
 # ... and the documentation
 EXTRA_DIST = perfdhcp_internals.dox
 
-man_MANS = perfdhcp.1
+man_MANS = perfdhcp.8
 DISTCLEANFILES = $(man_MANS)
 EXTRA_DIST += $(man_MANS) perfdhcp.xml
 
 if GENERATE_DOCS
 
-perfdhcp.1: perfdhcp.xml
+perfdhcp.8: perfdhcp.xml
 	@XSLTPROC@ --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(builddir)/perfdhcp.xml
 
 else

tests/tools/perfdhcp/command_options.cc → src/bin/perfdhcp/command_options.cc


tests/tools/perfdhcp/command_options.h → src/bin/perfdhcp/command_options.h


tests/tools/perfdhcp/localized_option.h → src/bin/perfdhcp/localized_option.h


+ 1 - 2
tests/tools/perfdhcp/main.cc

@@ -1,4 +1,4 @@
-// Copyright (C) 2012-2013  Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2012-2014  Internet Systems Consortium, Inc. ("ISC")
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above
@@ -61,4 +61,3 @@ main(int argc, char* argv[]) {
     }
     return (ret_code);
 }
-

tests/tools/perfdhcp/packet_storage.h → src/bin/perfdhcp/packet_storage.h


tests/tools/perfdhcp/perf_pkt4.cc → src/bin/perfdhcp/perf_pkt4.cc


+ 2 - 2
tests/tools/perfdhcp/perf_pkt4.h

@@ -1,4 +1,4 @@
-// Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2012-2014 Internet Systems Consortium, Inc. ("ISC")
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above
@@ -113,7 +113,7 @@ public:
     void writeAt(size_t dest_pos,
                  std::vector<uint8_t>::iterator first,
                  std::vector<uint8_t>::iterator last);
-    
+
     /// \brief Replace contents of buffer with value.
     ///
     /// Function replaces part of buffer with value.

tests/tools/perfdhcp/perf_pkt6.cc → src/bin/perfdhcp/perf_pkt6.cc


tests/tools/perfdhcp/perf_pkt6.h → src/bin/perfdhcp/perf_pkt6.h


+ 1 - 1
tests/tools/perfdhcp/perfdhcp.xml

@@ -24,7 +24,7 @@
 
     <refmeta>
         <refentrytitle>perfdhcp</refentrytitle>
-        <manvolnum>1</manvolnum>
+        <manvolnum>8</manvolnum>
         <refmiscinfo>Kea</refmiscinfo>
     </refmeta>
 

tests/tools/perfdhcp/perfdhcp_internals.dox → src/bin/perfdhcp/perfdhcp_internals.dox


+ 2 - 2
tests/tools/perfdhcp/pkt_transform.cc

@@ -1,4 +1,4 @@
-// Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2012-2014 Internet Systems Consortium, Inc. ("ISC")
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above
@@ -214,7 +214,7 @@ PktTransform::unpackOptions(const OptionBuffer& in_buffer,
                         in_buffer.begin() + offset + opt_len);
     }
 }
-    
+
 void
 PktTransform::writeAt(dhcp::OptionBuffer& in_buffer, size_t dest_pos,
                       dhcp::OptionBuffer::iterator first,

tests/tools/perfdhcp/pkt_transform.h → src/bin/perfdhcp/pkt_transform.h


tests/tools/perfdhcp/rate_control.cc → src/bin/perfdhcp/rate_control.cc


tests/tools/perfdhcp/rate_control.h → src/bin/perfdhcp/rate_control.h


tests/tools/perfdhcp/stats_mgr.h → src/bin/perfdhcp/stats_mgr.h


tests/tools/perfdhcp/test_control.cc → src/bin/perfdhcp/test_control.cc


tests/tools/perfdhcp/test_control.h → src/bin/perfdhcp/test_control.h


tests/tools/perfdhcp/tests/.gitignore → src/bin/perfdhcp/tests/.gitignore


+ 6 - 6
tests/tools/perfdhcp/tests/Makefile.am

@@ -31,12 +31,12 @@ run_unittests_SOURCES += rate_control_unittest.cc
 run_unittests_SOURCES += stats_mgr_unittest.cc
 run_unittests_SOURCES += test_control_unittest.cc
 run_unittests_SOURCES += command_options_helper.h
-run_unittests_SOURCES += $(top_builddir)/tests/tools/perfdhcp/command_options.cc
-run_unittests_SOURCES += $(top_builddir)/tests/tools/perfdhcp/pkt_transform.cc
-run_unittests_SOURCES += $(top_builddir)/tests/tools/perfdhcp/perf_pkt6.cc
-run_unittests_SOURCES += $(top_builddir)/tests/tools/perfdhcp/perf_pkt4.cc
-run_unittests_SOURCES += $(top_builddir)/tests/tools/perfdhcp/rate_control.cc
-run_unittests_SOURCES += $(top_builddir)/tests/tools/perfdhcp/test_control.cc
+run_unittests_SOURCES += $(top_builddir)/src/bin/perfdhcp/command_options.cc
+run_unittests_SOURCES += $(top_builddir)/src/bin/perfdhcp/pkt_transform.cc
+run_unittests_SOURCES += $(top_builddir)/src/bin/perfdhcp/perf_pkt6.cc
+run_unittests_SOURCES += $(top_builddir)/src/bin/perfdhcp/perf_pkt4.cc
+run_unittests_SOURCES += $(top_builddir)/src/bin/perfdhcp/rate_control.cc
+run_unittests_SOURCES += $(top_builddir)/src/bin/perfdhcp/test_control.cc
 
 run_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)
 run_unittests_LDFLAGS  = $(AM_LDFLAGS)  $(GTEST_LDFLAGS)

tests/tools/perfdhcp/tests/command_options_helper.h → src/bin/perfdhcp/tests/command_options_helper.h


+ 2 - 2
tests/tools/perfdhcp/tests/command_options_unittest.cc

@@ -1,4 +1,4 @@
-// Copyright (C) 2012-2013 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2012-2014 Internet Systems Consortium, Inc. ("ISC")
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above
@@ -781,7 +781,7 @@ TEST_F(CommandOptionsTest, Interface) {
     const dhcp::IfaceMgr::IfaceCollection& ifaces = iface_mgr.getIfaces();
     std::string iface_name;
     CommandOptions& opt = CommandOptions::instance();
-    // The local loopback interface should be available. 
+    // The local loopback interface should be available.
     // If no interface have been found for any reason we should
     // not fail this test.
     if (ifaces.size() > 0) {

tests/tools/perfdhcp/tests/localized_option_unittest.cc → src/bin/perfdhcp/tests/localized_option_unittest.cc


tests/tools/perfdhcp/tests/packet_storage_unittest.cc → src/bin/perfdhcp/tests/packet_storage_unittest.cc


tests/tools/perfdhcp/tests/perf_pkt4_unittest.cc → src/bin/perfdhcp/tests/perf_pkt4_unittest.cc


tests/tools/perfdhcp/tests/perf_pkt6_unittest.cc → src/bin/perfdhcp/tests/perf_pkt6_unittest.cc


tests/tools/perfdhcp/tests/rate_control_unittest.cc → src/bin/perfdhcp/tests/rate_control_unittest.cc


tests/tools/perfdhcp/tests/run_unittests.cc → src/bin/perfdhcp/tests/run_unittests.cc


tests/tools/perfdhcp/tests/stats_mgr_unittest.cc → src/bin/perfdhcp/tests/stats_mgr_unittest.cc


tests/tools/perfdhcp/tests/test_control_unittest.cc → src/bin/perfdhcp/tests/test_control_unittest.cc


tests/tools/perfdhcp/tests/testdata/.gitignore → src/bin/perfdhcp/tests/testdata/.gitignore


tests/tools/perfdhcp/tests/testdata/Makefile.am → src/bin/perfdhcp/tests/testdata/Makefile.am


tests/tools/perfdhcp/tests/testdata/discover-example.hex → src/bin/perfdhcp/tests/testdata/discover-example.hex


tests/tools/perfdhcp/tests/testdata/request4-example.hex → src/bin/perfdhcp/tests/testdata/request4-example.hex


tests/tools/perfdhcp/tests/testdata/request6-example.hex → src/bin/perfdhcp/tests/testdata/request6-example.hex


tests/tools/perfdhcp/tests/testdata/solicit-example.hex → src/bin/perfdhcp/tests/testdata/solicit-example.hex


+ 1 - 1
tests/tools/Makefile.am

@@ -1 +1 @@
-SUBDIRS = . perfdhcp
+SUBDIRS = .