summaryrefslogtreecommitdiffstats
path: root/src/lib/dhcp
diff options
context:
space:
mode:
authorAndrei Pavel <andrei@isc.org>2024-03-04 10:48:47 +0100
committerAndrei Pavel <andrei@isc.org>2024-03-21 17:30:04 +0100
commit2be268f2ff51f152e7a25a726d5062caff6de7d8 (patch)
tree200c3f0fa250990962dfc223a1d4a741176deb05 /src/lib/dhcp
parent[#3210] refactor file utilities (diff)
downloadkea-2be268f2ff51f152e7a25a726d5062caff6de7d8.tar.xz
kea-2be268f2ff51f152e7a25a726d5062caff6de7d8.zip
[#3210] refactor io utilities
- Rename util/io_utilities.h to util/io.h to escape redundancy. - Create readUint and writeUint templates. - Use reverse_copy for potential performance boost. - Add missing unit tests.
Diffstat (limited to 'src/lib/dhcp')
-rw-r--r--src/lib/dhcp/duid.cc2
-rw-r--r--src/lib/dhcp/duid_factory.cc2
-rw-r--r--src/lib/dhcp/opaque_data_tuple.h2
-rw-r--r--src/lib/dhcp/option.cc2
-rw-r--r--src/lib/dhcp/option4_addrlst.cc2
-rw-r--r--src/lib/dhcp/option4_client_fqdn.cc2
-rw-r--r--src/lib/dhcp/option6_addrlst.cc2
-rw-r--r--src/lib/dhcp/option6_auth.cc2
-rw-r--r--src/lib/dhcp/option6_client_fqdn.cc2
-rw-r--r--src/lib/dhcp/option6_ia.cc2
-rw-r--r--src/lib/dhcp/option6_iaaddr.cc2
-rw-r--r--src/lib/dhcp/option6_iaprefix.cc2
-rw-r--r--src/lib/dhcp/option6_pdexclude.cc2
-rw-r--r--src/lib/dhcp/option6_status_code.cc2
-rw-r--r--src/lib/dhcp/option_custom.h2
-rw-r--r--src/lib/dhcp/option_data_types.h2
-rw-r--r--src/lib/dhcp/option_int.h2
-rw-r--r--src/lib/dhcp/option_int_array.h2
-rw-r--r--src/lib/dhcp/option_vendor.h2
-rw-r--r--src/lib/dhcp/pkt6.cc2
20 files changed, 20 insertions, 20 deletions
diff --git a/src/lib/dhcp/duid.cc b/src/lib/dhcp/duid.cc
index 2338118feb..ef7a62a0ea 100644
--- a/src/lib/dhcp/duid.cc
+++ b/src/lib/dhcp/duid.cc
@@ -8,7 +8,7 @@
#include <dhcp/duid.h>
#include <exceptions/exceptions.h>
-#include <util/io_utilities.h>
+#include <util/io.h>
#include <iomanip>
#include <cctype>
#include <sstream>
diff --git a/src/lib/dhcp/duid_factory.cc b/src/lib/dhcp/duid_factory.cc
index 8d1ed0e046..43c33638dc 100644
--- a/src/lib/dhcp/duid_factory.cc
+++ b/src/lib/dhcp/duid_factory.cc
@@ -9,7 +9,7 @@
#include <dhcp/duid_factory.h>
#include <dhcp/iface_mgr.h>
#include <exceptions/exceptions.h>
-#include <util/io_utilities.h>
+#include <util/io.h>
#include <util/range_utilities.h>
#include <util/strutil.h>
#include <ctime>
diff --git a/src/lib/dhcp/opaque_data_tuple.h b/src/lib/dhcp/opaque_data_tuple.h
index a8f5528eea..f6dabedb53 100644
--- a/src/lib/dhcp/opaque_data_tuple.h
+++ b/src/lib/dhcp/opaque_data_tuple.h
@@ -9,7 +9,7 @@
#include <dhcp/option.h>
#include <util/buffer.h>
-#include <util/io_utilities.h>
+#include <util/io.h>
#include <iostream>
#include <iterator>
diff --git a/src/lib/dhcp/option.cc b/src/lib/dhcp/option.cc
index eda9d58381..95a5138e49 100644
--- a/src/lib/dhcp/option.cc
+++ b/src/lib/dhcp/option.cc
@@ -11,7 +11,7 @@
#include <dhcp/option_space.h>
#include <exceptions/exceptions.h>
#include <util/encode/encode.h>
-#include <util/io_utilities.h>
+#include <util/io.h>
#include <boost/make_shared.hpp>
diff --git a/src/lib/dhcp/option4_addrlst.cc b/src/lib/dhcp/option4_addrlst.cc
index 1dd9c3267c..1afada5856 100644
--- a/src/lib/dhcp/option4_addrlst.cc
+++ b/src/lib/dhcp/option4_addrlst.cc
@@ -9,7 +9,7 @@
#include <asiolink/io_address.h>
#include <dhcp/option4_addrlst.h>
#include <exceptions/exceptions.h>
-#include <util/io_utilities.h>
+#include <util/io.h>
#include <iomanip>
#include <sstream>
diff --git a/src/lib/dhcp/option4_client_fqdn.cc b/src/lib/dhcp/option4_client_fqdn.cc
index 7869c0eac7..17b804b57b 100644
--- a/src/lib/dhcp/option4_client_fqdn.cc
+++ b/src/lib/dhcp/option4_client_fqdn.cc
@@ -10,7 +10,7 @@
#include <dhcp/option4_client_fqdn.h>
#include <dns/labelsequence.h>
#include <util/buffer.h>
-#include <util/io_utilities.h>
+#include <util/io.h>
#include <util/strutil.h>
#include <sstream>
diff --git a/src/lib/dhcp/option6_addrlst.cc b/src/lib/dhcp/option6_addrlst.cc
index a617e5bd6f..41c4e8dbec 100644
--- a/src/lib/dhcp/option6_addrlst.cc
+++ b/src/lib/dhcp/option6_addrlst.cc
@@ -11,7 +11,7 @@
#include <dhcp/libdhcp++.h>
#include <dhcp/option6_addrlst.h>
#include <exceptions/exceptions.h>
-#include <util/io_utilities.h>
+#include <util/io.h>
#include <sstream>
diff --git a/src/lib/dhcp/option6_auth.cc b/src/lib/dhcp/option6_auth.cc
index 8ce63a1c8d..a4cca527e9 100644
--- a/src/lib/dhcp/option6_auth.cc
+++ b/src/lib/dhcp/option6_auth.cc
@@ -10,7 +10,7 @@
#include <dhcp/option6_auth.h>
#include <dhcp/option_space.h>
#include <exceptions/exceptions.h>
-#include <util/io_utilities.h>
+#include <util/io.h>
#include <util/encode/encode.h>
#include <sstream>
diff --git a/src/lib/dhcp/option6_client_fqdn.cc b/src/lib/dhcp/option6_client_fqdn.cc
index 573a6ba8b9..dd28599fa4 100644
--- a/src/lib/dhcp/option6_client_fqdn.cc
+++ b/src/lib/dhcp/option6_client_fqdn.cc
@@ -10,7 +10,7 @@
#include <dhcp/option6_client_fqdn.h>
#include <dns/labelsequence.h>
#include <util/buffer.h>
-#include <util/io_utilities.h>
+#include <util/io.h>
#include <util/strutil.h>
#include <sstream>
diff --git a/src/lib/dhcp/option6_ia.cc b/src/lib/dhcp/option6_ia.cc
index 0519bb2e38..72aaf743ad 100644
--- a/src/lib/dhcp/option6_ia.cc
+++ b/src/lib/dhcp/option6_ia.cc
@@ -10,7 +10,7 @@
#include <dhcp/option6_ia.h>
#include <dhcp/option_space.h>
#include <exceptions/exceptions.h>
-#include <util/io_utilities.h>
+#include <util/io.h>
#include <arpa/inet.h>
#include <sstream>
diff --git a/src/lib/dhcp/option6_iaaddr.cc b/src/lib/dhcp/option6_iaaddr.cc
index 0cfed7e1ab..9836ad909c 100644
--- a/src/lib/dhcp/option6_iaaddr.cc
+++ b/src/lib/dhcp/option6_iaaddr.cc
@@ -12,7 +12,7 @@
#include <dhcp/option6_iaaddr.h>
#include <dhcp/option_space.h>
#include <exceptions/exceptions.h>
-#include <util/io_utilities.h>
+#include <util/io.h>
#include <sstream>
diff --git a/src/lib/dhcp/option6_iaprefix.cc b/src/lib/dhcp/option6_iaprefix.cc
index 675e0676cd..ceb40f9b5a 100644
--- a/src/lib/dhcp/option6_iaprefix.cc
+++ b/src/lib/dhcp/option6_iaprefix.cc
@@ -12,7 +12,7 @@
#include <dhcp/option6_iaprefix.h>
#include <dhcp/option_space.h>
#include <exceptions/exceptions.h>
-#include <util/io_utilities.h>
+#include <util/io.h>
#include <sstream>
diff --git a/src/lib/dhcp/option6_pdexclude.cc b/src/lib/dhcp/option6_pdexclude.cc
index bdee4471b7..c4d99f7408 100644
--- a/src/lib/dhcp/option6_pdexclude.cc
+++ b/src/lib/dhcp/option6_pdexclude.cc
@@ -11,7 +11,7 @@
#include <dhcp/option6_pdexclude.h>
#include <exceptions/exceptions.h>
#include <util/encode/encode.h>
-#include <util/io_utilities.h>
+#include <util/io.h>
#include <boost/dynamic_bitset.hpp>
#include <iostream>
diff --git a/src/lib/dhcp/option6_status_code.cc b/src/lib/dhcp/option6_status_code.cc
index 8e709190c9..969192cf07 100644
--- a/src/lib/dhcp/option6_status_code.cc
+++ b/src/lib/dhcp/option6_status_code.cc
@@ -10,7 +10,7 @@
#include <dhcp/dhcp6.h>
#include <dhcp/option6_status_code.h>
#include <dhcp/option_data_types.h>
-#include <util/io_utilities.h>
+#include <util/io.h>
#include <iterator>
#include <sstream>
diff --git a/src/lib/dhcp/option_custom.h b/src/lib/dhcp/option_custom.h
index 9208651e2d..48533d1cad 100644
--- a/src/lib/dhcp/option_custom.h
+++ b/src/lib/dhcp/option_custom.h
@@ -11,7 +11,7 @@
#include <dhcp/option.h>
#include <dhcp/option_definition.h>
#include <exceptions/isc_assert.h>
-#include <util/io_utilities.h>
+#include <util/io.h>
namespace isc {
namespace dhcp {
diff --git a/src/lib/dhcp/option_data_types.h b/src/lib/dhcp/option_data_types.h
index a34ab0839d..58bee3d1e6 100644
--- a/src/lib/dhcp/option_data_types.h
+++ b/src/lib/dhcp/option_data_types.h
@@ -11,7 +11,7 @@
#include <dhcp/opaque_data_tuple.h>
#include <dhcp/option.h>
#include <exceptions/exceptions.h>
-#include <util/io_utilities.h>
+#include <util/io.h>
#include <stdint.h>
#include <utility>
diff --git a/src/lib/dhcp/option_int.h b/src/lib/dhcp/option_int.h
index be5b95dcb5..bc20fd25d8 100644
--- a/src/lib/dhcp/option_int.h
+++ b/src/lib/dhcp/option_int.h
@@ -11,7 +11,7 @@
#include <dhcp/option.h>
#include <dhcp/option_data_types.h>
#include <dhcp/option_space.h>
-#include <util/io_utilities.h>
+#include <util/io.h>
#include <stdint.h>
#include <sstream>
diff --git a/src/lib/dhcp/option_int_array.h b/src/lib/dhcp/option_int_array.h
index 1f73c0bfa5..168492c799 100644
--- a/src/lib/dhcp/option_int_array.h
+++ b/src/lib/dhcp/option_int_array.h
@@ -10,7 +10,7 @@
#include <dhcp/libdhcp++.h>
#include <dhcp/option.h>
#include <dhcp/option_data_types.h>
-#include <util/io_utilities.h>
+#include <util/io.h>
#include <boost/shared_ptr.hpp>
#include <sstream>
#include <stdint.h>
diff --git a/src/lib/dhcp/option_vendor.h b/src/lib/dhcp/option_vendor.h
index 43a0aaeb62..2de6f37e25 100644
--- a/src/lib/dhcp/option_vendor.h
+++ b/src/lib/dhcp/option_vendor.h
@@ -10,7 +10,7 @@
#include <dhcp/libdhcp++.h>
#include <dhcp/option.h>
#include <dhcp/option_data_types.h>
-#include <util/io_utilities.h>
+#include <util/io.h>
#include <stdint.h>
diff --git a/src/lib/dhcp/pkt6.cc b/src/lib/dhcp/pkt6.cc
index dfbc01c997..87f0586989 100644
--- a/src/lib/dhcp/pkt6.cc
+++ b/src/lib/dhcp/pkt6.cc
@@ -14,7 +14,7 @@
#include <dhcp/option_vendor.h>
#include <dhcp/pkt6.h>
#include <dhcp/docsis3_option_defs.h>
-#include <util/io_utilities.h>
+#include <util/io.h>
#include <exceptions/exceptions.h>
#include <dhcp/duid.h>
#include <dhcp/iface_mgr.h>