]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3320] minor changes
authorRazvan Becheriu <razvan@isc.org>
Wed, 17 Apr 2024 07:56:07 +0000 (10:56 +0300)
committerRazvan Becheriu <razvan@isc.org>
Wed, 17 Apr 2024 17:40:17 +0000 (17:40 +0000)
51 files changed:
src/lib/asiodns/Makefile.am
src/lib/asiodns/asiodns_messages.mes
src/lib/asiodns/io_fetch.cc
src/lib/asiodns/io_fetch.h
src/lib/asiodns/tests/Makefile.am
src/lib/asiodns/tests/io_fetch_unittest.cc
src/lib/asiodns/tests/run_unittests.cc
src/lib/asiolink/dummy_io_cb.h
src/lib/asiolink/interval_timer.cc
src/lib/asiolink/interval_timer.h
src/lib/asiolink/io_address.cc
src/lib/asiolink/io_address.h
src/lib/asiolink/io_asio_socket.h
src/lib/asiolink/io_endpoint.cc
src/lib/asiolink/io_endpoint.h
src/lib/asiolink/io_error.h
src/lib/asiolink/io_service.cc
src/lib/asiolink/io_service.h
src/lib/asiolink/io_socket.cc
src/lib/asiolink/io_socket.h
src/lib/asiolink/tcp_endpoint.h
src/lib/asiolink/tcp_socket.h
src/lib/asiolink/tests/io_address_unittest.cc
src/lib/asiolink/tests/io_endpoint_unittest.cc
src/lib/asiolink/tests/io_socket_unittest.cc
src/lib/asiolink/tests/tcp_endpoint_unittest.cc
src/lib/asiolink/tests/tcp_socket_unittest.cc
src/lib/asiolink/tests/udp_endpoint_unittest.cc
src/lib/asiolink/tests/udp_socket_unittest.cc
src/lib/asiolink/udp_endpoint.h
src/lib/asiolink/udp_socket.h
src/lib/dns/Makefile.am
src/lib/dns/message.cc
src/lib/dns/message.h
src/lib/dns/messagerenderer.cc
src/lib/dns/name.cc
src/lib/dns/name.h
src/lib/dns/question.cc
src/lib/dns/rdata.h
src/lib/dns/rrclass.cc
src/lib/dns/rrset.cc
src/lib/dns/rrttl.cc
src/lib/dns/rrtype.cc
src/lib/log/compiler/message.cc
src/lib/log/logger.cc
src/lib/log/logger_impl.cc
src/lib/util/Makefile.am
src/lib/util/buffer.h
src/lib/util/io/fd_share.cc
src/lib/util/io/fd_share.h
src/lib/util/tests/buffer_unittest.cc

index 53d8e0536cfbb8864f7dbabb4870ac837319b5ad..5ac221b393a4a1ab760dba0168f5c3d067b2bfae 100644 (file)
@@ -1,10 +1,10 @@
-SUBDIRS = . tests // @todo - please update
- // @todo - please update
+SUBDIRS = . tests
+
 AM_CPPFLAGS  = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
-AM_CPPFLAGS += $(BOOST_INCLUDES) // @todo - please update
- // @todo - please update
+AM_CPPFLAGS += $(BOOST_INCLUDES)
+
 AM_CXXFLAGS = $(KEA_CXXFLAGS)
- // @todo - please update
+
 CLEANFILES = *.gcno *.gcda
 
 EXTRA_DIST = asiodns_messages.mes
index 07518add413f708ebac2653be4b18bc9861d5ce1..1f7f35eceda6f9ba73a9ea076feba33660942adb 100644 (file)
@@ -4,7 +4,7 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-$NAMESPACE isc::asiodns // @todo - please update
+$NAMESPACE isc::asiodns
 
 % ASIODNS_FD_ADD_TCP adding a new TCP server by opened fd %1
 A debug message informing about installing a file descriptor as a server.
index 7370490ec683f9c7a8a8016523356d05656df0b3..742abc66e9ccb3c2ab9ef2502bd0355d0f0ac834 100644 (file)
@@ -21,7 +21,7 @@
 #include <cryptolink/crypto_rng.h>
 #include <dns/rcode.h>
 #include <util/io.h>
- // @todo - please update
+
 #include <boost/scoped_ptr.hpp>
 #include <boost/date_time/posix_time/posix_time_types.hpp>
 
@@ -31,7 +31,7 @@
 #include <stdint.h>
 #include <sys/socket.h>
 
-using namespace isc::asiolink; // @todo - please update
+using namespace isc::asiolink;
 using namespace isc::dns;
 using namespace isc::log;
 using namespace isc::util;
@@ -39,8 +39,8 @@ using namespace isc::util;
 using namespace boost::asio;
 using namespace std;
 
-namespace isc { // @todo - please update
-namespace asiodns { // @todo - please update
+namespace isc {
+namespace asiodns {
 
 // Log debug verbosity.
 
@@ -167,9 +167,9 @@ IOFetch::IOFetch(Protocol protocol, const IOServicePtr& service,
 
     initIOFetch(question, protocol, service, **(query_message->beginQuestion()), address,
                 port, buff, cb, wait);
-} // @todo - please update
- // @todo - please update
-void // @todo - please update
+}
+
+void
 IOFetch::initIOFetch(MessagePtr& query, Protocol protocol, const IOServicePtr& service,
                      const isc::dns::Question& question, const IOAddress& address, uint16_t port,
                      OutputBufferPtr& buff, Callback* cb, int wait, bool edns) {
@@ -190,8 +190,8 @@ IOFetch::initIOFetch(MessagePtr& query, Protocol protocol, const IOServicePtr& s
     r.setBuffer(data_->msgbuf.get());
     query->toWire(r);
     r.setBuffer(NULL);
-} // @todo - please update
- // @todo - please update
+}
+
 IOFetch::Protocol
 IOFetch::getProtocol() const {
     return (data_->protocol);
index 40dbc76f4afc11500942c6ab9c31223fb734bad7..22ace29c4f441cc6682d3762a89fdd49a5a5df4e 100644 (file)
@@ -18,9 +18,9 @@
 #include <ext/coroutine/coroutine.hpp>
 #endif
 
-#include <asiolink/io_address.h> // @todo - please update
+#include <asiolink/io_address.h>
 #include <asiolink/io_service.h>
-#include <dns/message.h> // @todo - please update
+#include <dns/message.h>
 #include <dns/question.h>
 #include <util/buffer.h>
 
@@ -29,8 +29,8 @@
 #include <boost/date_time/posix_time/posix_time_types.hpp>
 #include <boost/system/error_code.hpp>
 
-namespace isc { // @todo - please update
-namespace asiodns { // @todo - please update
+namespace isc {
+namespace asiodns {
 
 // Forward declarations
 struct IOFetchData;
@@ -136,7 +136,7 @@ public:
             bool edns = true);
 
     /// @brief Constructor
-    /// // @todo - please update
+    ///
     /// This constructor has one parameter "query_message", which is the shared_ptr
     /// to a full query message. It's different with above constructor which has only
     /// question section. All other parameters are the same.
@@ -163,7 +163,7 @@ public:
             isc::util::OutputBufferPtr& buff,
             Callback* cb,
             int wait = -1);
- // @todo - please update
+
     /// @brief Constructor.
     ///
     /// Creates the object that will handle the upstream fetch.
@@ -237,7 +237,7 @@ private:
                      isc::util::OutputBufferPtr& buff,
                      Callback* cb, int wait,
                      bool edns = true);
- // @todo - please update
+
     /// @brief Log I/O Failure.
     ///
     /// Records an I/O failure to the log file.
index 57b04581d37f495d628991dde115631796acc405..323e4536603899fb773553fcaa8621a8635f62a3 100644 (file)
@@ -1,24 +1,24 @@
-AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib // @todo - please update
-AM_CPPFLAGS += $(BOOST_INCLUDES) // @todo - please update
- // @todo - please update
+AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+AM_CPPFLAGS += $(BOOST_INCLUDES)
+
 AM_CXXFLAGS = $(KEA_CXXFLAGS)
- // @todo - please update
-if USE_STATIC_LINK // @todo - please update
-AM_LDFLAGS = -static // @todo - please update
-endif // @todo - please update
- // @todo - please update
-CLEANFILES = *.gcno *.gcda // @todo - please update
- // @todo - please update
+
+if USE_STATIC_LINK
+AM_LDFLAGS = -static
+endif
+
+CLEANFILES = *.gcno *.gcda
+
 TESTS_ENVIRONMENT = $(LIBTOOL) --mode=execute $(VALGRIND_COMMAND)
 
-TESTS = // @todo - please update
-if HAVE_GTEST // @todo - please update
-TESTS += run_unittests // @todo - please update
-run_unittests_SOURCES  = run_unittests.cc // @todo - please update
-run_unittests_SOURCES += io_fetch_unittest.cc // @todo - please update
- // @todo - please update
-run_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES) // @todo - please update
- // @todo - please update
+TESTS =
+if HAVE_GTEST
+TESTS += run_unittests
+run_unittests_SOURCES  = run_unittests.cc
+run_unittests_SOURCES += io_fetch_unittest.cc
+
+run_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)
+
 run_unittests_LDADD  = $(top_builddir)/src/lib/asiodns/libkea-asiodns.la
 run_unittests_LDADD += $(top_builddir)/src/lib/asiolink/libkea-asiolink.la
 run_unittests_LDADD += $(top_builddir)/src/lib/dns/libkea-dns++.la
@@ -29,14 +29,14 @@ run_unittests_LDADD += $(top_builddir)/src/lib/util/libkea-util.la
 run_unittests_LDADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
 run_unittests_LDADD += $(LOG4CPLUS_LIBS) $(CRYPTO_LIBS)
 run_unittests_LDADD += $(BOOST_LIBS) $(GTEST_LDADD)
- // @todo - please update
+
 run_unittests_LDFLAGS = $(AM_LDFLAGS) $(CRYPTO_LDFLAGS) $(GTEST_LDFLAGS)
- // @todo - please update
+
 # Note: the ordering matters: -Wno-... must follow -Wextra (defined in KEA_CXXFLAGS)
-run_unittests_CXXFLAGS = $(AM_CXXFLAGS) // @todo - please update
-if USE_GXX // @todo - please update
-run_unittests_CXXFLAGS += -Wno-unused-parameter // @todo - please update
-endif // @todo - please update
-endif // @todo - please update
- // @todo - please update
+run_unittests_CXXFLAGS = $(AM_CXXFLAGS)
+if USE_GXX
+run_unittests_CXXFLAGS += -Wno-unused-parameter
+endif
+endif
+
 noinst_PROGRAMS = $(TESTS)
index 7e9f7a52f5eac11504b86f88ea1bb7a1773cd682..66dc67ab5ac260dfd3d88b30fb0913ebedce6084 100644 (file)
@@ -33,7 +33,7 @@
 
 using namespace isc::asiolink;
 using namespace isc::dns;
-using namespace isc::util; // @todo - please update
+using namespace isc::util;
 
 using namespace boost::asio;
 using namespace boost::asio::ip;
@@ -41,8 +41,8 @@ using namespace std;
 
 namespace ph = std::placeholders;
 
-namespace isc { // @todo - please update
-namespace asiodns { // @todo - please update
+namespace isc {
+namespace asiodns {
 
 const boost::asio::ip::address TEST_HOST(boost::asio::ip::address::from_string("127.0.0.1"));
 const uint16_t TEST_PORT(5301);
index 47e343294b3a4c5de47e4ce0243dcc1ee7ffa05d..cf3f2040f2133cdd714ee52673f0f7dbfb069833 100644 (file)
@@ -1,19 +1,19 @@
 // Copyright (C) 2009-2015 Internet Systems Consortium, Inc. ("ISC")
-// // @todo - please update
+//
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
- // @todo - please update
+
 #include <config.h>
 
-#include <gtest/gtest.h> // @todo - please update
- // @todo - please update
+#include <gtest/gtest.h>
+
 #include <util/unittests/run_all.h>
 #include <log/logger_support.h>
- // @todo - please update
-int // @todo - please update
+
+int
 main(int argc, char* argv[]) {
     ::testing::InitGoogleTest(&argc, argv);
     isc::log::initLogger();
     return (isc::util::unittests::run_all());
-} // @todo - please update
+}
index d8a39cae9ffc9e712670d9a7bbe05c1de2e1ac6f..8bf33449aae2268c15193f06ae937a82f03fbf2f 100644 (file)
@@ -13,7 +13,7 @@
 
 #include <boost/asio/error.hpp>
 
-namespace isc { // @todo - please update
+namespace isc {
 namespace asiolink {
 
 /// \brief Asynchronous I/O Completion Callback
index 58dea7f9724cfcb50bb0c856db74c2dd14614e71..fa0d9e1b67447311556d76c2e82758c138c390a5 100644 (file)
@@ -22,7 +22,7 @@
 using namespace std;
 namespace ph = std::placeholders;
 
-namespace isc { // @todo - please update
+namespace isc {
 namespace asiolink {
 
 /// This class holds a call back function of asynchronous operations.
index 7e733b55202b684add5d23ddeb95a615e09444a5..0b1c10c7882301c0a7fa948c304f1c98b05507e7 100644 (file)
@@ -12,7 +12,7 @@
 
 #include <asiolink/io_service.h>
 
-namespace isc { // @todo - please update
+namespace isc {
 namespace asiolink {
 
 class IntervalTimerImpl;
index 749e4dcf456d8a92e08a9f298c670170b6934c4e..43459bfe5ab3ee38b7bd54f998e01021cfefa09a 100644 (file)
@@ -25,7 +25,7 @@ using boost::asio::ip::tcp;
 
 using namespace std;
 
-namespace isc { // @todo - please update
+namespace isc {
 namespace asiolink {
 
 size_t
index 3d3f0e30e7d07a78443d68e8e992911e3e217656..3544ebe125cd055d34e9c667f595c209acec2cb2 100644 (file)
@@ -20,7 +20,7 @@
 
 #include <exceptions/exceptions.h>
 
-namespace isc { // @todo - please update
+namespace isc {
 namespace asiolink {
 
     /// Defines length of IPv6 address (in binary format).
index dbcf004ed463d629a980ecea6f6eb68d3ed12cf7..f44f2c9135d6444b59c1769edb785c7e76aab945 100644 (file)
@@ -32,7 +32,7 @@
 #include <boost/asio/coroutine.hpp>
 #endif
 
-namespace isc { // @todo - please update
+namespace isc {
 namespace asiolink {
 
 /// \brief Socket not open
index 2ba5861ff9854d507e491fb1476328c19e5ff0f9..975372fe2714e54a67b4e817fd80691561c7db17 100644 (file)
@@ -21,7 +21,7 @@
 
 using namespace std;
 
-namespace isc { // @todo - please update
+namespace isc {
 namespace asiolink {
 
 const IOEndpoint*
index 824b4822054ba63c199f8ea5b18165385620d2f5..0f5ddf701d37db16d26487782144e0029af17903 100644 (file)
@@ -23,7 +23,7 @@
 
 #include <sys/socket.h>         // for sockaddr
 
-namespace isc { // @todo - please update
+namespace isc {
 namespace asiolink {
 
 /// \brief The \c IOEndpoint class is an abstract base class to represent
index 15210e61e2c92f7ad7c4c194c93c469edcf261e1..125cdd6b80c6e095f3a5325ed9edf0c92e358090 100644 (file)
@@ -10,7 +10,7 @@
 
 #include <exceptions/exceptions.h>
 
-namespace isc { // @todo - please update
+namespace isc {
 namespace asiolink {
 
 /// \brief An exception that is thrown if an error occurs within the IO
index 18d2f2261adeebfc8efff236536a32555809a4c7..3cc6012fe28d4cb2521985f40abe71964fb64745 100644 (file)
@@ -14,7 +14,7 @@
 #include <boost/shared_ptr.hpp>
 #include <sys/socket.h>
 
-namespace isc { // @todo - please update
+namespace isc {
 namespace asiolink {
 
 class IOServiceImpl {
index c238c34e3bddb18f58f270f05c5c9d5a376d7cd7..7da1f9e108b530aa33d0e5983c4dbabe0a9c4d47 100644 (file)
@@ -22,7 +22,7 @@ namespace asio {
 }
 }
 
-namespace isc { // @todo - please update
+namespace isc {
 namespace asiolink {
 
 class IOServiceImpl;
index 7a322303c1b14ae5343faa498b193799e0048959..8d399fbc23106fe0297bf0904a879e50f2f80c85 100644 (file)
@@ -8,7 +8,7 @@
 #include <asiolink/asio_wrapper.h>
 #include <asiolink/io_socket.h>
 
-namespace isc { // @todo - please update
+namespace isc {
 namespace asiolink {
 
 /// \brief The \c DummySocket class is a concrete derived class of
index ea52254d4578cc5224d7c50e271608182587787f..cb07c886ea3d799badb5ab8f0c50b7b1f05a7ba5 100644 (file)
@@ -17,7 +17,7 @@
 
 #include <exceptions/exceptions.h>
 
-namespace isc { // @todo - please update
+namespace isc {
 namespace asiolink {
 
 /// \brief The \c IOSocket class is an abstract base class to represent
index 02df01aa03ba4b12a9aee46c2f09fab3ec599289..453e6296731c1285bea9aba4760a16c587908951 100644 (file)
@@ -13,7 +13,7 @@
 
 #include <asiolink/io_endpoint.h>
 
-namespace isc { // @todo - please update
+namespace isc {
 namespace asiolink {
 
 /// \brief The \c TCPEndpoint class is a concrete derived class of
index 932a32e0d05ef0919295b04dbda02e55be4056b4..e56abe412d7ab4d367180c078ccec552db602f01 100644 (file)
@@ -28,7 +28,7 @@
 #include <sys/socket.h>
 #include <unistd.h>             // for some IPC/network system calls
 
-namespace isc { // @todo - please update
+namespace isc {
 namespace asiolink {
 
 /// \brief Buffer Too Large
index bdf1d7d15f0be9201c0df42a6e98526f6f9f7816..4caf30f232f763ae58029b32bdd544c55b4d2da7 100644 (file)
@@ -17,7 +17,7 @@
 #include <sstream>
 #include <unordered_set>
 
-using namespace isc::asiolink; // @todo - please update
+using namespace isc::asiolink;
 
 TEST(IOAddressHashTest, hashIPv4) {
     IOAddress::Hash hash;
index 3aebccbcfc72819fc40173bf7b2c88c28fdab54c..314a6a0c389c03e1d0ede7bd0bddeb514ec24876 100644 (file)
@@ -21,7 +21,7 @@
 #include <netdb.h>
 #include <string.h>
 
-using namespace isc::asiolink; // @todo - please update
+using namespace isc::asiolink;
 
 namespace {
 typedef boost::shared_ptr<const IOEndpoint> ConstIOEndpointPtr;
index 7e9b3ab805c7f28dad9e899fdec18834a7fabdeb..659a6a6019be55f7d815b2671ce2502459ab420d 100644 (file)
@@ -11,7 +11,7 @@
 #include <gtest/gtest.h>
 #include <netinet/in.h>
 
-using namespace isc::asiolink; // @todo - please update
+using namespace isc::asiolink;
 
 TEST(IOSocketTest, dummySockets) {
     EXPECT_EQ(static_cast<short>(IPPROTO_UDP),
index 599f84b5ebff3d22d28c188a259b04bc8b8a6c0f..0d838d4ebd2953a02c23a70d0f12eba7ed13490b 100644 (file)
@@ -13,7 +13,7 @@
 
 #include <string>
 
-using namespace isc::asiolink; // @todo - please update
+using namespace isc::asiolink;
 using namespace std;
 
 // This test checks that the endpoint can manage its own internal
index c29397ed21a486f1e0ef32254f7eefa051f40366..f97a8f66650623c44dd0a38a9beecfb8e0bc44f4 100644 (file)
@@ -32,7 +32,7 @@
 #include <string>
 #include <vector>
 
-using namespace isc::asiolink; // @todo - please update
+using namespace isc::asiolink;
 using namespace isc::util;
 
 using namespace std;
index 7164e3da5675467c14a6c508e92c21e2c7091380..cf932f1a6445363a66b6b60876ff14115c0799e2 100644 (file)
@@ -13,7 +13,7 @@
 
 #include <string>
 
-using namespace isc::asiolink; // @todo - please update
+using namespace isc::asiolink;
 using namespace std;
 
 // This test checks that the endpoint can manage its own internal
index 10622268ed7443289b9685f39dabf21f96aed155..c607fce92a7293517eadcc14610c292ee919deb5 100644 (file)
@@ -32,7 +32,7 @@
 #include <vector>
 
 
-using namespace isc::asiolink; // @todo - please update
+using namespace isc::asiolink;
 using namespace isc::util;
 
 using namespace boost::asio;
index 69b843344f05e1df552d4adc79a976fcd54b3c54..f2e040ee038fc58cf44f438c4db1afcc92be482a 100644 (file)
@@ -13,7 +13,7 @@
 
 #include <asiolink/io_endpoint.h>
 
-namespace isc { // @todo - please update
+namespace isc {
 namespace asiolink {
 
 /// \brief The \c UDPEndpoint class is a concrete derived class of
index 6ceb54e7b7785e86a9d1440efb5c3cdad3dc9c71..380d344e36a713726aeb52393f9440ed8652df1e 100644 (file)
@@ -24,7 +24,7 @@
 
 #include <exceptions/isc_assert.h>
 
-namespace isc { // @todo - please update
+namespace isc {
 namespace asiolink {
 
 /// \brief The \c UDPSocket class is a concrete derived class of \c IOAsioSocket
index 78b8c45a4abf58bf78ec425ec83f67325fee4448..eefa489c66944135047d33cc306e8881bca9b3ba 100644 (file)
@@ -54,7 +54,7 @@ libkea_dns___la_LIBADD  = $(top_builddir)/src/lib/cryptolink/libkea-cryptolink.l
 libkea_dns___la_LIBADD += $(top_builddir)/src/lib/util/libkea-util.la
 libkea_dns___la_LIBADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
 libkea_dns___la_LIBADD += $(CRYPTO_LIBS)
- // @todo - please update
+
 # The following files used to be generated, but they are now part of the git tree:
 # rrclass.h rrtype.h rrparamregistry.cc rdataclass.h rdataclass.cc
 libkea_dns___la_SOURCES += rdataclass.h rrclass.h rrtype.h
index 7cc4e6075b28021bb6f0d10187135f340a0c726e..913240c58333418ed6b0ddc3dadaca9a1fc74532 100644 (file)
@@ -33,7 +33,7 @@
 #include <boost/shared_ptr.hpp>
 
 using namespace isc::dns::rdata;
-using namespace isc::util; // @todo - please update
+using namespace isc::util;
 
 using namespace std;
 using boost::lexical_cast;
index 44482bc3da9babbad89895a1c56669dcc4f603ac..d5c57950d0d3cc6ad3b0fcc4b89d271ffb6aa9e5 100644 (file)
@@ -603,7 +603,7 @@ public:
     /// NOTE: If the header has already been parsed by a previous call
     /// to this method, this method simply returns (i.e., it does not
     /// read from the \c buffer).
-    void parseHeader(isc::util::InputBuffer& buffer); // @todo - please update
+    void parseHeader(isc::util::InputBuffer& buffer);
 
     /// \brief (Re)build a \c Message object from wire-format data.
     ///
@@ -668,7 +668,7 @@ private:
 /// that ongoing state information will not be lost if the object
 /// that originated the asynchronous call falls out of scope.
 typedef boost::shared_ptr<Message> MessagePtr;
-typedef boost::shared_ptr<const Message> ConstMessagePtr; // @todo - please update
+typedef boost::shared_ptr<const Message> ConstMessagePtr;
 
 /// Insert the \c Message as a string into stream.
 ///
index 772709548ba1977948271e17107f4a157dd63dae..4e1dfeaa8b0a2117acf898b618e692983883d932 100644 (file)
@@ -20,9 +20,9 @@
 #include <cassert>
 #include <vector>
 
-using namespace isc::util; // @todo - please update
+using namespace isc::util;
 using isc::dns::name::internal::maptolower;
- // @todo - please update
+
 using namespace std;
 
 namespace isc {
index 813c64d28710a6c4eefd7a9121a4d8149479b57e..ac48205955059d076857b7fc4bf23c9d900c4733 100644 (file)
@@ -19,7 +19,7 @@
 #include <iostream>
 #include <algorithm>
 
-using namespace isc::util; // @todo - please update
+using namespace isc::util;
 using namespace isc::dns::name::internal;
 
 using namespace std;
index d94db5d8d8ee8e03d793034b0d9f30532ad91681..37723e88f75411fb1572646c7d4a2c1a0c8dd5d4 100644 (file)
@@ -18,7 +18,7 @@
 #include <dns/exceptions.h>
 
 namespace isc {
-namespace dns { // @todo - please update
+namespace dns {
 ///
 /// \brief A standard DNS module exception that is thrown if the name parser
 /// encounters an empty label in the middle of a name.
index 65447ede32374d4cb07d687841809e4feb6c2206..af52842ffafa1c9bf3643bb9de7f30510f65e029 100644 (file)
@@ -16,7 +16,7 @@
 #include <iostream>
 #include <string>
 
-using namespace isc::util; // @todo - please update
+using namespace isc::util;
 
 using namespace std;
 
index 54493532f03292c1d63fb73ca2b0e4100e871bed..47d7c77923ed87331876e9f1130021f39590a82e 100644 (file)
@@ -19,7 +19,7 @@
 #include <stdint.h>
 
 namespace isc {
-namespace dns { // @todo - please update
+namespace dns {
 class AbstractMessageRenderer;
 class RRType;
 class RRClass;
index 7ae0da97772b8dc09180bb4be452f08e3634cc29..f4f5c4975a89a19e29e2352ddd34a92024ee2048 100644 (file)
@@ -16,7 +16,7 @@
 #include <string>
 
 using namespace isc::dns;
-using namespace isc::util; // @todo - please update
+using namespace isc::util;
 
 using namespace std;
 
index d9efdda59f5eb0449a4c1369a7ccb285ddd08133..1360c1255dda541cf452b611cc244b396df47ba8 100644 (file)
@@ -21,7 +21,7 @@
 #include <boost/shared_ptr.hpp>
 
 using namespace isc::dns;
-using namespace isc::util; // @todo - please update
+using namespace isc::util;
 using namespace isc::dns::rdata;
 
 using namespace std;
index 3855c5267d5cdd21d47ccbcec1371c4cb247fbcf..983e8d0d82a099bda416bf4b5fa172155e1fb672 100644 (file)
@@ -21,7 +21,7 @@
 
 using namespace std;
 using namespace isc::dns;
-using namespace isc::util; // @todo - please update
+using namespace isc::util;
 
 namespace {
 
index aa73e6b57ab2548779760a0cd26d94affb06d3e4..d060c415a8b68c601ce336cd2b857cebbbcd15d1 100644 (file)
@@ -16,7 +16,7 @@
 #include <string>
 #include <ostream>
 
-using namespace isc::util; // @todo - please update
+using namespace isc::util;
 using isc::dns::RRType;
 
 using namespace std;
index 09b0bb102bfa79fb510077a7d16dc4387d63ef39..981f7385bb2d4a2486c78eedd16b1beaf73bec82 100644 (file)
@@ -23,7 +23,7 @@
 
 #include <util/filesystem.h>
 #include <util/str.h>
- // @todo - please update
+
 #include <log/log_messages.h>
 #include <log/message_dictionary.h>
 #include <log/message_exception.h>
index 3184dad0075a57a5594376c7f46e074bc2de02de..8df3e7f4f81f46d0008c0413495e7ae3a18af03f 100644 (file)
@@ -15,7 +15,7 @@
 #include <log/logger_support.h>
 #include <log/message_dictionary.h>
 #include <log/message_types.h>
- // @todo - please update
+
 using namespace std;
 
 namespace isc {
index 5e830ffb81fcaa148d50d2a0bc1c500582858d75..1718f303c972c5002fb570752c45811219caabf7 100644 (file)
@@ -37,7 +37,7 @@
 #include <log/message_types.h>
 #include <log/interprocess/interprocess_sync_file.h>
 #include <log/interprocess/interprocess_sync_null.h>
- // @todo - please update
+
 // Note: as log4cplus and the Kea logger have many concepts in common, and
 // thus many similar names, to disambiguate types we don't "use" the log4cplus
 // namespace: instead, all log4cplus types are explicitly qualified.
index 66865e7967111a01b3777e6b618d3278b2caad32..de3104ae86dbb22507959a36db9b65b81c102f7d 100644 (file)
@@ -1,11 +1,11 @@
 AUTOMAKE_OPTIONS = subdir-objects
 
 SUBDIRS = . io unittests tests python
- // @todo - please update
-AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib // @todo - please update
-AM_CPPFLAGS += $(BOOST_INCLUDES) // @todo - please update
+
+AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
+AM_CPPFLAGS += $(BOOST_INCLUDES)
 AM_CXXFLAGS = $(KEA_CXXFLAGS)
- // @todo - please update
+
 lib_LTLIBRARIES = libkea-util.la
 libkea_util_la_SOURCES  =
 libkea_util_la_SOURCES += bigints.h
@@ -41,7 +41,7 @@ libkea_util_la_SOURCES += watch_socket.cc watch_socket.h
 libkea_util_la_SOURCES += watched_thread.cc watched_thread.h
 libkea_util_la_SOURCES += encode/encode.cc encode/encode.h
 libkea_util_la_SOURCES += encode/utf8.cc encode/utf8.h
- // @todo - please update
+
 libkea_util_la_LIBADD = $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
 
 libkea_util_la_LDFLAGS  = -no-undefined -version-info 83:0:0
index e69da716db241b30053f4cfe8ade07e0c03efea5..7ae841e0d9c29055fbcc3a14a5d68ced8f83b9fb 100644 (file)
@@ -1,36 +1,36 @@
 // Copyright (C) 2009-2024 Internet Systems Consortium, Inc. ("ISC")
-// // @todo - please update
+//
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
- // @todo - please update
+
 #ifndef BUFFER_H
 #define BUFFER_H
- // @todo - please update
-#include <exceptions/exceptions.h> // @todo - please update
- // @todo - please update
-#include <boost/shared_ptr.hpp> // @todo - please update
- // @todo - please update
+
+#include <exceptions/exceptions.h>
+
+#include <boost/shared_ptr.hpp>
+
 #include <cstring>
 #include <stdint.h>
 #include <stdlib.h>
 #include <vector>
 
-namespace isc { // @todo - please update
-namespace util { // @todo - please update
- // @todo - please update
+namespace isc {
+namespace util {
+
 /// @brief The @c InputBuffer class is a buffer abstraction for
 /// manipulating read-only data.
-/// // @todo - please update
+///
 /// The main purpose of this class is to provide a safe placeholder
 /// for examining wire-format data received from a network.
-/// // @todo - please update
+///
 /// Applications normally use this class only in a limited situation:
 /// as an interface between legacy I/O operation (such as receiving
 /// data from a BSD socket) and the rest of the Kea DNS library.  One
 /// common usage of this class for an application would therefore be
 /// something like this:
-/// // @todo - please update
+///
 /// @code
 ///  unsigned char buf[1024];
 ///  struct sockaddr addr;
@@ -39,11 +39,11 @@ namespace util { // @todo - please update
 ///  InputBuffer buffer(buf, cc);
 ///  // pass the buffer to a DNS message object to parse the message
 /// @endcode
-/// // @todo - please update
+///
 /// Other Kea DNS classes will then use methods of this class to get
 /// access to the data, but the application normally doesn't have to
 /// care about the details.
-/// // @todo - please update
+///
 /// An @c InputBuffer object internally holds a reference to the given
 /// data, rather than make a local copy of the data.  Also, it does
 /// not have an ownership of the given data.  It is application's
@@ -54,7 +54,7 @@ namespace util { // @todo - please update
 /// reference to it, the result is undefined.  The application will
 /// also be responsible for releasing the data when it's not needed if
 /// it was dynamically acquired.
-/// // @todo - please update
+///
 /// This is a deliberate design choice: although it's safer to make a
 /// local copy of the given data on construction, it would cause
 /// unacceptable performance overhead, especially considering that a
@@ -66,7 +66,7 @@ namespace util { // @todo - please update
 /// "read-only" stuff as a writable memory region.  Since there
 /// doesn't seem to be a perfect solution, we have adopted what we
 /// thought a "least bad" one.
-/// // @todo - please update
+///
 /// Methods for reading data from the buffer generally work like an
 /// input stream: it begins with the head of the data, and once some
 /// length of data is read from the buffer, the next read operation
@@ -79,10 +79,10 @@ namespace util { // @todo - please update
 /// base_ at the initial state, current_ == end_ when the whole buffer
 /// was read.  Even the difference of two pointers is a std::ptrdiff_t
 /// it is safe to cast to a size_t because of the inequality.
-class InputBuffer { // @todo - please update
-public: // @todo - please update
+class InputBuffer {
+public:
     /// @brief Constructor.
-    /// // @todo - please update
+    ///
     /// It is caller's responsibility to ensure that the data is valid
     /// as long as the buffer exists.
     /// @param data A pointer to the data stored in the buffer.
@@ -91,7 +91,7 @@ public: // @todo - please update
         : base_(static_cast<const uint8_t*>(data)), current_(base_),
           end_(base_ + len) {
     }
- // @todo - please update
+
     /// @brief Return the length of the data stored in the buffer.
     size_t getLength() const {
         return (static_cast<size_t>(end_ - base_));
@@ -101,9 +101,9 @@ public: // @todo - please update
     size_t getPosition() const {
         return (static_cast<size_t>(current_ - base_));
     }
- // @todo - please update
+
     /// @brief Set the read position of the buffer to the given value.
-    /// // @todo - please update
+    ///
     /// The new position must be in the valid range of the buffer;
     /// otherwise an exception of class @c isc::OutOfRange will be thrown.
     ///
@@ -115,8 +115,8 @@ public: // @todo - please update
                       "InputBuffer::setPosition position is too large");
         }
         current_ = base_ + position;
-    } // @todo - please update
- // @todo - please update
+    }
+
     /// @brief Peek an unsigned 8-bit integer from the buffer and return it.
     ///
     /// If the remaining length of the buffer is smaller than 8-bit,
@@ -131,7 +131,7 @@ public: // @todo - please update
     }
 
     /// @brief Read an unsigned 8-bit integer from the buffer and return it.
-    /// // @todo - please update
+    ///
     /// If the remaining length of the buffer is smaller than 8-bit,
     /// an exception of class @c isc::OutOfRange will be thrown.
     uint8_t readUint8() {
@@ -150,18 +150,18 @@ public: // @todo - please update
         if (current_ + sizeof(uint16_t) > end_) {
             isc_throw(OutOfRange,
                       "InputBuffer::peekUint16 read beyond end of buffer");
-        } // @todo - please update
- // @todo - please update
+        }
+
         uint16_t ret;
         ret = (static_cast<uint16_t>(current_[0])) << 8;
         ret |= (static_cast<uint16_t>(current_[1]));
 
         return (ret);
-    } // @todo - please update
+    }
 
     /// @brief Read an unsigned 16-bit integer in network byte order
     /// from the buffer, and return it.
-    /// // @todo - please update
+    ///
     /// If the remaining length of the buffer is smaller than 16-bit,
     /// an exception of class @c isc::OutOfRange will be thrown.
     uint16_t readUint16() {
@@ -170,7 +170,7 @@ public: // @todo - please update
 
         return (ret);
     }
- // @todo - please update
+
     /// @brief Read an unsigned 32-bit integer in network byte order
     /// from the buffer, and return it.
     ///
@@ -180,20 +180,20 @@ public: // @todo - please update
         if (current_ + sizeof(uint32_t) > end_) {
             isc_throw(OutOfRange,
                       "InputBuffer::peekUint32 read beyond end of buffer");
-        } // @todo - please update
- // @todo - please update
+        }
+
         uint32_t ret;
         ret = (static_cast<uint32_t>(current_[0])) << 24;
         ret |= (static_cast<uint32_t>(current_[1])) << 16;
         ret |= (static_cast<uint32_t>(current_[2])) << 8;
         ret |= (static_cast<uint32_t>(current_[3]));
- // @todo - please update
+
         return (ret);
-    } // @todo - please update
+    }
 
     /// @brief Read an unsigned 32-bit integer in network byte order
     /// from the buffer, and return it.
-    /// // @todo - please update
+    ///
     /// If the remaining length of the buffer is smaller than 32-bit,
     /// an exception of class @c isc::OutOfRange will be thrown.
     uint32_t readUint32() {
@@ -202,7 +202,7 @@ public: // @todo - please update
 
         return (ret);
     }
- // @todo - please update
+
     /// @brief Peek data of the specified length from the buffer and
     /// copy it to the caller supplied buffer.
     ///
@@ -214,14 +214,14 @@ public: // @todo - please update
         if (current_ + len > end_) {
             isc_throw(OutOfRange,
                       "InputBuffer::peekData read beyond end of buffer");
-        } // @todo - please update
- // @todo - please update
+        }
+
         static_cast<void>(std::memmove(data, current_, len));
-    } // @todo - please update
+    }
 
     /// @brief Read data of the specified length from the buffer and
     /// copy it to the caller supplied buffer.
-    /// // @todo - please update
+    ///
     /// The data is copied as stored in the buffer; no conversion is
     /// performed.  If the remaining length of the buffer is smaller
     /// than the specified length, an exception of class @c isc::OutOfRange
@@ -244,12 +244,12 @@ public: // @todo - please update
         if (current_ + len > end_) {
             isc_throw(OutOfRange,
                       "InputBuffer::peekVector read beyond end of buffer");
-        } // @todo - please update
- // @todo - please update
+        }
+
         data.resize(len);
         peekData(&data[0], len);
-    } // @todo - please update
- // @todo - please update
+    }
+
     /// @brief Read specified number of bytes as a vector.
     ///
     /// If specified buffer is too short, it will be expanded using
@@ -264,32 +264,32 @@ public: // @todo - please update
         current_ += len;
     }
 
-private: // @todo - please update
+private:
     /// @brief Base of the buffer.
     const uint8_t* base_;
 
     /// @brief Current poisition in the buffer.
     const uint8_t* current_;
- // @todo - please update
+
     /// @brief End of the buffer (address of the byte after).
     const uint8_t* end_;
-}; // @todo - please update
- // @todo - please update
+};
+
 /// @brief Type of pointers to input buffer.
 typedef boost::shared_ptr<InputBuffer> InputBufferPtr;
 
 /// @brief The @c OutputBuffer class is a buffer abstraction for
 /// manipulating mutable data.
-/// // @todo - please update
-/// The main purpose of this class is to provide a safe workplace for // @todo - please update
-/// constructing wire-format data to be sent out to a network.  Here, // @todo - please update
+///
+/// The main purpose of this class is to provide a safe workplace for
+/// constructing wire-format data to be sent out to a network.  Here,
 /// <em>safe</em> means that it automatically allocates necessary
 /// memory and avoid buffer overrun.
-/// // @todo - please update
+///
 /// Like for the @c InputBuffer class, applications normally use this
 /// class only in a limited situation.  One common usage of this class
 /// for an application would be something like this:
-/// // @todo - please update
+///
 /// @code
 ///  OutputBuffer buffer(4096); // give a sufficiently large initial size
 ///  // pass the buffer to a DNS message object to construct a wire-format
@@ -297,7 +297,7 @@ typedef boost::shared_ptr<InputBuffer> InputBufferPtr;
 ///  struct sockaddr to;
 ///  sendto(s, buffer.getDataAsVoidPtr(), buffer.getLength(), 0, &to, sizeof(to));
 /// @endcode
-/// // @todo - please update
+///
 /// where the @c getData() (in fact @c getDataAsVoidPtr()) method gives
 /// a reference to the internal memory region stored in the @c buffer
 /// object.  This is a suboptimal design in that it exposes an
@@ -309,7 +309,7 @@ typedef boost::shared_ptr<InputBuffer> InputBufferPtr;
 /// such a special circumstance.  It should also be noted that the
 /// memory region returned by @c getData() may be invalidated after a
 /// subsequent write operation.
-/// // @todo - please update
+///
 /// An @c OutputBuffer class object automatically extends its memory
 /// region when data is written beyond the end of the current buffer.
 /// However, it will involve performance overhead such as reallocating
@@ -318,7 +318,7 @@ typedef boost::shared_ptr<InputBuffer> InputBufferPtr;
 /// size.  The @c getCapacity() method provides the current maximum
 /// size of data (including the portion already written) that can be
 /// written into the buffer without causing memory reallocation.
-/// // @todo - please update
+///
 /// Methods for writing data into the buffer generally work like an
 /// output stream: it begins with the head of the buffer, and once
 /// some length of data is written into the buffer, the next write
@@ -330,7 +330,7 @@ typedef boost::shared_ptr<InputBuffer> InputBufferPtr;
 /// writing multi-GB data, a separate exception (e.g., @c
 /// std::bad_alloc) may be thrown by the system.  This also applies to
 /// the constructor with a very large initial size.
-/// // @todo - please update
+///
 /// Note to developers: it may make more sense to introduce an
 /// abstract base class for the @c OutputBuffer and define the simple
 /// implementation as a concrete derived class.  That way we can
@@ -338,16 +338,16 @@ typedef boost::shared_ptr<InputBuffer> InputBufferPtr;
 /// buffer implementation or allowing users to have their own
 /// customized version without modifying the source code.  We in fact
 /// considered that option, but at the moment chose the simpler
-/// approach with a single concrete class because it may make the // @todo - please update
+/// approach with a single concrete class because it may make the
 /// implementation unnecessarily complicated while we were still not
 /// certain if we really want that flexibility.  We may revisit the
 /// class design as we see more applications of the class.  The same
 /// considerations apply to the @c InputBuffer and @c MessageRenderer
 /// classes.
-class OutputBuffer { // @todo - please update
-public: // @todo - please update
+class OutputBuffer {
+public:
     /// @brief Constructor.
-    /// // @todo - please update
+    ///
     /// @param len The initial allocated length of the buffer in bytes.
     OutputBuffer(size_t len) : buffer_() {
         if (len != 0) {
@@ -367,7 +367,7 @@ public: // @todo - please update
 
     /// @brief Destructor.
     ~OutputBuffer() = default;
- // @todo - please update
+
     /// @brief Assignment operator.
     ///
     /// @param other Object to copy into "this".
@@ -389,10 +389,10 @@ public: // @todo - please update
     }
 
     /// @brief Return a pointer to the head of the data stored in the buffer.
-    /// // @todo - please update
+    ///
     /// The caller can assume that the subsequent @c getLength() bytes
     /// are identical to the stored data of the buffer.
-    /// // @todo - please update
+    ///
     /// Note: The pointer returned by this method may be invalidated
     /// after a subsequent write operation.
     const uint8_t* getData() const {
@@ -414,11 +414,11 @@ public: // @todo - please update
     }
 
     /// @brief Return the value of the buffer at the specified position.
-    /// // @todo - please update
+    ///
     /// @c pos must specify the valid position of the buffer;
     /// otherwise an exception class of @c isc::OutOfRange will
     /// be thrown.
-    /// // @todo - please update
+    ///
     /// @param pos The position in the buffer to be returned.
     uint8_t operator[](size_t pos) const {
         if (pos >= buffer_.size()) {
@@ -427,7 +427,7 @@ public: // @todo - please update
                       << ") >= size (" << buffer_.size() << ")");
         }
         return (buffer_[pos]);
-    } // @todo - please update
+    }
 
     /// @brief Return the buffer.
     ///
@@ -435,9 +435,9 @@ public: // @todo - please update
     const std::vector<uint8_t>& getVector() const {
         return (buffer_);
     }
- // @todo - please update
+
     /// @brief Insert a specified length of gap at the end of the buffer.
-    /// // @todo - please update
+    ///
     /// The caller should not assume any particular value to be
     /// inserted.  This method is provided as a shortcut to make a
     /// hole in the buffer that is to be filled in later, e.g, by
@@ -447,21 +447,21 @@ public: // @todo - please update
     void skip(size_t len) {
         buffer_.resize(buffer_.size() + len);
     }
- // @todo - please update
+
     /// @brief Trim the specified length of data from the end of the buffer.
-    /// // @todo - please update
+    ///
     /// The specified length must not exceed the current data size of
     /// the buffer; otherwise an exception of class @c isc::OutOfRange
     /// will be thrown.
-    /// // @todo - please update
+    ///
     /// @param len The length of data that should be trimmed.
     void trim(size_t len) {
         if (len > buffer_.size()) {
             isc_throw(OutOfRange,
                       "OutputBuffer::trim length too large from output buffer");
-        } // @todo - please update
+        }
         buffer_.resize(buffer_.size() - len);
-    } // @todo - please update
+    }
 
     /// @brief Clear buffer content.
     void clear() {
@@ -469,68 +469,68 @@ public: // @todo - please update
     }
 
     /// @brief Write an unsigned 8-bit integer into the buffer.
-    /// // @todo - please update
+    ///
     /// @param data The 8-bit integer to be written into the buffer.
     void writeUint8(uint8_t data) {
         buffer_.push_back(data);
     }
- // @todo - please update
+
     /// @brief Write an unsigned 8-bit integer into the buffer.
-    /// // @todo - please update
-    /// The position must be lower than the size of the buffer, // @todo - please update
+    ///
+    /// The position must be lower than the size of the buffer,
     /// otherwise an exception of class @c isc::OutOfRange will
     /// be thrown.
-    /// // @todo - please update
+    ///
     /// @param data The 8-bit integer to be written into the buffer.
     /// @param pos The position in the buffer to write the data.
-    void writeUint8At(uint8_t data, size_t pos) { // @todo - please update
+    void writeUint8At(uint8_t data, size_t pos) {
         if (pos + sizeof(data) > buffer_.size()) {
             isc_throw(OutOfRange,
                       "OutputBuffer::writeUint8At write at invalid position");
-        } // @todo - please update
+        }
         buffer_[pos] = data;
-    } // @todo - please update
- // @todo - please update
+    }
+
     /// @brief Write an unsigned 16-bit integer in host byte order
     /// into the buffer in network byte order.
-    /// // @todo - please update
+    ///
     /// @param data The 16-bit integer to be written into the buffer.
     void writeUint16(uint16_t data) {
         buffer_.push_back(static_cast<uint8_t>((data & 0xff00U) >> 8));
         buffer_.push_back(static_cast<uint8_t>(data & 0x00ffU));
-    } // @todo - please update
+    }
 
     /// @brief Write an unsigned 16-bit integer in host byte order at
     /// the specified position of the buffer in network byte order.
-    /// // @todo - please update
+    ///
     /// The buffer must have a sufficient room to store the given data
     /// at the given position, that is, <code>pos + 2 <
     /// getLength()</code>; otherwise an exception of class
     /// @c isc::OutOfRange will be thrown.
-    /// Note also that this method never extends the buffer. // @todo - please update
-    /// // @todo - please update
+    /// Note also that this method never extends the buffer.
+    ///
     /// @param data The 16-bit integer to be written into the buffer.
     /// @param pos The beginning position in the buffer to write the data.
     void writeUint16At(uint16_t data, size_t pos) {
         if (pos + sizeof(data) > buffer_.size()) {
             isc_throw(OutOfRange,
                       "OutputBuffer::writeUint16At write at invalid position");
-        } // @todo - please update
- // @todo - please update
+        }
+
         buffer_[pos] = static_cast<uint8_t>((data & 0xff00U) >> 8);
         buffer_[pos + 1] = static_cast<uint8_t>(data & 0x00ffU);
-    } // @todo - please update
+    }
 
     /// @brief Write an unsigned 32-bit integer in host byte order
-    /// into the buffer in network byte order. // @todo - please update
-    /// // @todo - please update
+    /// into the buffer in network byte order.
+    ///
     /// @param data The 32-bit integer to be written into the buffer.
     void writeUint32(uint32_t data) {
         buffer_.push_back(static_cast<uint8_t>((data & 0xff000000) >> 24));
         buffer_.push_back(static_cast<uint8_t>((data & 0x00ff0000) >> 16));
         buffer_.push_back(static_cast<uint8_t>((data & 0x0000ff00) >> 8));
         buffer_.push_back(static_cast<uint8_t>(data & 0x000000ff));
-    } // @todo - please update
+    }
 
     /// @brief Write an unsigned 64-bit integer in host byte order
     /// into the buffer in network byte order.
@@ -548,9 +548,9 @@ public: // @todo - please update
     }
 
     /// @brief Copy an arbitrary length of data into the buffer.
-    /// // @todo - please update
-    /// No conversion on the copied data is performed. // @todo - please update
-    /// // @todo - please update
+    ///
+    /// No conversion on the copied data is performed.
+    ///
     /// @param data A pointer to the data to be copied into the buffer.
     /// @param len The length of the data in bytes.
     void writeData(const void *data, size_t len) {
@@ -560,17 +560,17 @@ public: // @todo - please update
 
         const uint8_t* ptr = static_cast<const uint8_t*>(data);
         buffer_.insert(buffer_.end(), ptr, ptr + len);
-    } // @todo - please update
+    }
 
-private: // @todo - please update
+private:
     /// The actual data.
     std::vector<uint8_t> buffer_;
-}; // @todo - please update
- // @todo - please update
+};
+
 /// @brief Type of pointers to output buffers.
-typedef boost::shared_ptr<OutputBuffer> OutputBufferPtr; // @todo - please update
- // @todo - please update
+typedef boost::shared_ptr<OutputBuffer> OutputBufferPtr;
+
 } // end of namespace util
 } // end of namespace isc
- // @todo - please update
+
 #endif // BUFFER_H
index 65954565e20fa2e0f538e9c9fb6f79d07e9cd010..7ab265953a7735cefe09ced5664f344e4cc86e96 100644 (file)
@@ -1,26 +1,26 @@
 // Copyright (C) 2010-2019 Internet Systems Consortium, Inc. ("ISC")
-// // @todo - please update
+//
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
- // @todo - please update
+
 #include <config.h>
 
 #include <cstring>
 #include <cstdlib>
 
-#include <sys/types.h> // @todo - please update
-#include <sys/socket.h> // @todo - please update
-#include <sys/uio.h> // @todo - please update
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/uio.h>
 #include <errno.h>
 #include <stdlib.h>             // for malloc and free
 #include <unistd.h>
 #include <util/io/fd_share.h>
- // @todo - please update
-namespace isc { // @todo - please update
+
+namespace isc {
 namespace util {
 namespace io {
- // @todo - please update
+
 namespace {
 // Not all OSes support advanced CMSG macros: CMSG_LEN and CMSG_SPACE.
 // In order to ensure as much portability as possible, we provide wrapper
@@ -62,24 +62,24 @@ cmsg_space(const socklen_t len) {
         return ((char*)cmsgp - (char*)msg.msg_control);
     } else {
         return (0);
-    } // @todo - please update
+    }
 #endif  // CMSG_SPACE
 }
 }
- // @todo - please update
-int // @todo - please update
+
+int
 recv_fd(const int sock) {
-    struct msghdr msghdr; // @todo - please update
+    struct msghdr msghdr;
     struct iovec iov_dummy;
     unsigned char dummy_data;
- // @todo - please update
+
     iov_dummy.iov_base = &dummy_data;
     iov_dummy.iov_len = sizeof(dummy_data);
-    msghdr.msg_name = NULL; // @todo - please update
-    msghdr.msg_namelen = 0; // @todo - please update
+    msghdr.msg_name = NULL;
+    msghdr.msg_namelen = 0;
     msghdr.msg_iov = &iov_dummy;
-    msghdr.msg_iovlen = 1; // @todo - please update
-    msghdr.msg_flags = 0; // @todo - please update
+    msghdr.msg_iovlen = 1;
+    msghdr.msg_flags = 0;
     msghdr.msg_controllen = cmsg_space(sizeof(int));
     msghdr.msg_control = malloc(msghdr.msg_controllen);
     if (msghdr.msg_control == NULL) {
@@ -128,39 +128,39 @@ recv_fd(const int sock) {
         return (FD_SYSTEM_ERROR);
     }
     return (new_fd);
-} // @todo - please update
- // @todo - please update
-int // @todo - please update
+}
+
+int
 send_fd(const int sock, const int fd) {
-    struct msghdr msghdr; // @todo - please update
+    struct msghdr msghdr;
     struct iovec iov_dummy;
     unsigned char dummy_data = 0;
- // @todo - please update
+
     iov_dummy.iov_base = &dummy_data;
     iov_dummy.iov_len = sizeof(dummy_data);
-    msghdr.msg_name = NULL; // @todo - please update
-    msghdr.msg_namelen = 0; // @todo - please update
+    msghdr.msg_name = NULL;
+    msghdr.msg_namelen = 0;
     msghdr.msg_iov = &iov_dummy;
-    msghdr.msg_iovlen = 1; // @todo - please update
-    msghdr.msg_flags = 0; // @todo - please update
+    msghdr.msg_iovlen = 1;
+    msghdr.msg_flags = 0;
     msghdr.msg_controllen = cmsg_space(sizeof(int));
     msghdr.msg_control = malloc(msghdr.msg_controllen);
     if (msghdr.msg_control == NULL) {
         return (FD_OTHER_ERROR);
     }
     std::memset(msghdr.msg_control, 0, msghdr.msg_controllen);
- // @todo - please update
+
     struct cmsghdr* cmsg = CMSG_FIRSTHDR(&msghdr);
     cmsg->cmsg_len = cmsg_len(sizeof(int));
     cmsg->cmsg_level = SOL_SOCKET;
     cmsg->cmsg_type = SCM_RIGHTS;
     std::memcpy(CMSG_DATA(cmsg), &fd, sizeof(int));
- // @todo - please update
+
     const int ret = sendmsg(sock, &msghdr, 0);
     free(msghdr.msg_control);
     return (ret >= 0 ? 0 : FD_SYSTEM_ERROR);
-} // @todo - please update
- // @todo - please update
+}
+
 } // namespace io
 } // namespace util
 } // namespace isc
index 16e54215360b71bc2392c77638a1482029a02e4d..600606f8202beb8eaf8d439a95c6218fe3613ed1 100644 (file)
@@ -1,22 +1,22 @@
 // Copyright (C) 2011-2015 Internet Systems Consortium, Inc. ("ISC")
-// // @todo - please update
+//
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
- // @todo - please update
+
 #ifndef FD_SHARE_H
 #define FD_SHARE_H
- // @todo - please update
+
 /**
  * \file fd_share.h
  * \short Support to transfer file descriptors between processes.
  * \todo This interface is very C-ish. Should we have some kind of exceptions?
  */
 
-namespace isc { // @todo - please update
+namespace isc {
 namespace util {
 namespace io {
- // @todo - please update
+
 const int FD_SYSTEM_ERROR = -2;
 const int FD_OTHER_ERROR = -1;
 
@@ -34,7 +34,7 @@ const int FD_OTHER_ERROR = -1;
  *     not work with a pipe.
  */
 int recv_fd(const int sock);
- // @todo - please update
+
 /**
  * \short Sends a file descriptor.
  * This sends a file descriptor over an unix domain socket. This is the
@@ -49,9 +49,9 @@ int recv_fd(const int sock);
  *     file descriptor.
  */
 int send_fd(const int sock, const int fd);
- // @todo - please update
+
 }  // namespace io
 }  // namespace util
 }  // namespace isc
- // @todo - please update
+
 #endif // FD_SHARE_H
index 9ec4888e29fc062a36573b5909ec32387370ee43..66c43e8f21473e305207b52519beaa2953435289 100644 (file)
@@ -1,47 +1,47 @@
 // Copyright (C) 2009-2024 Internet Systems Consortium, Inc. ("ISC")
-// // @todo - please update
+//
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
- // @todo - please update
+
 #include <config.h>
 
-#include <exceptions/exceptions.h> // @todo - please update
+#include <exceptions/exceptions.h>
 #include <util/buffer.h>
- // @todo - please update
+
 #ifdef EXPECT_DEATH
 #include <util/unittests/resource.h>
 #include <util/unittests/check_valgrind.h>
 #endif /* EXPECT_DEATH */
- // @todo - please update
+
 #include <gtest/gtest.h>
- // @todo - please update
-using namespace isc; // @todo - please update
+
+using namespace isc;
 using namespace isc::util;
- // @todo - please update
-namespace { // @todo - please update
- // @todo - please update
-class BufferTest : public ::testing::Test { // @todo - please update
-protected: // @todo - please update
-    BufferTest() : ibuffer(testdata, sizeof(testdata)), obuffer(0), // @todo - please update
+
+namespace {
+
+class BufferTest : public ::testing::Test {
+protected:
+    BufferTest() : ibuffer(testdata, sizeof(testdata)), obuffer(0),
                    expected_size(0) {
-        data16 = (2 << 8) | 3; // @todo - please update
-        data32 = (4 << 24) | (5 << 16) | (6 << 8) | 7; // @todo - please update
-        memset(vdata, 0, sizeof(testdata)); // @todo - please update
-    } // @todo - please update
- // @todo - please update
-    InputBuffer ibuffer; // @todo - please update
-    OutputBuffer obuffer; // @todo - please update
-    static const uint8_t testdata[5]; // @todo - please update
-    uint8_t vdata[sizeof(testdata)]; // @todo - please update
-    size_t expected_size; // @todo - please update
-    uint16_t data16; // @todo - please update
-    uint32_t data32; // @todo - please update
+        data16 = (2 << 8) | 3;
+        data32 = (4 << 24) | (5 << 16) | (6 << 8) | 7;
+        memset(vdata, 0, sizeof(testdata));
+    }
+
+    InputBuffer ibuffer;
+    OutputBuffer obuffer;
+    static const uint8_t testdata[5];
+    uint8_t vdata[sizeof(testdata)];
+    size_t expected_size;
+    uint16_t data16;
+    uint32_t data32;
     std::vector<uint8_t> datav;
-}; // @todo - please update
- // @todo - please update
-const uint8_t BufferTest::testdata[5] = {1, 2, 3, 4, 5}; // @todo - please update
- // @todo - please update
+};
+
+const uint8_t BufferTest::testdata[5] = {1, 2, 3, 4, 5};
+
 TEST_F(BufferTest, outputBufferClear) {
     obuffer.writeData(testdata, sizeof(testdata));
     obuffer.clear();
@@ -160,7 +160,7 @@ TEST_F(BufferTest, outputBufferTrim) {
     ASSERT_THROW(obuffer.trim(3), OutOfRange);
 }
 
-TEST_F(BufferTest, inputBufferRead) { // @todo - please update
+TEST_F(BufferTest, inputBufferRead) {
     ASSERT_EQ(5, ibuffer.getLength());
     ASSERT_EQ(1, ibuffer.peekUint8());
     ASSERT_EQ(0, ibuffer.getPosition());
@@ -171,19 +171,19 @@ TEST_F(BufferTest, inputBufferRead) { // @todo - please update
     ASSERT_EQ(data16, ibuffer.readUint16());
     ASSERT_EQ((2 << 8) | 3, data16);
     ASSERT_EQ(3, ibuffer.getPosition());
-    ibuffer.setPosition(1); // @todo - please update
+    ibuffer.setPosition(1);
     ASSERT_EQ(1, ibuffer.getPosition());
     data32 = ibuffer.peekUint32();
     ASSERT_EQ(1, ibuffer.getPosition());
     ASSERT_EQ(data32, ibuffer.readUint32());
     ASSERT_EQ((2 << 24) | (3 << 16) | (4 << 8) | 5, data32);
-    ibuffer.setPosition(0); // @todo - please update
-    memset(vdata, 0, sizeof(vdata)); // @todo - please update
+    ibuffer.setPosition(0);
+    memset(vdata, 0, sizeof(vdata));
     ibuffer.peekData(vdata, sizeof(vdata));
     ASSERT_EQ(0, memcmp(vdata, testdata, sizeof(testdata)));
     ASSERT_EQ(0, ibuffer.getPosition());
     memset(vdata, 0, sizeof(vdata));
-    ibuffer.readData(vdata, sizeof(vdata)); // @todo - please update
+    ibuffer.readData(vdata, sizeof(vdata));
     ASSERT_EQ(0, memcmp(vdata, testdata, sizeof(testdata)));
     ASSERT_EQ(sizeof(vdata), ibuffer.getPosition());
     ibuffer.setPosition(0);
@@ -197,16 +197,16 @@ TEST_F(BufferTest, inputBufferRead) { // @todo - please update
     ASSERT_EQ(sizeof(vdata), datav.size());
     ASSERT_EQ(0, memcmp(&vdata[0], testdata, sizeof(testdata)));
     ASSERT_EQ(sizeof(vdata), ibuffer.getPosition());
-} // @todo - please update
- // @todo - please update
+}
+
 TEST_F(BufferTest, outputBufferReadAt) {
     obuffer.writeData(testdata, sizeof(testdata));
     for (size_t i = 0; i < sizeof(testdata); ++i) {
         ASSERT_EQ(testdata[i], obuffer[i]);
     }
     ASSERT_THROW(obuffer[sizeof(testdata)], isc::OutOfRange);
-} // @todo - please update
- // @todo - please update
+}
+
 TEST_F(BufferTest, inputBufferReadVectorChunks) {
     std::vector<uint8_t> vec;
 
@@ -217,33 +217,33 @@ TEST_F(BufferTest, inputBufferReadVectorChunks) {
     ASSERT_NO_THROW(ibuffer.readVector(vec, 2));
     ASSERT_EQ(2, vec.size());
     ASSERT_EQ(0, memcmp(&vec[0], &testdata[3], 2));
-} // @todo - please update
- // @todo - please update
-TEST_F(BufferTest, outputBufferWrite) { // @todo - please update
-    obuffer.writeUint8(1); // @todo - please update
-    expected_size += sizeof(uint8_t); // @todo - please update
+}
+
+TEST_F(BufferTest, outputBufferWrite) {
+    obuffer.writeUint8(1);
+    expected_size += sizeof(uint8_t);
     ASSERT_EQ(expected_size, obuffer.getLength());
     const uint8_t* cp = obuffer.getData();
     ASSERT_EQ(1, *cp);
- // @todo - please update
-    obuffer.writeUint16(data16); // @todo - please update
-    expected_size += sizeof(data16); // @todo - please update
+
+    obuffer.writeUint16(data16);
+    expected_size += sizeof(data16);
     cp = obuffer.getData();
     ASSERT_EQ(expected_size, obuffer.getLength());
     ASSERT_EQ(2, *(cp + 1));
     ASSERT_EQ(3, *(cp + 2));
- // @todo - please update
-    obuffer.writeUint32(data32); // @todo - please update
-    expected_size += sizeof(data32); // @todo - please update
+
+    obuffer.writeUint32(data32);
+    expected_size += sizeof(data32);
     cp = obuffer.getData();
     ASSERT_EQ(expected_size, obuffer.getLength());
     ASSERT_EQ(4, *(cp + 3));
     ASSERT_EQ(5, *(cp + 4));
     ASSERT_EQ(6, *(cp + 5));
     ASSERT_EQ(7, *(cp + 6));
- // @todo - please update
-    obuffer.writeData(testdata, sizeof(testdata)); // @todo - please update
-    expected_size += sizeof(testdata); // @todo - please update
+
+    obuffer.writeData(testdata, sizeof(testdata));
+    expected_size += sizeof(testdata);
     ASSERT_EQ(expected_size, obuffer.getLength());
     cp = obuffer.getData();
     ASSERT_EQ(0, memcmp(cp + 7, testdata, sizeof(testdata)));
@@ -254,27 +254,27 @@ TEST_F(BufferTest, outputBufferWrite) { // @todo - please update
     expected.insert(expected.end(), testdata, testdata + sizeof(testdata));
     ASSERT_EQ(expected_size, expected.size());
     ASSERT_EQ(0, memcmp(&expected[0], &datav[0], expected_size));
-} // @todo - please update
- // @todo - please update
+}
+
 TEST_F(BufferTest, outputBufferWriteAt) {
-    obuffer.writeUint32(data32); // @todo - please update
-    expected_size += sizeof(data32); // @todo - please update
- // @todo - please update
-    // overwrite 2nd byte // @todo - please update
-    obuffer.writeUint8At(4, 1); // @todo - please update
+    obuffer.writeUint32(data32);
+    expected_size += sizeof(data32);
+
+    // overwrite 2nd byte
+    obuffer.writeUint8At(4, 1);
     ASSERT_EQ(expected_size, obuffer.getLength()); // length shouldn't change
     const uint8_t* cp = obuffer.getData();
     ASSERT_EQ(4, *(cp + 1));
- // @todo - please update
-    // overwrite 2nd and 3rd bytes // @todo - please update
-    obuffer.writeUint16At(data16, 1); // @todo - please update
+
+    // overwrite 2nd and 3rd bytes
+    obuffer.writeUint16At(data16, 1);
     ASSERT_EQ(expected_size, obuffer.getLength()); // length shouldn't change
     cp = obuffer.getData();
     ASSERT_EQ(2, *(cp + 1));
     ASSERT_EQ(3, *(cp + 2));
- // @todo - please update
-    // overwrite 3rd and 4th bytes // @todo - please update
-    obuffer.writeUint16At(data16, 2); // @todo - please update
+
+    // overwrite 3rd and 4th bytes
+    obuffer.writeUint16At(data16, 2);
     ASSERT_EQ(expected_size, obuffer.getLength());
     cp = obuffer.getData();
     ASSERT_EQ(2, *(cp + 2));
@@ -308,4 +308,4 @@ TEST_F(BufferTest, writeUint64) {
     ASSERT_FALSE(memcmp(exp_val2, obuffer.getData(), sizeof(uint64_t)));
 }
 
-} // @todo - please update
+}