From 7ef4a190facadd66775b4a44c696d1c4215616cd Mon Sep 17 00:00:00 2001 From: Andrei Pavel Date: Wed, 14 Dec 2016 16:53:23 +0200 Subject: Changed version variable names in PostgreSQL to be inline with MySQL and Cassandra's --- src/lib/dhcpsrv/pgsql_connection.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/lib/dhcpsrv/pgsql_connection.h') diff --git a/src/lib/dhcpsrv/pgsql_connection.h b/src/lib/dhcpsrv/pgsql_connection.h index b0d793b611..ad82de7bb5 100644 --- a/src/lib/dhcpsrv/pgsql_connection.h +++ b/src/lib/dhcpsrv/pgsql_connection.h @@ -12,18 +12,22 @@ #include #include - +#include namespace isc { namespace dhcp { +/// @brief Define PostgreSQL backend version: 3.0 +const uint32_t PG_SCHEMA_VERSION_MAJOR = 3; +const uint32_t PG_SCHEMA_VERSION_MINOR = 0; + // Maximum number of parameters that can be used a statement // @todo This allows us to use an initializer list (since we can't // require C++11). It's unlikely we'd go past this many a single // statement. const size_t PGSQL_MAX_PARAMETERS_IN_QUERY = 32; -/// @brief Defines a Postgresql SQL statement +/// @brief Define a PostgreSQL SQL statement /// /// Each statement is associated with an index, which is used to reference the /// associated prepared statement. @@ -46,8 +50,9 @@ struct PgSqlTaggedStatement { }; /// @brief Constants for PostgreSQL data types -/// This are defined by PostreSQL in , but including +/// These are defined by PostgreSQL in , but including /// this file is extraordinarily convoluted, so we'll use these to fill-in. +/// @{ const size_t OID_NONE = 0; // PostgreSQL infers proper type const size_t OID_BOOL = 16; const size_t OID_BYTEA = 17; @@ -57,8 +62,7 @@ const size_t OID_INT4 = 23; // 4 byte int const size_t OID_TEXT = 25; const size_t OID_VARCHAR = 1043; const size_t OID_TIMESTAMP = 1114; - -//@} +///@} /// @brief RAII wrapper for Posgtresql Result sets /// @@ -289,7 +293,7 @@ private: /// that use instances of PgSqlConnection. class PgSqlConnection : public DatabaseConnection { public: - /// @brief Defines the PgSql error state for a duplicate key error + /// @brief Define the PgSql error state for a duplicate key error static const char DUPLICATE_KEY[]; /// @brief Constructor -- cgit v1.2.3 From 9082500187f9e0ebf99d5ecb67d7e815a7da2239 Mon Sep 17 00:00:00 2001 From: Andrei Pavel Date: Wed, 14 Dec 2016 16:57:44 +0200 Subject: Corrected typos --- doc/devel/contribute.dox | 2 +- doc/examples/kea4/backends.json | 6 ++-- doc/examples/kea6/backends.json | 6 ++-- doc/guide/admin.xml | 8 ++--- doc/guide/classify.xml | 2 +- doc/guide/ctrl-channel.xml | 2 +- doc/guide/ddns.xml | 2 +- doc/guide/dhcp4-srv.xml | 2 +- doc/guide/dhcp6-srv.xml | 4 +-- doc/guide/hooks.xml | 6 ++-- doc/guide/logging.xml | 4 +-- ext/coroutine/coroutine.h | 10 +++---- src/bin/admin/tests/cql_tests.sh.in | 2 +- src/bin/admin/tests/mysql_tests.sh.in | 8 ++--- src/bin/admin/tests/pgsql_tests.sh.in | 6 ++-- src/bin/d2/d2_cfg_mgr.cc | 2 +- src/bin/d2/d2_config.cc | 2 +- src/bin/d2/d2_config.h | 6 ++-- src/bin/d2/d2_process.cc | 2 +- src/bin/d2/d2_process.h | 4 +-- src/bin/d2/d2_queue_mgr.cc | 2 +- src/bin/d2/d2_update_message.cc | 2 +- src/bin/d2/d2_update_message.h | 2 +- src/bin/d2/dns_client.cc | 2 +- src/bin/d2/dns_client.h | 2 +- src/bin/d2/nc_remove.h | 6 ++-- src/bin/d2/nc_trans.h | 4 +-- src/bin/d2/tests/d2_cfg_mgr_unittests.cc | 8 ++--- src/bin/d2/tests/d2_controller_unittests.cc | 6 ++-- src/bin/d2/tests/d2_queue_mgr_unittests.cc | 4 +-- src/bin/d2/tests/d2_update_message_unittests.cc | 14 ++++----- src/bin/d2/tests/dns_client_unittests.cc | 4 +-- src/bin/d2/tests/nc_add_unittests.cc | 4 +-- src/bin/d2/tests/nc_remove_unittests.cc | 6 ++-- src/bin/d2/tests/nc_test_utils.cc | 2 +- src/bin/d2/tests/nc_test_utils.h | 2 +- src/bin/d2/tests/nc_trans_unittests.cc | 12 ++++---- src/bin/dhcp4/ctrl_dhcp4_srv.h | 2 +- src/bin/dhcp4/dhcp4_srv.cc | 10 +++---- src/bin/dhcp4/json_config_parser.cc | 2 +- src/bin/dhcp4/tests/classify_unittest.cc | 2 +- src/bin/dhcp4/tests/config_parser_unittest.cc | 8 ++--- src/bin/dhcp4/tests/ctrl_dhcp4_srv_unittest.cc | 2 +- src/bin/dhcp4/tests/decline_unittest.cc | 4 +-- src/bin/dhcp4/tests/dhcp4_client.cc | 2 +- src/bin/dhcp4/tests/dhcp4_srv_unittest.cc | 6 ++-- src/bin/dhcp4/tests/dhcp4_test_utils.cc | 2 +- src/bin/dhcp4/tests/dhcp4_test_utils.h | 2 +- src/bin/dhcp4/tests/dora_unittest.cc | 10 +++---- src/bin/dhcp4/tests/fqdn_unittest.cc | 6 ++-- src/bin/dhcp4/tests/host_options_unittest.cc | 12 ++++---- src/bin/dhcp4/tests/inform_unittest.cc | 2 +- src/bin/dhcp4/tests/kea_controller_unittest.cc | 6 ++-- src/bin/dhcp4/tests/marker_file.h.in | 2 +- src/bin/dhcp4/tests/out_of_range_unittest.cc | 24 +++++++-------- src/bin/dhcp4/tests/release_unittest.cc | 2 +- src/bin/dhcp6/ctrl_dhcp6_srv.h | 2 +- src/bin/dhcp6/dhcp6_srv.cc | 8 ++--- src/bin/dhcp6/dhcp6_srv.h | 6 ++-- src/bin/dhcp6/json_config_parser.cc | 2 +- src/bin/dhcp6/main.cc | 5 ++-- src/bin/dhcp6/tests/config_parser_unittest.cc | 8 ++--- src/bin/dhcp6/tests/confirm_unittest.cc | 2 +- src/bin/dhcp6/tests/decline_unittest.cc | 2 +- src/bin/dhcp6/tests/dhcp6_test_utils.cc | 2 +- src/bin/dhcp6/tests/dhcp6_test_utils.h | 2 +- src/bin/dhcp6/tests/fqdn_unittest.cc | 10 +++---- src/bin/dhcp6/tests/host_unittest.cc | 10 +++---- src/bin/dhcp6/tests/infrequest_unittest.cc | 2 +- src/bin/dhcp6/tests/kea_controller_unittest.cc | 8 ++--- src/bin/dhcp6/tests/marker_file.h.in | 2 +- src/bin/dhcp6/tests/sarr_unittest.cc | 2 +- src/bin/keactrl/keactrl.in | 2 +- src/bin/lfc/lfc_controller.cc | 2 +- src/bin/lfc/lfc_controller.h | 2 +- src/bin/lfc/tests/lfc_controller_unittests.cc | 4 +-- src/bin/perfdhcp/command_options.cc | 6 ++-- src/bin/perfdhcp/perf_pkt6.h | 2 +- src/bin/perfdhcp/test_control.h | 4 +-- src/bin/perfdhcp/tests/command_options_helper.h | 4 +-- src/bin/perfdhcp/tests/perf_pkt4_unittest.cc | 4 +-- src/bin/perfdhcp/tests/perf_pkt6_unittest.cc | 2 +- src/bin/perfdhcp/tests/rate_control_unittest.cc | 6 ++-- src/bin/perfdhcp/tests/test_control_unittest.cc | 2 +- src/bin/sockcreator/tests/sockcreator_tests.cc | 6 ++-- src/hooks/dhcp/user_chk/pkt_send_co.cc | 2 +- .../dhcp/user_chk/tests/user_file_unittests.cc | 8 ++--- .../dhcp/user_chk/tests/user_registry_unittests.cc | 2 +- src/hooks/dhcp/user_chk/tests/userid_unittests.cc | 12 ++++---- src/hooks/dhcp/user_chk/user.cc | 2 +- src/hooks/dhcp/user_chk/user_file.h | 2 +- src/hooks/dhcp/user_chk/user_registry.cc | 2 +- src/lib/asiodns/README | 6 ++-- src/lib/asiolink/asio_wrapper.h | 4 +-- src/lib/asiolink/io_address.h | 6 ++-- src/lib/asiolink/tests/tcp_socket_unittest.cc | 6 ++-- src/lib/cc/command_interpreter.h | 2 +- src/lib/cc/data.cc | 2 +- src/lib/cc/data.h | 6 ++-- src/lib/cc/tests/data_file_unittests.cc | 2 +- src/lib/config/command_mgr.h | 4 +-- src/lib/dhcp/docsis3_option_defs.h | 2 +- src/lib/dhcp/iface_mgr.cc | 8 ++--- src/lib/dhcp/iface_mgr.h | 16 +++++----- src/lib/dhcp/iface_mgr_error_handler.h | 2 +- src/lib/dhcp/libdhcp++.h | 4 +-- src/lib/dhcp/opaque_data_tuple.h | 4 +-- src/lib/dhcp/option4_client_fqdn.cc | 16 +++++----- src/lib/dhcp/option6_client_fqdn.cc | 8 ++--- src/lib/dhcp/option6_iaprefix.h | 2 +- src/lib/dhcp/option_custom.cc | 4 +-- src/lib/dhcp/option_data_types.h | 2 +- src/lib/dhcp/option_definition.cc | 2 +- src/lib/dhcp/option_definition.h | 2 +- src/lib/dhcp/option_space_container.h | 2 +- src/lib/dhcp/option_string.h | 2 +- src/lib/dhcp/option_vendor_class.cc | 2 +- src/lib/dhcp/option_vendor_class.h | 2 +- src/lib/dhcp/pkt6.cc | 2 +- src/lib/dhcp/pkt_filter_bpf.cc | 14 ++++----- src/lib/dhcp/pkt_filter_bpf.h | 4 +-- src/lib/dhcp/pkt_filter_inet.h | 8 ++--- src/lib/dhcp/pkt_filter_inet6.h | 6 ++-- src/lib/dhcp/pkt_filter_lpf.cc | 8 ++--- src/lib/dhcp/pkt_filter_lpf.h | 2 +- src/lib/dhcp/protocol_util.h | 2 +- src/lib/dhcp/std_option_defs.h | 6 ++-- src/lib/dhcp/tests/duid_factory_unittest.cc | 2 +- src/lib/dhcp/tests/iface_mgr_test_config.h | 2 +- src/lib/dhcp/tests/iface_mgr_unittest.cc | 28 +++++++++--------- src/lib/dhcp/tests/libdhcp++_unittest.cc | 6 ++-- src/lib/dhcp/tests/opaque_data_tuple_unittest.cc | 2 +- src/lib/dhcp/tests/option6_ia_unittest.cc | 2 +- src/lib/dhcp/tests/option_definition_unittest.cc | 4 +-- src/lib/dhcp/tests/option_int_unittest.cc | 2 +- src/lib/dhcp/tests/option_space_unittest.cc | 2 +- src/lib/dhcp/tests/option_unittest.cc | 2 +- src/lib/dhcp/tests/pkt4_unittest.cc | 10 +++---- src/lib/dhcp/tests/pkt6_unittest.cc | 6 ++-- src/lib/dhcp/tests/pkt_captures4.cc | 2 +- src/lib/dhcp/tests/pkt_captures6.cc | 4 +-- src/lib/dhcp/tests/pkt_filter_test_stub.h | 4 +-- src/lib/dhcp/tests/pkt_filter_test_utils.h | 2 +- src/lib/dhcp/tests/pkt_filter_unittest.cc | 2 +- src/lib/dhcp_ddns/ncr_io.cc | 6 ++-- src/lib/dhcp_ddns/ncr_io.h | 4 +-- src/lib/dhcp_ddns/ncr_msg.h | 6 ++-- src/lib/dhcp_ddns/ncr_udp.cc | 2 +- src/lib/dhcp_ddns/tests/ncr_udp_unittests.cc | 6 ++-- src/lib/dhcpsrv/alloc_engine.cc | 8 ++--- src/lib/dhcpsrv/alloc_engine.h | 34 ++++++++++++---------- src/lib/dhcpsrv/base_host_data_source.h | 12 ++++---- src/lib/dhcpsrv/cfg_expiration.cc | 2 +- src/lib/dhcpsrv/cfg_expiration.h | 2 +- src/lib/dhcpsrv/cfg_hosts.h | 16 +++++----- src/lib/dhcpsrv/cfg_iface.h | 8 ++--- src/lib/dhcpsrv/cfg_mac_source.h | 2 +- src/lib/dhcpsrv/cfg_option_def.cc | 2 +- src/lib/dhcpsrv/cfg_option_def.h | 2 +- src/lib/dhcpsrv/cfg_subnets4.cc | 2 +- src/lib/dhcpsrv/cfg_subnets4.h | 2 +- src/lib/dhcpsrv/cfg_subnets6.h | 2 +- src/lib/dhcpsrv/cfgmgr.h | 2 +- src/lib/dhcpsrv/cql_lease_mgr.h | 4 +-- src/lib/dhcpsrv/d2_client_cfg.h | 8 ++--- src/lib/dhcpsrv/d2_client_mgr.h | 8 ++--- src/lib/dhcpsrv/daemon.h | 4 +-- src/lib/dhcpsrv/host.h | 4 +-- src/lib/dhcpsrv/host_container.h | 2 +- src/lib/dhcpsrv/host_mgr.h | 8 ++--- src/lib/dhcpsrv/lease.h | 8 ++--- src/lib/dhcpsrv/lease_file_loader.h | 4 +-- src/lib/dhcpsrv/lease_file_stats.h | 4 +-- src/lib/dhcpsrv/logging_info.cc | 2 +- src/lib/dhcpsrv/memfile_lease_mgr.cc | 12 ++++---- src/lib/dhcpsrv/memfile_lease_mgr.h | 2 +- src/lib/dhcpsrv/memfile_lease_storage.h | 2 +- src/lib/dhcpsrv/mysql_connection.cc | 2 +- src/lib/dhcpsrv/mysql_host_data_source.cc | 6 ++-- src/lib/dhcpsrv/mysql_host_data_source.h | 10 +++---- src/lib/dhcpsrv/mysql_lease_mgr.cc | 16 +++++----- src/lib/dhcpsrv/mysql_lease_mgr.h | 10 +++---- src/lib/dhcpsrv/parsers/client_class_def_parser.h | 8 ++--- src/lib/dhcpsrv/parsers/dbaccess_parser.cc | 4 +-- src/lib/dhcpsrv/parsers/dhcp_parsers.cc | 8 ++--- src/lib/dhcpsrv/parsers/dhcp_parsers.h | 28 +++++++++--------- src/lib/dhcpsrv/parsers/host_reservation_parser.cc | 2 +- src/lib/dhcpsrv/parsers/host_reservation_parser.h | 2 +- src/lib/dhcpsrv/pgsql_connection.cc | 12 ++++---- src/lib/dhcpsrv/pgsql_connection.h | 2 +- src/lib/dhcpsrv/pgsql_exchange.cc | 12 ++++---- src/lib/dhcpsrv/pgsql_host_data_source.cc | 16 +++++----- src/lib/dhcpsrv/pgsql_host_data_source.h | 14 ++++----- src/lib/dhcpsrv/pgsql_lease_mgr.cc | 14 +++++---- src/lib/dhcpsrv/pgsql_lease_mgr.h | 4 +-- src/lib/dhcpsrv/pool.cc | 2 +- src/lib/dhcpsrv/srv_config.h | 8 ++--- src/lib/dhcpsrv/subnet.h | 10 +++---- src/lib/dhcpsrv/tests/alloc_engine4_unittest.cc | 7 ++--- src/lib/dhcpsrv/tests/alloc_engine6_unittest.cc | 4 +-- .../tests/alloc_engine_expiration_unittest.cc | 26 ++++++++--------- .../dhcpsrv/tests/alloc_engine_hooks_unittest.cc | 8 ++--- src/lib/dhcpsrv/tests/alloc_engine_utils.h | 2 +- .../dhcpsrv/tests/callout_handle_store_unittest.cc | 2 +- src/lib/dhcpsrv/tests/cfg_expiration_unittest.cc | 8 ++--- .../dhcpsrv/tests/cfg_host_operations_unittest.cc | 4 +-- src/lib/dhcpsrv/tests/cfg_iface_unittest.cc | 2 +- src/lib/dhcpsrv/tests/cfg_option_unittest.cc | 2 +- src/lib/dhcpsrv/tests/cfg_rsoo_unittest.cc | 2 +- src/lib/dhcpsrv/tests/cfg_subnets6_unittest.cc | 2 +- .../tests/client_class_def_parser_unittest.cc | 12 ++++---- src/lib/dhcpsrv/tests/client_class_def_unittest.cc | 6 ++-- src/lib/dhcpsrv/tests/d2_client_unittest.cc | 16 +++++----- src/lib/dhcpsrv/tests/d2_udp_unittest.cc | 10 +++---- src/lib/dhcpsrv/tests/daemon_unittest.cc | 2 +- src/lib/dhcpsrv/tests/dhcp4o6_ipc_unittest.cc | 10 +++---- src/lib/dhcpsrv/tests/dhcp_parsers_unittest.cc | 8 ++--- .../tests/generic_host_data_source_unittest.cc | 6 ++-- .../tests/generic_host_data_source_unittest.h | 4 +-- .../dhcpsrv/tests/generic_lease_mgr_unittest.cc | 6 ++-- src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.h | 4 +-- src/lib/dhcpsrv/tests/host_mgr_unittest.cc | 4 +-- .../tests/host_reservation_parser_unittest.cc | 12 ++++---- src/lib/dhcpsrv/tests/host_unittest.cc | 4 +-- .../dhcpsrv/tests/lease_file_loader_unittest.cc | 2 +- src/lib/dhcpsrv/tests/lease_unittest.cc | 4 +-- src/lib/dhcpsrv/tests/logging_info_unittest.cc | 2 +- src/lib/dhcpsrv/tests/logging_unittest.cc | 4 +-- .../dhcpsrv/tests/memfile_lease_mgr_unittest.cc | 4 +-- src/lib/dhcpsrv/tests/ncr_generator_unittest.cc | 4 +-- src/lib/dhcpsrv/tests/pgsql_exchange_unittest.cc | 8 ++--- src/lib/dhcpsrv/tests/subnet_unittest.cc | 14 ++++----- src/lib/dhcpsrv/tests/timer_mgr_unittest.cc | 4 +-- src/lib/dhcpsrv/testutils/config_result_check.cc | 2 +- src/lib/dhcpsrv/testutils/config_result_check.h | 2 +- src/lib/dhcpsrv/timer_mgr.cc | 2 +- src/lib/dhcpsrv/writable_host_data_source.h | 10 +++---- src/lib/dns/labelsequence.cc | 2 +- src/lib/dns/messagerenderer.h | 6 ++-- src/lib/dns/rdatafields.cc | 2 +- src/lib/dns/rrcollator.h | 4 +-- src/lib/dns/rrset_collection_base.h | 2 +- src/lib/dns/serial.h | 2 +- src/lib/dns/tests/master_loader_unittest.cc | 4 +-- src/lib/dns/tests/name_unittest.cc | 2 +- src/lib/dns/tests/rdata_nsec3_unittest.cc | 2 +- .../dns/tests/rdata_nsec3param_like_unittest.cc | 2 +- src/lib/dns/tests/rdata_nsec_unittest.cc | 2 +- src/lib/dns/tests/rdata_pimpl_holder_unittest.cc | 2 +- src/lib/dns/tests/rdata_soa_unittest.cc | 2 +- src/lib/dns/tests/rdata_srv_unittest.cc | 2 +- src/lib/dns/tests/rdata_tsig_unittest.cc | 6 ++-- .../dns/tests/testdata/rdata_nsec3_fromWire2.spec | 2 +- .../tests/testdata/rdata_nsec3param_fromWire2.spec | 2 +- src/lib/dns/tsig.h | 2 +- src/lib/eval/eval_context.h | 4 +-- src/lib/eval/parser.yy | 2 +- src/lib/eval/tests/context_unittest.cc | 12 ++++---- src/lib/eval/tests/token_unittest.cc | 10 +++---- src/lib/eval/token.h | 8 ++--- src/lib/exceptions/exceptions.h | 6 ++-- src/lib/hooks/callout_manager.cc | 2 +- src/lib/hooks/library_handle.h | 4 +-- src/lib/hooks/library_manager_collection.h | 2 +- src/lib/hooks/tests/hooks_manager_unittest.cc | 2 +- src/lib/hooks/tests/library_manager_unittest.cc | 2 +- src/lib/log/interprocess/tests/run_unittests.cc | 2 +- src/lib/log/log_messages.cc | 2 +- src/lib/log/message_initializer.h | 2 +- src/lib/log/tests/logger_example.cc | 2 +- src/lib/log/tests/logger_manager_unittest.cc | 2 +- src/lib/process/d_cfg_mgr.h | 2 +- src/lib/process/d_controller.h | 4 +-- src/lib/process/io_service_signal.h | 8 ++--- src/lib/process/tests/d_controller_unittests.cc | 6 ++-- .../process/tests/io_service_signal_unittests.cc | 10 +++---- src/lib/process/testutils/d_test_stubs.cc | 2 +- src/lib/process/testutils/d_test_stubs.h | 4 +-- src/lib/stats/stats_mgr.cc | 6 ++-- src/lib/stats/stats_mgr.h | 4 +-- src/lib/stats/tests/observation_unittest.cc | 4 +-- src/lib/stats/tests/stats_mgr_unittest.cc | 2 +- src/lib/testutils/dhcp_test_lib.sh.in | 12 ++++---- src/lib/util/csv_file.h | 2 +- src/lib/util/range_utilities.h | 2 +- src/lib/util/state_model.cc | 4 +-- src/lib/util/state_model.h | 6 ++-- src/lib/util/stopwatch_impl.h | 2 +- src/lib/util/tests/csv_file_unittest.cc | 2 +- src/lib/util/tests/process_spawn_unittest.cc | 2 +- src/lib/util/tests/staged_value_unittest.cc | 2 +- src/lib/util/tests/stopwatch_unittest.cc | 2 +- src/lib/util/tests/strutil_unittest.cc | 2 +- src/lib/util/tests/versioned_csv_file_unittest.cc | 10 +++---- src/lib/util/threads/tests/run_unittests.cc | 2 +- src/lib/util/versioned_csv_file.h | 4 +-- src/lib/util/watch_socket.cc | 4 +-- .../database/scripts/mysql/dhcpdb_create.mysql | 2 +- .../scripts/mysql/upgrade_4.1_to_5.0.sh.in | 2 +- .../database/scripts/pgsql/dhcpdb_create.pgsql | 2 +- .../scripts/pgsql/upgrade_2.0_to_3.0.sh.in | 2 +- tools/system_messages.cc | 4 +-- 302 files changed, 765 insertions(+), 761 deletions(-) (limited to 'src/lib/dhcpsrv/pgsql_connection.h') diff --git a/doc/devel/contribute.dox b/doc/devel/contribute.dox index 3931953e1a..5c3e81585f 100644 --- a/doc/devel/contribute.dox +++ b/doc/devel/contribute.dox @@ -37,7 +37,7 @@ that your code compiles. This may seem obvious, but there's more to it. You have surely checked that it compiles on your system, but Kea is portable software. Besides Linux, it is compiled and used on relatively uncommon systems like OpenBSD. Will your code -compile and work there? What about endianess? It is likely that you used +compile and work there? What about endianness? It is likely that you used a regular x86 architecture machine to write your patch, but the software is expected to run on many other architectures. You may take a look at system specific build notes (http://kea.isc.org/wiki/Install). diff --git a/doc/examples/kea4/backends.json b/doc/examples/kea4/backends.json index 6f1d19cff6..f54b680aa2 100644 --- a/doc/examples/kea4/backends.json +++ b/doc/examples/kea4/backends.json @@ -26,7 +26,7 @@ # 2. MySQL backend. Leases will be stored in MySQL database. Make sure it # is up, running and properly initialized. See kea-admin documentation -# for details on how to intialize the database. The only strictly required +# for details on how to initialize the database. The only strictly required # parameters are type and name. If other parameters are not specified, # Kea will assume the database is avaiable on localhost, that user and # password is not necessary to connect and that timeout is 5 seconds. @@ -42,7 +42,7 @@ # 3. PostgreSQL backend. Leases will be stored in PostgreSQL database. Make # sure it is up, running and properly initialized. See kea-admin documentation -# for details on how to intialize the database. The only strictly required +# for details on how to initialize the database. The only strictly required # parameters are type and name. If other parameters are not specified, # Kea will assume the database is avaiable on localhost, that user and # password is not necessary to connect and that timeout is 5 seconds. @@ -57,7 +57,7 @@ # 4. CQL (Cassandra) backend. Leases will be stored in Cassandra database. Make # sure it is up, running and properly initialized. See kea-admin documentation -# for details on how to intialize the database. The only strictly required +# for details on how to initialize the database. The only strictly required # parameters are type, keyspace and contact_points. At least one contact point # must be specified, but more than one is required for redundancy. Make sure # you specify the contact points without spaces. Kea must be compiled with diff --git a/doc/examples/kea6/backends.json b/doc/examples/kea6/backends.json index 4841c63c09..165871b6d2 100644 --- a/doc/examples/kea6/backends.json +++ b/doc/examples/kea6/backends.json @@ -26,7 +26,7 @@ # 2. MySQL backend. Leases will be stored in MySQL database. Make sure it # is up, running and properly initialized. See kea-admin documentation -# for details on how to intialize the database. The only strictly required +# for details on how to initialize the database. The only strictly required # parameters are type and name. If other parameters are not specified, # Kea will assume the database is avaiable on localhost, that user and # password is not necessary to connect and that timeout is 5 seconds. @@ -42,7 +42,7 @@ # 3. PostgreSQL backend. Leases will be stored in PostgreSQL database. Make # sure it is up, running and properly initialized. See kea-admin documentation -# for details on how to intialize the database. The only strictly required +# for details on how to initialize the database. The only strictly required # parameters are type and name. If other parameters are not specified, # Kea will assume the database is avaiable on localhost, that user and # password is not necessary to connect and that timeout is 5 seconds. @@ -57,7 +57,7 @@ # 4. CQL (Cassandra) backend. Leases will be stored in Cassandra database. Make # sure it is up, running and properly initialized. See kea-admin documentation -# for details on how to intialize the database. The only strictly required +# for details on how to initialize the database. The only strictly required # parameters are type, keyspace and contact_points. At least one contact point # must be specified, but more than one is required for redundancy. Make sure # you specify the contact points without spaces. Kea must be compiled with diff --git a/doc/guide/admin.xml b/doc/guide/admin.xml index a8d8324851..798369f1c4 100644 --- a/doc/guide/admin.xml +++ b/doc/guide/admin.xml @@ -18,7 +18,7 @@ For example, Kea currently only stores lease information and host reservations. Future versions of Kea will store additional data such as subnet definitions: the database - structure will need to be updated to accomdate the extra + structure will need to be updated to accommodate the extra information. @@ -72,7 +72,7 @@ lease-init — - Initializes a new lease database. This is useful during a new + Initializes a new lease database. This is useful during a new Kea installation. The database is initialized to the latest version supported by the version of the software being installed. @@ -616,7 +616,7 @@ $ kea-admin lease-upgrade pgsql -u database-user - Export CQLSH_HOST environemnt variable: + Export CQLSH_HOST environment variable: $ export CQLSH_HOST=localhost @@ -715,7 +715,7 @@ $ kea-admin lease-upgrade cql -n database-name and describe when - such configuration may be reqired and how to configure Kea to + such configuration may be required and how to configure Kea to operate using a read-only host database. diff --git a/doc/guide/classify.xml b/doc/guide/classify.xml index 7ac3a09c92..ffbef9eb66 100644 --- a/doc/guide/classify.xml +++ b/doc/guide/classify.xml @@ -820,7 +820,7 @@ concatenation of the strings - To enable the debug statements in the classifciaton system you will + To enable the debug statements in the classification system you will need to set the severity to "DEBUG" and the debug level to at least 55. The specific loggers are "kea-dhcp4.eval" and "kea-dhcp6.eval". diff --git a/doc/guide/ctrl-channel.xml b/doc/guide/ctrl-channel.xml index 8db374be5f..9778879ea6 100644 --- a/doc/guide/ctrl-channel.xml +++ b/doc/guide/ctrl-channel.xml @@ -104,7 +104,7 @@ where /path/to/the/kea/socket is the path specified in the configuration file. Text passed to socat will be sent to Kea and the responses received from Kea printed to standard output. - It is also easy to open UNIX socket programmatically. An example of + It is also easy to open UNIX socket programatically. An example of such a simplistic client written in C is available in the Kea Developer's Guide, chapter Control Channel Overview, section Using Control Channel. diff --git a/doc/guide/ddns.xml b/doc/guide/ddns.xml index 4a069f72b3..1479feddb1 100644 --- a/doc/guide/ddns.xml +++ b/doc/guide/ddns.xml @@ -716,7 +716,7 @@ corresponding values in the DHCP servers' "dhcp-ddns" configuration section. -
+
Example DHCP-DDNS Server Configuration This section provides an example DHCP-DDNS server configuration based diff --git a/doc/guide/dhcp4-srv.xml b/doc/guide/dhcp4-srv.xml index c2798e7a02..cc0a91e71e 100644 --- a/doc/guide/dhcp4-srv.xml +++ b/doc/guide/dhcp4-srv.xml @@ -2969,7 +2969,7 @@ It is merely echoed by the server - Static class assignments, as shown above, can be used in conjuction + Static class assignments, as shown above, can be used in conjunction with classification using expressions.
diff --git a/doc/guide/dhcp6-srv.xml b/doc/guide/dhcp6-srv.xml index 9c7ca469ce..e22cf48cbb 100644 --- a/doc/guide/dhcp6-srv.xml +++ b/doc/guide/dhcp6-srv.xml @@ -1203,7 +1203,7 @@ temporarily override a list of interface names and listen on all interfaces. S46 container options group rules and optional port parameters for a specified domain. There are three container options specified in the "dhcp6" (top level) option space: MAP-E Container option, - MAP-T Container option and S46 Lieghtweight 4over6 Container option. + MAP-T Container option and S46 Lightweight 4over6 Container option. These options only contain encapsulated options specified below. They do not include any data fields. @@ -2904,7 +2904,7 @@ should include options from the isc option space: } - Static class assignments, as shown above, can be used in conjuction + Static class assignments, as shown above, can be used in conjunction with classification using expressions.
diff --git a/doc/guide/hooks.xml b/doc/guide/hooks.xml index 429d864a67..c9d9e47d4e 100644 --- a/doc/guide/hooks.xml +++ b/doc/guide/hooks.xml @@ -271,7 +271,7 @@
- Once loaded, the library allows segregating incomings requests into + Once loaded, the library allows segregating incoming requests into known and unknown clients. For known clients, the packets are processed mostly as usual, except it is possible to override certain options being sent. That can be done on a per host basis. Clients @@ -306,7 +306,7 @@ is "HW_ADDR" for IPv4 users or "DUID" for IPv6 users
id, whose value is - either the hardware address or the DUID from the equest + either the hardware address or the DUID from the request formatted as a string of hex digits, with or without ":" delimiters. @@ -344,7 +344,7 @@ and may have the zero or more of the following entries: Forensic Logging Hooks This section describes the forensic log hooks library. This library - povides hooks that record a detailed log of lease assignments + provides hooks that record a detailed log of lease assignments and renewals into a set of log files. Currently this library is only available to ISC customers with a support contract. diff --git a/doc/guide/logging.xml b/doc/guide/logging.xml index 24f9bbea7a..315c9822b4 100644 --- a/doc/guide/logging.xml +++ b/doc/guide/logging.xml @@ -61,7 +61,7 @@ runtime) are responsible for creating the loggers used by those libraries. Such loggers should have unique names, different from the logger names used by Kea. In this way the - messages output by the hooks library can be distingued from + messages output by the hooks library can be distinguished from messages issued by the core Kea code. Unique names also allow the loggers to be configured independently of loggers used by Kea. Whenever it makes sense, a hook library can use multiple @@ -150,7 +150,7 @@ packet drops, you must create configuration entry for the logger called kea-dhcp4.bad-packets and specify severity DEBUG for this logger. All other configuration - parameters may be omited for this logger if the logger should + parameters may be omitted for this logger if the logger should use the default values specified in the root logger's configuration. diff --git a/ext/coroutine/coroutine.h b/ext/coroutine/coroutine.h index 985888bf13..0f36c3f890 100644 --- a/ext/coroutine/coroutine.h +++ b/ext/coroutine/coroutine.h @@ -15,22 +15,22 @@ // \brief Coroutine object // // A coroutine object maintains the state of a re-enterable routine. It -// is assignable and copy-constructable, and can be used as a base class +// is assignable and copy-constructible, and can be used as a base class // for a class that uses it, or as a data member. The copy overhead is // a single int. // -// A reenterable function contains a CORO_REENTER (coroutine) { ... } +// A reentrant function contains a CORO_REENTER (coroutine) { ... } // block. Whenever an asychrnonous operation is initiated within the // routine, the function is provided as the handler object. (The simplest -// way to do this is to have the reenterable function be the operator() +// way to do this is to have the reentrant function be the operator() // member for the coroutine object itself.) For example: -// +// // CORO_YIELD socket->async_read_some(buffer, *this); // // The CORO_YIELD keyword updates the current status of the coroutine to // indicate the line number currently being executed. The // async_read_some() call is initiated, with a copy of the updated -// corotutine as its handler object, and the current coroutine exits. When +// coroutine as its handler object, and the current coroutine exits. When // the async_read_some() call finishes, the copied coroutine will be // called, and will resume processing exactly where the original one left // off--right after asynchronous call. This allows asynchronous I/O diff --git a/src/bin/admin/tests/cql_tests.sh.in b/src/bin/admin/tests/cql_tests.sh.in index 80673d1774..e57456c264 100644 --- a/src/bin/admin/tests/cql_tests.sh.in +++ b/src/bin/admin/tests/cql_tests.sh.in @@ -81,7 +81,7 @@ cql_lease_version_test() { $keaadmin lease-init cql -u $db_user -p $db_password -n $db_name -d $db_scripts_dir assert_eq 0 $? "kea-admin lease-init cql failed, expected exit code: %d, actual: %d" - # Verfiy that kea-admin lease-version returns the correct version. + # Verify that kea-admin lease-version returns the correct version. version=$($keaadmin lease-version cql -u $db_user -p $db_password -n $db_name) assert_str_eq "1.0" $version "Expected kea-admin to return %s, returned value was %s" diff --git a/src/bin/admin/tests/mysql_tests.sh.in b/src/bin/admin/tests/mysql_tests.sh.in index 1ddbd76b87..c79527615e 100644 --- a/src/bin/admin/tests/mysql_tests.sh.in +++ b/src/bin/admin/tests/mysql_tests.sh.in @@ -38,7 +38,7 @@ mysql_lease_init_test() { # Let's wipe the whole database mysql_wipe - # Ok, now let's initalize the database + # Ok, now let's initialize the database ${keaadmin} lease-init mysql -u $db_user -p $db_password -n $db_name -d $db_scripts_dir ERRCODE=$? @@ -117,7 +117,7 @@ mysql_host_reservation_init_test() { # Let's wipe the whole database mysql_wipe - # Ok, now let's initalize the database + # Ok, now let's initialize the database ${keaadmin} lease-init mysql -u $db_user -p $db_password -n $db_name -d $db_scripts_dir ERRCODE=$? @@ -387,7 +387,7 @@ mysql_lease4_dump_test() { # Let's wipe the whole database mysql_wipe - # Ok, now let's initalize the database + # Ok, now let's initialize the database ${keaadmin} lease-init mysql -u $db_user -p $db_password -n $db_name -d $db_scripts_dir ERRCODE=$? assert_eq 0 $ERRCODE "could not create database, expected exit code %d, actual %d" @@ -447,7 +447,7 @@ mysql_lease6_dump_test() { # Let's wipe the whole database mysql_wipe - # Ok, now let's initalize the database + # Ok, now let's initialize the database ${keaadmin} lease-init mysql -u $db_user -p $db_password -n $db_name -d $db_scripts_dir ERRCODE=$? assert_eq 0 $ERRCODE "could not create database, expected exit code %d, actual %d" diff --git a/src/bin/admin/tests/pgsql_tests.sh.in b/src/bin/admin/tests/pgsql_tests.sh.in index 6fe61991a9..3bd7072730 100644 --- a/src/bin/admin/tests/pgsql_tests.sh.in +++ b/src/bin/admin/tests/pgsql_tests.sh.in @@ -86,7 +86,7 @@ pgsql_lease_version_test() { ${keaadmin} lease-init pgsql -u $db_user -p $db_password -n $db_name -d $db_scripts_dir assert_eq 0 $? "cannot initialize the database, expected exit code: %d, actual: %d" - # Verfiy that kea-admin lease-version returns the correct version + # Verify that kea-admin lease-version returns the correct version version=$(${keaadmin} lease-version pgsql -u $db_user -p $db_password -n $db_name) assert_str_eq "3.0" ${version} "Expected kea-admin to return %s, returned value was %s" @@ -280,7 +280,7 @@ pgsql_lease4_dump_test() { # Let's wipe the whole database pgsql_wipe - # Ok, now let's initalize the database + # Ok, now let's initialize the database ${keaadmin} lease-init pgsql -u $db_user -p $db_password -n $db_name -d $db_scripts_dir ERRCODE=$? assert_eq 0 $ERRCODE "could not create database, expected exit code %d, actual %d" @@ -375,7 +375,7 @@ pgsql_lease6_dump_test() { # Let's wipe the whole database pgsql_wipe - # Ok, now let's initalize the database + # Ok, now let's initialize the database ${keaadmin} lease-init pgsql -u $db_user -p $db_password -n $db_name -d $db_scripts_dir ERRCODE=$? assert_eq 0 $ERRCODE "could not create database, status code %d" diff --git a/src/bin/d2/d2_cfg_mgr.cc b/src/bin/d2/d2_cfg_mgr.cc index 0f30fbfaa4..618df214bc 100644 --- a/src/bin/d2/d2_cfg_mgr.cc +++ b/src/bin/d2/d2_cfg_mgr.cc @@ -80,7 +80,7 @@ D2CfgMgr::forwardUpdatesEnabled() { bool D2CfgMgr::reverseUpdatesEnabled() { - // Reverse updates are not enabled if no revese servers are defined. + // Reverse updates are not enabled if no reverse servers are defined. return (getD2CfgContext()->getReverseMgr()->size() > 0); } diff --git a/src/bin/d2/d2_config.cc b/src/bin/d2/d2_config.cc index 5155a9736d..eb8f36a21b 100644 --- a/src/bin/d2/d2_config.cc +++ b/src/bin/d2/d2_config.cc @@ -130,7 +130,7 @@ operator<<(std::ostream& os, const D2Params& config) { } // *********************** TSIGKeyInfo ************************* -// Note these values match correpsonding values for Bind9's +// Note these values match corresponding values for Bind9's // dnssec-keygen const char* TSIGKeyInfo::HMAC_MD5_STR = "HMAC-MD5"; const char* TSIGKeyInfo::HMAC_SHA1_STR = "HMAC-SHA1"; diff --git a/src/bin/d2/d2_config.h b/src/bin/d2/d2_config.h index b605193c55..4cd7c03ba3 100644 --- a/src/bin/d2/d2_config.h +++ b/src/bin/d2/d2_config.h @@ -258,7 +258,7 @@ private: /// @brief Dumps the contents of a D2Params as text to an output stream /// /// @param os output stream to which text should be sent -/// @param config D2Param instnace to dump +/// @param config D2Param instance to dump std::ostream& operator<<(std::ostream& os, const D2Params& config); @@ -287,7 +287,7 @@ public: /// @brief Constructor /// /// @param name the unique label used to identify this key - /// @param algorithm the id of the encryption alogirthm this key uses. + /// @param algorithm the id of the encryption algorithm this key uses. /// Currently supported values are (case insensitive): /// -# "HMAC-MD5" /// -# "HMAC-SHA1" @@ -538,7 +538,7 @@ public: /// /// @param name is the domain name of the domain. /// @param servers is the list of server(s) supporting this domain. - /// @param tsig_key_info pointer to the TSIGKeyInfo for the dommain's key + /// @param tsig_key_info pointer to the TSIGKeyInfo for the domain's key /// It defaults to an empty pointer, signifying the domain has no key. DdnsDomain(const std::string& name, DnsServerInfoStoragePtr servers, diff --git a/src/bin/d2/d2_process.cc b/src/bin/d2/d2_process.cc index a8a0022237..5cd35ec4e9 100644 --- a/src/bin/d2/d2_process.cc +++ b/src/bin/d2/d2_process.cc @@ -243,7 +243,7 @@ D2Process::checkQueueStatus() { : "shutdown"); queue_mgr_->stopListening(); } catch (const isc::Exception& ex) { - // It is very unlikey that we would experience an error + // It is very unlikely that we would experience an error // here, but theoretically possible. LOG_ERROR(d2_logger, DHCP_DDNS_QUEUE_MGR_STOP_ERROR) .arg(ex.what()); diff --git a/src/bin/d2/d2_process.h b/src/bin/d2/d2_process.h index a652b3acbb..ccd54a24a0 100644 --- a/src/bin/d2/d2_process.h +++ b/src/bin/d2/d2_process.h @@ -66,9 +66,9 @@ public: /// This is invoked by the controller after command line arguments but /// PRIOR to configuration reception. The base class provides this method /// as a place to perform any derivation-specific initialization steps - /// that are inapppropriate for the constructor but necessary prior to + /// that are inappropriate for the constructor but necessary prior to /// launch. So far, no such steps have been identified for D2, so its - /// implementantion is empty but required. + /// implementation is empty but required. /// /// @throw DProcessBaseError if the initialization fails. virtual void init(); diff --git a/src/bin/d2/d2_queue_mgr.cc b/src/bin/d2/d2_queue_mgr.cc index ba9676df71..5deb49433c 100644 --- a/src/bin/d2/d2_queue_mgr.cc +++ b/src/bin/d2/d2_queue_mgr.cc @@ -153,7 +153,7 @@ D2QueueMgr::stopListening(const State target_stop_state) { << target_stop_state); } - // Remember the state we want to acheive. + // Remember the state we want to achieve. target_stop_state_ = target_stop_state; // Instruct the listener to stop. If the listener reports that it diff --git a/src/bin/d2/d2_update_message.cc b/src/bin/d2/d2_update_message.cc index a9b0613d51..cc0a51e7c7 100644 --- a/src/bin/d2/d2_update_message.cc +++ b/src/bin/d2/d2_update_message.cc @@ -128,7 +128,7 @@ D2UpdateMessage::fromWire(const void* received_data, size_t bytes_received, isc::util::InputBuffer received_data_buffer(received_data, bytes_received); message_.fromWire(received_data_buffer); - // If tsig_contex is not NULL, then we need to verify the message. + // If tsig_context is not NULL, then we need to verify the message. if (tsig_context) { TSIGError error = tsig_context->verify(message_.getTSIGRecord(), received_data, bytes_received); diff --git a/src/bin/d2/d2_update_message.h b/src/bin/d2/d2_update_message.h index d9dab3e0bd..2e001e1fd9 100644 --- a/src/bin/d2/d2_update_message.h +++ b/src/bin/d2/d2_update_message.h @@ -56,7 +56,7 @@ public: isc::Exception(file, line, what) {} }; -/// @brief Exception indicating that a signed, inbound message failed to verfiy +/// @brief Exception indicating that a signed, inbound message failed to verify /// /// This exception is thrown when TSIG verification of a DNS server's response /// fails. diff --git a/src/bin/d2/dns_client.cc b/src/bin/d2/dns_client.cc index 1891135ac3..47a26b8b97 100644 --- a/src/bin/d2/dns_client.cc +++ b/src/bin/d2/dns_client.cc @@ -46,7 +46,7 @@ public: // received. This allows a single DNSClientImpl instance to be used for // multiple, sequential IOFetch calls. (@todo Trac# 3286 has been opened // against dns::Message::fromWire. Should the behavior of fromWire change - // the behavior here with could be rexamined). + // the behavior here with could be reexamined). D2UpdateMessagePtr& response_; // A caller-supplied external callback which is invoked when DNS message // exchange is complete or interrupted. diff --git a/src/bin/d2/dns_client.h b/src/bin/d2/dns_client.h index 0d707036a6..aa95bf451c 100644 --- a/src/bin/d2/dns_client.h +++ b/src/bin/d2/dns_client.h @@ -85,7 +85,7 @@ public: /// @brief Constructor. /// - /// @param response_placeholder Messge object pointer which will be updated + /// @param response_placeholder Message object pointer which will be updated /// with dynamically allocated object holding the DNS server's response. /// @param callback Pointer to an object implementing @c DNSClient::Callback /// class. This object will be called when DNS message exchange completes or diff --git a/src/bin/d2/nc_remove.h b/src/bin/d2/nc_remove.h index b9ed2c9918..10fbf4f362 100644 --- a/src/bin/d2/nc_remove.h +++ b/src/bin/d2/nc_remove.h @@ -212,7 +212,7 @@ protected: /// post a next event of IO_COMPLETED_EVT and then invoke runModel which /// resumes execution of the state model. /// - /// When the handler is invoked with a next event of IO_COMPELTED_EVT, + /// When the handler is invoked with a next event of IO_COMPLETED_EVT, /// the DNS update status is checked and acted upon accordingly: /// /// Transitions to: @@ -254,7 +254,7 @@ protected: /// post a next event of IO_COMPLETED_EVT and then invoke runModel which /// resumes execution of the state model. /// - /// When the handler is invoked with a next event of IO_COMPELTED_EVT, + /// When the handler is invoked with a next event of IO_COMPLETED_EVT, /// the DNS update status is checked and acted upon accordingly: /// /// Transitions to: @@ -306,7 +306,7 @@ protected: /// post a next event of IO_COMPLETED_EVT and then invoke runModel which /// resumes execution of the state model. /// - /// When the handler is invoked with a next event of IO_COMPELTED_EVT, + /// When the handler is invoked with a next event of IO_COMPLETED_EVT, /// the DNS update status is checked and acted upon accordingly: /// /// Transitions to: diff --git a/src/bin/d2/nc_trans.h b/src/bin/d2/nc_trans.h index 77f8fb3fb7..61b37f4c53 100644 --- a/src/bin/d2/nc_trans.h +++ b/src/bin/d2/nc_trans.h @@ -144,7 +144,7 @@ public: static const int NCT_DERIVED_EVENT_MIN = SM_DERIVED_EVENT_MIN + 101; //@} - /// @brief Defualt time to assign to a single DNS udpate. + /// @brief Default time to assign to a single DNS update. /// @todo This value will be made configurable in the very near future /// under trac3268. For now we will define it to 100 milliseconds /// so unit tests will run within a reasonable amount of time. @@ -289,7 +289,7 @@ protected: void setDnsUpdateRequest(D2UpdateMessagePtr& request); /// @brief Destroys the current update request packet and resets - /// udpate attempts count. + /// update attempts count. void clearDnsUpdateRequest(); /// @brief Sets the update status to the given status value. diff --git a/src/bin/d2/tests/d2_cfg_mgr_unittests.cc b/src/bin/d2/tests/d2_cfg_mgr_unittests.cc index 3f56dd578a..7e3f581229 100644 --- a/src/bin/d2/tests/d2_cfg_mgr_unittests.cc +++ b/src/bin/d2/tests/d2_cfg_mgr_unittests.cc @@ -65,7 +65,7 @@ public: /// @brief Build JSON configuration string for a D2Params element /// - /// Constructs a JSON string for "params" element using replacable + /// Constructs a JSON string for "params" element using replaceable /// parameters. /// /// @param ip_address string to insert as ip_address value @@ -509,7 +509,7 @@ TEST_F(D2CfgMgrTest, unsupportedTopLevelItems) { /// -# ip_address cannot be "0.0.0.0" /// -# ip_address cannot be "::" /// -# port cannot be 0 -/// -# dns_server_timeout cannat be 0 +/// -# dns_server_timeout cannot be 0 /// -# ncr_protocol must be valid /// -# ncr_format must be valid TEST_F(D2CfgMgrTest, invalidEntry) { @@ -940,7 +940,7 @@ TEST_F(ConfigParseTest, validServerList) { isc::dhcp::ParserPtr parser; ASSERT_NO_THROW(parser.reset(new DnsServerInfoListParser("test", servers))); - // Verfiy that the list builds and commits without error. + // Verify that the list builds and commits without error. ASSERT_NO_THROW(parser->build(config_set_)); ASSERT_NO_THROW(parser->commit()); @@ -1443,7 +1443,7 @@ TEST_F(D2CfgMgrTest, forwardMatch) { EXPECT_TRUE(cfg_mgr_->matchForward("tmark.org", match)); EXPECT_EQ("tmark.org", match->getName()); - // Verify that search is case insensisitive. + // Verify that search is case-insensitive. EXPECT_TRUE(cfg_mgr_->matchForward("TMARK.ORG", match)); EXPECT_EQ("tmark.org", match->getName()); diff --git a/src/bin/d2/tests/d2_controller_unittests.cc b/src/bin/d2/tests/d2_controller_unittests.cc index b22a0b48eb..7070a4be6e 100644 --- a/src/bin/d2/tests/d2_controller_unittests.cc +++ b/src/bin/d2/tests/d2_controller_unittests.cc @@ -149,7 +149,7 @@ TEST_F(D2ControllerTest, launchNormalShutdown) { time_duration elapsed_time; runWithConfig(valid_d2_config, 1000, elapsed_time); - // Give a generous margin to accomodate slower test environs. + // Give a generous margin to accommodate slower test environs. EXPECT_TRUE(elapsed_time.total_milliseconds() >= 800 && elapsed_time.total_milliseconds() <= 1300); } @@ -294,7 +294,7 @@ TEST_F(D2ControllerTest, sigintShutdown) { runWithConfig(valid_d2_config, 1000, elapsed_time); // Signaled shutdown should make our elapsed time much smaller than - // the maximum run time. Give generous margin to accomodate slow + // the maximum run time. Give generous margin to accommodate slow // test environs. EXPECT_TRUE(elapsed_time.total_milliseconds() < 300); @@ -311,7 +311,7 @@ TEST_F(D2ControllerTest, sigtermShutdown) { runWithConfig(valid_d2_config, 1000, elapsed_time); // Signaled shutdown should make our elapsed time much smaller than - // the maximum run time. Give generous margin to accomodate slow + // the maximum run time. Give generous margin to accommodate slow // test environs. EXPECT_TRUE(elapsed_time.total_milliseconds() < 300); diff --git a/src/bin/d2/tests/d2_queue_mgr_unittests.cc b/src/bin/d2/tests/d2_queue_mgr_unittests.cc index d2a4eaf10c..881e2ce195 100644 --- a/src/bin/d2/tests/d2_queue_mgr_unittests.cc +++ b/src/bin/d2/tests/d2_queue_mgr_unittests.cc @@ -176,11 +176,11 @@ TEST(D2QueueMgrBasicTest, basicQueue) { // Verify queue count is correct. EXPECT_EQ(VALID_MSG_CNT, queue_mgr->getQueueSize()); - // Verfiy that peekAt returns the correct entry. + // Verify that peekAt returns the correct entry. EXPECT_NO_THROW(ncr = queue_mgr->peekAt(1)); EXPECT_TRUE (*(ref_msgs[1]) == *ncr); - // Verfiy that dequeueAt removes the correct entry. + // Verify that dequeueAt removes the correct entry. // Removing it, this should shift the queued entries forward by one. EXPECT_NO_THROW(queue_mgr->dequeueAt(1)); EXPECT_NO_THROW(ncr = queue_mgr->peekAt(1)); diff --git a/src/bin/d2/tests/d2_update_message_unittests.cc b/src/bin/d2/tests/d2_update_message_unittests.cc index e8955bbb53..bff7e318f0 100644 --- a/src/bin/d2/tests/d2_update_message_unittests.cc +++ b/src/bin/d2/tests/d2_update_message_unittests.cc @@ -282,7 +282,7 @@ TEST_F(D2UpdateMessageTest, fromWireInvalidOpcode) { }; // The 'true' argument passed to the constructor turns the // message into the parse mode in which the fromWire function - // can be used to decode the binary mesasage data. + // can be used to decode the binary message data. D2UpdateMessage msg(D2UpdateMessage::INBOUND); // When using invalid Opcode, the fromWire function should // throw NotUpdateMessage exception. @@ -306,7 +306,7 @@ TEST_F(D2UpdateMessageTest, fromWireInvalidQRFlag) { }; // The 'true' argument passed to the constructor turns the // message into the parse mode in which the fromWire function - // can be used to decode the binary mesasage data. + // can be used to decode the binary message data. D2UpdateMessage msg(D2UpdateMessage::INBOUND); // When using invalid QR flag, the fromWire function should // throw InvalidQRFlag exception. @@ -345,7 +345,7 @@ TEST_F(D2UpdateMessageTest, fromWireTooManyZones) { // The 'true' argument passed to the constructor turns the // message into the parse mode in which the fromWire function - // can be used to decode the binary mesasage data. + // can be used to decode the binary message data. D2UpdateMessage msg(D2UpdateMessage::INBOUND); // When parsing a message with more than one Zone record, // exception should be thrown. @@ -366,7 +366,7 @@ TEST_F(D2UpdateMessageTest, toWire) { // one Zone. toWire function would fail if Zone is not set. msg.setZone(Name("example.com"), RRClass::IN()); - // Set prerequisities. + // Set prerequisites. // 'Name Is Not In Use' prerequisite (RFC 2136, section 2.4.5) RRsetPtr prereq1(new RRset(Name("foo.example.com"), RRClass::NONE(), @@ -433,7 +433,7 @@ TEST_F(D2UpdateMessageTest, toWire) { EXPECT_EQ(1, buf.readUint16()); // PRCOUNT - holds the number of prerequisites. Earlier we have added - // two prerequisites. Thus, expect that this conter is 2. + // two prerequisites. Thus, expect that this counter is 2. EXPECT_EQ(2, buf.readUint16()); // UPCOUNT - holds the number of RRs in the Update Section. We have @@ -484,7 +484,7 @@ TEST_F(D2UpdateMessageTest, toWire) { // Check the name first. Message renderer is using compression for domain // names as described in RFC 1035, section 4.1.4. The name in this RR is - // foo.example.com. The name of the zone is example.com and it has occured + // foo.example.com. The name of the zone is example.com and it has occurred // in this message already at offset 12 (the size of the header is 12). // Therefore, name of this RR is encoded as 'foo', followed by a pointer // to offset in this message where the remainder of this name was used. @@ -566,7 +566,7 @@ TEST_F(D2UpdateMessageTest, toWireInvalidQRFlag) { // The 'true' argument passed to the constructor turns the // message into the parse mode in which the fromWire function - // can be used to decode the binary mesasage data. + // can be used to decode the binary message data. D2UpdateMessage msg(D2UpdateMessage::INBOUND); ASSERT_NO_THROW(msg.fromWire(bin_msg, sizeof(bin_msg))); diff --git a/src/bin/d2/tests/dns_client_unittests.cc b/src/bin/d2/tests/dns_client_unittests.cc index 0e784b49f3..f67706b6d4 100644 --- a/src/bin/d2/tests/dns_client_unittests.cc +++ b/src/bin/d2/tests/dns_client_unittests.cc @@ -219,7 +219,7 @@ public: dns::Message request(Message::PARSE); request.fromWire(received_data_buffer); - // If contex is not NULL, then we need to verify the message. + // If context is not NULL, then we need to verify the message. if (context) { TSIGError error = context->verify(request.getTSIGRecord(), receive_buffer_, receive_length); @@ -502,7 +502,7 @@ TEST_F(DNSClientTest, runTSIGTest) { // Neither client nor server will attempt to sign or verify. runTSIGTest(nokey, nokey); - // Client signs the request, server verfies but doesn't sign. + // Client signs the request, server verifies but doesn't sign. runTSIGTest(key_one, nokey, false); // Client and server use the same key to sign and verify. diff --git a/src/bin/d2/tests/nc_add_unittests.cc b/src/bin/d2/tests/nc_add_unittests.cc index 9bc90aa935..e7c6788cf9 100644 --- a/src/bin/d2/tests/nc_add_unittests.cc +++ b/src/bin/d2/tests/nc_add_unittests.cc @@ -24,7 +24,7 @@ using namespace isc::util; namespace { -/// @brief Test class derived from NameAddTransaction to provide visiblity +/// @brief Test class derived from NameAddTransaction to provide visibility // to protected methods. class NameAddStub : public NameAddTransaction { public: @@ -1030,7 +1030,7 @@ TEST_F(NameAddTransactionTest, replacingFwdAddrsHandler_OtherRcode) { EXPECT_FALSE(name_add->getForwardChangeCompleted()); EXPECT_FALSE(name_add->getReverseChangeCompleted()); - // We should have failed the transaction. Verifiy that we transitioned + // We should have failed the transaction. Verify that we transitioned // correctly. EXPECT_EQ(NameChangeTransaction::PROCESS_TRANS_FAILED_ST, name_add->getCurrState()); diff --git a/src/bin/d2/tests/nc_remove_unittests.cc b/src/bin/d2/tests/nc_remove_unittests.cc index 0b8c07f808..64cf28a0fd 100644 --- a/src/bin/d2/tests/nc_remove_unittests.cc +++ b/src/bin/d2/tests/nc_remove_unittests.cc @@ -25,7 +25,7 @@ using namespace isc::util; namespace { -/// @brief Test class derived from NameRemoveTransaction to provide visiblity +/// @brief Test class derived from NameRemoveTransaction to provide visibility // to protected methods. class NameRemoveStub : public NameRemoveTransaction { public: @@ -969,7 +969,7 @@ TEST_F(NameRemoveTransactionTest, removingFwdRRsHandler_FqdnNotInUse) { // Run removingFwdRRsHandler again to process the response. EXPECT_NO_THROW(name_remove->removingFwdRRsHandler()); - // Forwad completion flag should be true, reverse should still be false. + // Forward completion flag should be true, reverse should still be false. EXPECT_TRUE(name_remove->getForwardChangeCompleted()); EXPECT_FALSE(name_remove->getReverseChangeCompleted()); @@ -1016,7 +1016,7 @@ TEST_F(NameRemoveTransactionTest, removingFwdRRsHandler_OtherRcode) { EXPECT_FALSE(name_remove->getForwardChangeCompleted()); EXPECT_FALSE(name_remove->getReverseChangeCompleted()); - // We should have failed the transaction. Verifiy that we transitioned + // We should have failed the transaction. Verify that we transitioned // correctly. EXPECT_EQ(NameChangeTransaction::PROCESS_TRANS_FAILED_ST, name_remove->getCurrState()); diff --git a/src/bin/d2/tests/nc_test_utils.cc b/src/bin/d2/tests/nc_test_utils.cc index 7f39b6cbac..45ba4526bd 100644 --- a/src/bin/d2/tests/nc_test_utils.cc +++ b/src/bin/d2/tests/nc_test_utils.cc @@ -107,7 +107,7 @@ FauxServer::requestHandler(const boost::system::error_code& error, try { request.fromWire(request_buf); - // If contex is not NULL, then we need to verify the message. + // If context is not NULL, then we need to verify the message. if (context) { dns::TSIGError error = context->verify(request.getTSIGRecord(), receive_buffer_, diff --git a/src/bin/d2/tests/nc_test_utils.h b/src/bin/d2/tests/nc_test_utils.h index 2bd169c70c..c686a5f5ff 100644 --- a/src/bin/d2/tests/nc_test_utils.h +++ b/src/bin/d2/tests/nc_test_utils.h @@ -36,7 +36,7 @@ public: enum ResponseMode { USE_RCODE, // Generate a response with a given RCODE CORRUPT_RESP, // Generate a corrupt response - INVALID_TSIG // Generate a repsonse with the wrong TSIG key + INVALID_TSIG // Generate a response with the wrong TSIG key }; // Reference to IOService to use for IO processing. diff --git a/src/bin/d2/tests/nc_trans_unittests.cc b/src/bin/d2/tests/nc_trans_unittests.cc index ff0179581d..b354eb9c3f 100644 --- a/src/bin/d2/tests/nc_trans_unittests.cc +++ b/src/bin/d2/tests/nc_trans_unittests.cc @@ -66,7 +66,7 @@ public: /// @brief DNSClient callback /// Overrides the callback in NameChangeTranscation to allow testing - /// sendUpdate without incorporating exectution of the state model + /// sendUpdate without incorporating execution of the state model /// into the test. /// It sets the DNS status update and posts IO_COMPLETED_EVT as does /// the normal callback. @@ -313,7 +313,7 @@ public: /// @brief Builds and then sends an update request /// /// This method is used to build and send and update request. It is used - /// in conjuction with FauxServer to test various message response + /// in conjunction with FauxServer to test various message response /// scenarios. /// @param name_change Transaction under test /// @param run_time Maximum time to permit IO processing to run before @@ -824,7 +824,7 @@ TEST_F(NameChangeTransactionTest, successfulUpdateTest) { EXPECT_TRUE(name_change->getForwardChangeCompleted()); } -/// @brief Tests the ability to use startTransaction to initate the state +/// @brief Tests the ability to use startTransaction to initiate the state /// model execution, and DNSClient callback, operator(), to resume the /// model with a update failure outcome. TEST_F(NameChangeTransactionTest, failedUpdateTest) { @@ -1043,7 +1043,7 @@ TEST_F(NameChangeTransactionTest, tsigUnsignedResponse) { FauxServer server(*io_service_, *(name_change->getCurrentServer())); server.receive (FauxServer::USE_RCODE, dns::Rcode::NOERROR()); - // Do the udpate. + // Do the update. ASSERT_NO_FATAL_FAILURE(doOneExchange(name_change)); // Verify that next event is IO_COMPLETED_EVT and DNS status is @@ -1074,7 +1074,7 @@ TEST_F(NameChangeTransactionTest, tsigInvalidResponse) { FauxServer server(*io_service_, *(name_change->getCurrentServer())); server.receive (FauxServer::INVALID_TSIG, dns::Rcode::NOERROR()); - // Do the udpate. + // Do the update. ASSERT_NO_FATAL_FAILURE(doOneExchange(name_change)); // Verify that next event is IO_COMPLETED_EVT and DNS status is @@ -1124,7 +1124,7 @@ TEST_F(NameChangeTransactionTest, tsigUnexpectedSignedResponse) { EXPECT_EQ("response.example.com.", zone->getName().toText()); } -/// @brief Tests that a TSIG udpate succeeds when client and server both use +/// @brief Tests that a TSIG update succeeds when client and server both use /// the right key. Runs the test for all supported algorithms. TEST_F(NameChangeTransactionTest, tsigAllValid) { std::vectoralgorithms; diff --git a/src/bin/dhcp4/ctrl_dhcp4_srv.h b/src/bin/dhcp4/ctrl_dhcp4_srv.h index 57883e5fd8..ee22b52f03 100644 --- a/src/bin/dhcp4/ctrl_dhcp4_srv.h +++ b/src/bin/dhcp4/ctrl_dhcp4_srv.h @@ -168,7 +168,7 @@ private: /// this method. /// /// @param max_leases Maximum number of leases to be reclaimed. - /// @param timeout Maximum amount of time that the reclaimation routine + /// @param timeout Maximum amount of time that the reclamation routine /// may be processing expired leases, expressed in milliseconds. /// @param remove_lease A boolean value indicating if the lease should /// be removed when it is reclaimed (if true) or it should be left in the diff --git a/src/bin/dhcp4/dhcp4_srv.cc b/src/bin/dhcp4/dhcp4_srv.cc index 34727ddcf9..f824cd0923 100644 --- a/src/bin/dhcp4/dhcp4_srv.cc +++ b/src/bin/dhcp4/dhcp4_srv.cc @@ -899,7 +899,7 @@ Dhcpv4Srv::processPacket(Pkt4Ptr& query, Pkt4Ptr& rsp) { .arg(query->getIface()) .arg(e.what()); - // Increase the statistics of parse failues and dropped packets. + // Increase the statistics of parse failures and dropped packets. isc::stats::StatsMgr::instance().addValue("pkt4-parse-failed", static_cast(1)); isc::stats::StatsMgr::instance().addValue("pkt4-receive-drop", @@ -2044,7 +2044,7 @@ Dhcpv4Srv::setFixedFields(Dhcpv4Exchange& ex) { getClientClassDictionary()->getClasses(); // Now we need to iterate over the classes assigned to the - // query packet and find corresponding class defintions for it. + // query packet and find corresponding class definitions for it. for (ClientClasses::const_iterator name = classes.begin(); name != classes.end(); ++name) { @@ -2065,18 +2065,18 @@ Dhcpv4Srv::setFixedFields(Dhcpv4Exchange& ex) { const string& sname = cl->second->getSname(); if (!sname.empty()) { // Converting string to (const uint8_t*, size_t len) format is - // tricky. reineterpret_cast is not the most elegant solution, + // tricky. reinterpret_cast is not the most elegant solution, // but it does avoid us making unnecessary copy. We will convert // sname and file fields in Pkt4 to string one day and life // will be easier. response->setSname(reinterpret_cast(sname.c_str()), sname.size()); } - + const string& filename = cl->second->getFilename(); if (!filename.empty()) { // Converting string to (const uint8_t*, size_t len) format is - // tricky. reineterpret_cast is not the most elegant solution, + // tricky. reinterpret_cast is not the most elegant solution, // but it does avoid us making unnecessary copy. We will convert // sname and file fields in Pkt4 to string one day and life // will be easier. diff --git a/src/bin/dhcp4/json_config_parser.cc b/src/bin/dhcp4/json_config_parser.cc index 52b554972b..f7fd87bf0e 100644 --- a/src/bin/dhcp4/json_config_parser.cc +++ b/src/bin/dhcp4/json_config_parser.cc @@ -334,7 +334,7 @@ protected: subnet4->get4o6().enabled(true); } - // Try 4o6 specific paramter: 4o6-interface-id + // Try 4o6 specific parameter: 4o6-interface-id std::string ifaceid = string_values_->getOptionalParam("4o6-interface-id", ""); if (!ifaceid.empty()) { OptionBuffer tmp(ifaceid.begin(), ifaceid.end()); diff --git a/src/bin/dhcp4/tests/classify_unittest.cc b/src/bin/dhcp4/tests/classify_unittest.cc index 513c8a734e..d00ec05da5 100644 --- a/src/bin/dhcp4/tests/classify_unittest.cc +++ b/src/bin/dhcp4/tests/classify_unittest.cc @@ -138,7 +138,7 @@ public: IfaceMgr::instance().openSockets4(); } - /// @brief Desctructor. + /// @brief Destructor. /// ~ClassifyTest() { } diff --git a/src/bin/dhcp4/tests/config_parser_unittest.cc b/src/bin/dhcp4/tests/config_parser_unittest.cc index b517abcb4a..f1bdea22d8 100644 --- a/src/bin/dhcp4/tests/config_parser_unittest.cc +++ b/src/bin/dhcp4/tests/config_parser_unittest.cc @@ -2443,7 +2443,7 @@ TEST_F(Dhcp4ParserTest, optionDataBoolean) { sizeof(expected_option_data)); // Bogus values should not be accepted. - params["data"] = "bugus"; + params["data"] = "bogus"; testInvalidOptionParam(params); params["data"] = "2"; @@ -3239,7 +3239,7 @@ TEST_F(Dhcp4ParserTest, selectedInterfacesAndAddresses) { TEST_F(Dhcp4ParserTest, d2ClientConfig) { ConstElementPtr status; - // Verify that the D2 configuraiton can be fetched and is set to disabled. + // Verify that the D2 configuration can be fetched and is set to disabled. D2ClientConfigPtr d2_client_config = CfgMgr::instance().getD2ClientConfig(); EXPECT_FALSE(d2_client_config->getEnableUpdates()); @@ -3343,7 +3343,7 @@ TEST_F(Dhcp4ParserTest, invalidD2ClientConfig) { checkResult(status, 1); EXPECT_TRUE(errorContainsPosition(status, "")); - // Verify that the D2 configuraiton can be fetched and is set to disabled. + // Verify that the D2 configuration can be fetched and is set to disabled. D2ClientConfigPtr d2_client_config = CfgMgr::instance().getD2ClientConfig(); EXPECT_FALSE(d2_client_config->getEnableUpdates()); @@ -4152,7 +4152,7 @@ TEST_F(Dhcp4ParserTest, 4o6subnetBogus) { " \"4o6-subnet\": \"2001:db8:bogus/45\" } ]," "\"valid-lifetime\": 4000 }", - // Bogus configuration 3: incorrect prefix lenght + // Bogus configuration 3: incorrect prefix length "{ " + genIfaceConfig() + "," + "\"rebind-timer\": 2000, " "\"renew-timer\": 1000, " diff --git a/src/bin/dhcp4/tests/ctrl_dhcp4_srv_unittest.cc b/src/bin/dhcp4/tests/ctrl_dhcp4_srv_unittest.cc index 77bcb09035..5e9ebd0124 100644 --- a/src/bin/dhcp4/tests/ctrl_dhcp4_srv_unittest.cc +++ b/src/bin/dhcp4/tests/ctrl_dhcp4_srv_unittest.cc @@ -394,7 +394,7 @@ TEST_F(CtrlChannelDhcpv4SrvTest, controlLeasesReclaim) { EXPECT_TRUE(lease1->stateExpiredReclaimed()); } -// Thist test verifies that the DHCP server immediately removed expired +// This test verifies that the DHCP server immediately removed expired // leases on leases-reclaim command with remove = true TEST_F(CtrlChannelDhcpv4SrvTest, controlLeasesReclaimRemove) { createUnixChannelServer(); diff --git a/src/bin/dhcp4/tests/decline_unittest.cc b/src/bin/dhcp4/tests/decline_unittest.cc index 3dce25821f..738a970b0a 100644 --- a/src/bin/dhcp4/tests/decline_unittest.cc +++ b/src/bin/dhcp4/tests/decline_unittest.cc @@ -89,7 +89,7 @@ Dhcpv4SrvTest::acquireAndDecline(Dhcp4Client& client, isc::stats::StatsMgr::instance().setValue("declined-addresses", static_cast(0)); - // Ok, do the normal lease aquisition. + // Ok, do the normal lease acquisition. CfgMgr::instance().clear(); // Configure DHCP server. @@ -149,7 +149,7 @@ Dhcpv4SrvTest::acquireAndDecline(Dhcp4Client& client, if (expected_result == SHOULD_PASS) { EXPECT_EQ(Lease::STATE_DECLINED, lease->state_); - // The decline succeded, so the declined-addresses statistic should + // The decline succeeded, so the declined-addresses statistic should // be increased by one EXPECT_EQ(after, before + 1); diff --git a/src/bin/dhcp4/tests/dhcp4_client.cc b/src/bin/dhcp4/tests/dhcp4_client.cc index 6773db4da6..b728c601b0 100644 --- a/src/bin/dhcp4/tests/dhcp4_client.cc +++ b/src/bin/dhcp4/tests/dhcp4_client.cc @@ -186,7 +186,7 @@ Dhcp4Client::applyConfiguration() { // sname OptionBuffer buf = resp->getSname(); // sname is a fixed length field holding null terminated string. Use - // of c_str() guarantess that only a useful portion (ending with null + // of c_str() guarantees that only a useful portion (ending with null // character) is assigned. config_.sname_.assign(std::string(buf.begin(), buf.end()).c_str()); // (boot)file diff --git a/src/bin/dhcp4/tests/dhcp4_srv_unittest.cc b/src/bin/dhcp4/tests/dhcp4_srv_unittest.cc index 0f7033c011..50cb5f657c 100644 --- a/src/bin/dhcp4/tests/dhcp4_srv_unittest.cc +++ b/src/bin/dhcp4/tests/dhcp4_srv_unittest.cc @@ -2431,7 +2431,7 @@ TEST_F(Dhcpv4SrvTest, statisticsDecline) { } // Test checks whether statistic is bumped up appropriately when Offer -// message is received (this should never happen in a sane metwork). +// message is received (this should never happen in a sane network). TEST_F(Dhcpv4SrvTest, statisticsOfferRcvd) { NakedDhcpv4Srv srv(0); @@ -2439,7 +2439,7 @@ TEST_F(Dhcpv4SrvTest, statisticsOfferRcvd) { } // Test checks whether statistic is bumped up appropriately when Ack -// message is received (this should never happen in a sane metwork). +// message is received (this should never happen in a sane network). TEST_F(Dhcpv4SrvTest, statisticsAckRcvd) { NakedDhcpv4Srv srv(0); @@ -2447,7 +2447,7 @@ TEST_F(Dhcpv4SrvTest, statisticsAckRcvd) { } // Test checks whether statistic is bumped up appropriately when Nak -// message is received (this should never happen in a sane metwork). +// message is received (this should never happen in a sane network). TEST_F(Dhcpv4SrvTest, statisticsNakRcvd) { NakedDhcpv4Srv srv(0); diff --git a/src/bin/dhcp4/tests/dhcp4_test_utils.cc b/src/bin/dhcp4/tests/dhcp4_test_utils.cc index 7800554ce1..696ff3a66f 100644 --- a/src/bin/dhcp4/tests/dhcp4_test_utils.cc +++ b/src/bin/dhcp4/tests/dhcp4_test_utils.cc @@ -662,7 +662,7 @@ Dhcpv4SrvTest::pretendReceivingPkt(NakedDhcpv4Srv& srv, const std::string& confi ObservationPtr pkt4_rcvd = mgr.getObservation("pkt4-received"); ObservationPtr tested_stat = mgr.getObservation(stat_name); - // All expected statstics must be present. + // All expected statistics must be present. ASSERT_TRUE(pkt4_rcvd); ASSERT_TRUE(tested_stat); diff --git a/src/bin/dhcp4/tests/dhcp4_test_utils.h b/src/bin/dhcp4/tests/dhcp4_test_utils.h index b190c55dd0..27e1e91d11 100644 --- a/src/bin/dhcp4/tests/dhcp4_test_utils.h +++ b/src/bin/dhcp4/tests/dhcp4_test_utils.h @@ -421,7 +421,7 @@ public: /// /// Instantiates fake network interfaces, configures passed Dhcpv4Srv, /// then creates a message of specified type and sends it to the - /// server and then checks whether expected statstics were set + /// server and then checks whether expected statistics were set /// appropriately. /// /// @param srv the DHCPv4 server to be used diff --git a/src/bin/dhcp4/tests/dora_unittest.cc b/src/bin/dhcp4/tests/dora_unittest.cc index 4719629ceb..ae7013b803 100644 --- a/src/bin/dhcp4/tests/dora_unittest.cc +++ b/src/bin/dhcp4/tests/dora_unittest.cc @@ -355,7 +355,7 @@ public: isc::stats::StatsMgr::instance().removeAll(); } - /// @brief Desctructor. + /// @brief Destructor. /// /// Cleans up statistics after the test. ~DORATest() { @@ -609,7 +609,7 @@ TEST_F(DORATest, initRebootRequest) { EXPECT_EQ(DHCPNAK, static_cast(resp->getType())); // Change client identifier. The server should treat the request - // as a resquest from unknown client and ignore it. + // as a request from unknown client and ignore it. client.includeClientId("12:34"); ASSERT_NO_THROW(client.doRequest()); ASSERT_FALSE(client.getContext().response_); @@ -1315,7 +1315,7 @@ TEST_F(DORATest, reservationsWithConflicts) { // Client A performs 4-way exchange. client.setState(Dhcp4Client::SELECTING); - // Revert to the broadcast address for the selcting client. + // Revert to the broadcast address for the selecting client. client.setDestAddress(IOAddress::IPV4_BCAST_ADDRESS()); // Obtain a lease from the server using the 4-way exchange. ASSERT_NO_THROW(client.doDORA(boost::shared_ptr< @@ -1379,7 +1379,7 @@ TEST_F(DORATest, statisticsDORA) { ObservationPtr pkt4_ack_sent = mgr.getObservation("pkt4-ack-sent"); ObservationPtr pkt4_sent = mgr.getObservation("pkt4-sent"); - // All expected statstics must be present. + // All expected statistics must be present. ASSERT_TRUE(pkt4_received); ASSERT_TRUE(pkt4_discover_received); ASSERT_TRUE(pkt4_offer_sent); @@ -1441,7 +1441,7 @@ TEST_F(DORATest, statisticsNAK) { ObservationPtr pkt4_nak_sent = mgr.getObservation("pkt4-nak-sent"); ObservationPtr pkt4_sent = mgr.getObservation("pkt4-sent"); - // All expected statstics must be present. + // All expected statistics must be present. ASSERT_TRUE(pkt4_received); ASSERT_TRUE(pkt4_request_received); ASSERT_FALSE(pkt4_ack_sent); // No acks were sent, no such statistic expected. diff --git a/src/bin/dhcp4/tests/fqdn_unittest.cc b/src/bin/dhcp4/tests/fqdn_unittest.cc index afb469cd46..789b19b884 100644 --- a/src/bin/dhcp4/tests/fqdn_unittest.cc +++ b/src/bin/dhcp4/tests/fqdn_unittest.cc @@ -427,7 +427,7 @@ public: // in a client request correctly, according to the replace-client-name // mode configuration parameter. // - // @param mode - value to use client-name-replacment parameter - for + // @param mode - value to use client-name-replacement parameter - for // mode labels such as NEVER and ALWAYS must incluce enclosing quotes: // "\"NEVER\"". This allows us to also pass in boolean literals which // are unquoted. @@ -568,7 +568,7 @@ public: /// @param len - expected lease length in the NCR /// @param not_strict_expire_check - when true the comparison of the NCR /// lease expiration time is conducted as greater than or equal to rather - /// equal to CLTT plus lease lenght. + /// equal to CLTT plus lease length. void verifyNameChangeRequest(const isc::dhcp_ddns::NameChangeType type, const bool reverse, const bool forward, const std::string& addr, @@ -1462,7 +1462,7 @@ TEST_F(NameDhcpv4SrvTest, hostnameReservationNoDNSQualifyingSuffix) { // Test verifies that the server properly generates a FQDN when the client // FQDN name is blank, whether or not DDNS updates are enabled. It also // verifies that the lease is only in the database following a DHCPREQUEST and -// that the lesae contains the generated FQDN. +// that the lease contains the generated FQDN. TEST_F(NameDhcpv4SrvTest, emptyFqdn) { Dhcp4Client client(Dhcp4Client::SELECTING); isc::asiolink::IOAddress expected_address("10.0.0.10"); diff --git a/src/bin/dhcp4/tests/host_options_unittest.cc b/src/bin/dhcp4/tests/host_options_unittest.cc index b2c86e0660..aaed55c154 100644 --- a/src/bin/dhcp4/tests/host_options_unittest.cc +++ b/src/bin/dhcp4/tests/host_options_unittest.cc @@ -81,9 +81,9 @@ const bool STATEFUL = false; /// - Single subnet 10.0.0.0/24 with a pool of 10.0.0.10-10.0.0.100 /// - Single reservation within the subnet: /// - HW address: aa:bb:cc:dd:ee:ff -/// - ip-adress 10.0.0.7 +/// - ip-address 10.0.0.7 /// - Vendor option for Cable Labs vendor id specified for the reservation: -/// - TFTP servers suboption overriding globally spececified suboption: +/// - TFTP servers suboption overriding globally specified suboption: /// 10.1.1.202,10.1.1.203 /// const char* HOST_CONFIGS[] = { @@ -252,7 +252,7 @@ public: /// Overridden options are requested with Parameter Request List /// option. /// - /// @param stateless Boolean value indicating if statless or stateful + /// @param stateless Boolean value indicating if stateless or stateful /// configuration should be performed. void testOverrideRequestedOptions(const bool stateless); @@ -262,21 +262,21 @@ public: /// Overridden options are the options which server sends regardless /// if they are requested with Parameter Request List option or not. /// - /// @param stateless Boolean value indicating if statless or stateful + /// @param stateless Boolean value indicating if stateless or stateful /// configuration should be performed. void testOverrideDefaultOptions(const bool stateless); /// @brief Verifies that client receives options when they are solely /// defined in the host scope (and not in the global or subnet scope). /// - /// @param stateless Boolean value indicating if statless or stateful + /// @param stateless Boolean value indicating if stateless or stateful /// configuration should be performed. void testHostOnlyOptions(const bool stateless); /// @brief Verifies that host specific vendor options override vendor /// options defined in the global scope. /// - /// @param stateless Boolean value indicating if statless or stateful + /// @param stateless Boolean value indicating if stateless or stateful /// configuration should be performed. void testOverrideVendorOptions(const bool stateless); diff --git a/src/bin/dhcp4/tests/inform_unittest.cc b/src/bin/dhcp4/tests/inform_unittest.cc index 7a45b7e0a1..ec66b78485 100644 --- a/src/bin/dhcp4/tests/inform_unittest.cc +++ b/src/bin/dhcp4/tests/inform_unittest.cc @@ -139,7 +139,7 @@ public: isc::stats::StatsMgr::instance().removeAll(); } - /// @brief Desctructor. + /// @brief Destructor. /// /// Cleans up statistics after the test. ~InformTest() { diff --git a/src/bin/dhcp4/tests/kea_controller_unittest.cc b/src/bin/dhcp4/tests/kea_controller_unittest.cc index c42a022c88..a163ed409a 100644 --- a/src/bin/dhcp4/tests/kea_controller_unittest.cc +++ b/src/bin/dhcp4/tests/kea_controller_unittest.cc @@ -349,7 +349,7 @@ TEST_F(JSONFileBackendTest, timers) { "}"; writeFile(config); - // Create an instance of the server and intialize it. + // Create an instance of the server and initialize it. boost::scoped_ptr srv; ASSERT_NO_THROW(srv.reset(new ControlledDhcpv4Srv(0))); ASSERT_NO_THROW(srv->init(TEST_FILE)); @@ -418,7 +418,7 @@ TEST_F(JSONFileBackendTest, defaultLeaseDbBackend) { "}"; writeFile(config); - // Create an instance of the server and intialize it. + // Create an instance of the server and initialize it. boost::scoped_ptr srv; ASSERT_NO_THROW(srv.reset(new ControlledDhcpv4Srv(0))); ASSERT_NO_THROW(srv->init(TEST_FILE)); @@ -520,7 +520,7 @@ testBackendReconfiguration(const std::string& backend_first, const std::string& backend_second) { writeFile(createConfiguration(backend_first)); - // Create an instance of the server and intialize it. + // Create an instance of the server and initialize it. boost::scoped_ptr srv; ASSERT_NO_THROW(srv.reset(new NakedControlledDhcpv4Srv())); srv->setConfigFile(TEST_FILE); diff --git a/src/bin/dhcp4/tests/marker_file.h.in b/src/bin/dhcp4/tests/marker_file.h.in index e957c67230..8b7418998d 100644 --- a/src/bin/dhcp4/tests/marker_file.h.in +++ b/src/bin/dhcp4/tests/marker_file.h.in @@ -45,7 +45,7 @@ checkMarkerFile(const char* name, const char* expected); /// /// This function is used in some of the DHCP server tests. /// -/// Checkes that the specified file does NOT exist. +/// Checks that the specified file does NOT exist. /// /// @param name Name of the marker file. /// diff --git a/src/bin/dhcp4/tests/out_of_range_unittest.cc b/src/bin/dhcp4/tests/out_of_range_unittest.cc index ae0f841a0a..43c347cfe8 100644 --- a/src/bin/dhcp4/tests/out_of_range_unittest.cc +++ b/src/bin/dhcp4/tests/out_of_range_unittest.cc @@ -203,7 +203,7 @@ public: IfaceMgr::instance().openSockets4(); } - /// @brief Desctructor. + /// @brief Destructor. /// /// Cleans up statistics after the test. ~OutOfRangeTest() { @@ -224,7 +224,7 @@ public: /// off the queue. Note the function expects there to be 1 and only /// 1 NCR queued. /// - /// @param type - NCR type exepcted, either CHG_ADD or CHG_REMOVE + /// @param type - NCR type expected, either CHG_ADD or CHG_REMOVE /// @param addr - string containing the ip address expected in the NCR void verifyNameChangeRequest(const isc::dhcp_ddns::NameChangeType type, const std::string& addr) { @@ -245,7 +245,7 @@ public: /// /// Each test cycles consists of a the following two stages, the first is /// a set-up stage during which the server is configured with an initial, - /// reference, configuration and a client then verifies that it can aquire + /// reference, configuration and a client then verifies that it can acquire /// and renew a lease. The second stage verifies that the server, having /// been reconfigured such that the original lease is now "out-of-range", /// responds correctly to the same client first attempting to renew the @@ -301,7 +301,7 @@ OutOfRangeTest::oorRenewReleaseTest(enum CfgIndex cfg_idx, client.setHWAddress(hwaddress); } - // Aquire the lease via DORA + // Acquire the lease via DORA ASSERT_NO_THROW(client.doDORA()); // Make sure that the server responded. @@ -406,7 +406,7 @@ TEST_F(OutOfRangeTest, dynamicOutOfSubnet) { DOES_NOT_RENEW); } -// Test verifies that once-valid dynamic address host reserveration, +// Test verifies that once-valid dynamic address host reservation, // whose address is no longer within the subnet's pool: // // a: Is NAKed upon a renewal attempt @@ -419,7 +419,7 @@ TEST_F(OutOfRangeTest, dynamicHostOutOfPool) { oorRenewReleaseTest(DIFF_POOL, hwaddress, expected_address, DOES_NOT_RENEW); } -// Test verifies that once-valid dynamic address host reserveration, +// Test verifies that once-valid dynamic address host reservation, // whose address is no longer within any configured subnet: // // a: Is NAKed upon a renewal attempt @@ -433,7 +433,7 @@ TEST_F(OutOfRangeTest, dynamicHostOutOfSubnet) { DOES_NOT_RENEW); } -// Test verifies that once-valid dynamic address host reserveration, +// Test verifies that once-valid dynamic address host reservation, // whose address is within the configured subnet and pool, but whose // reservation has been removed: // @@ -449,7 +449,7 @@ TEST_F(OutOfRangeTest, dynamicHostReservationRemoved) { oorRenewReleaseTest(NO_HR, hwaddress, expected_address, DOES_RENEW); } -// Test verifies that once-valid dynamic address host reserveration, +// Test verifies that once-valid dynamic address host reservation, // whose address is no longer within any configured subnet, and which // no longer has reservation defined: // @@ -466,7 +466,7 @@ TEST_F(OutOfRangeTest, dynamicHostOutOfSubnetReservationRemoved) { DOES_NOT_RENEW); } -// Test verifies that once-valid in-subnet fixed-address host reserveration, +// Test verifies that once-valid in-subnet fixed-address host reservation, // after the subnet pool changes: // // a: Is NAK'd upon a renewal attempt @@ -481,7 +481,7 @@ TEST_F(OutOfRangeTest, fixedHostOutOfSubnet) { } -// Test verifies that once-valid in-subnet fixed-address host reserveration, +// Test verifies that once-valid in-subnet fixed-address host reservation, // after the subnet pool is changed: // // a: Is ACK'd upon a renewal attempt @@ -494,7 +494,7 @@ TEST_F(OutOfRangeTest, fixedHostDifferentPool) { oorRenewReleaseTest(DIFF_POOL, hwaddress, expected_address, DOES_RENEW); } -// Test verifies that once-valid in-subnet fixed-address host reserveration, +// Test verifies that once-valid in-subnet fixed-address host reservation, // whose reservation has been removed from the configuration // // a: Is NAK'd upon a renewal attempt @@ -507,7 +507,7 @@ TEST_F(OutOfRangeTest, fixedHostReservationRemoved) { oorRenewReleaseTest(NO_HR, hwaddress, expected_address, DOES_NOT_RENEW); } -// Test verifies that once-valid fixed address host reserveration, +// Test verifies that once-valid fixed address host reservation, // whose address is no longer within any configured subnet // // a: Is NAKed upon a renewal attempt diff --git a/src/bin/dhcp4/tests/release_unittest.cc b/src/bin/dhcp4/tests/release_unittest.cc index 4ea8c4d282..67bd0e15a2 100644 --- a/src/bin/dhcp4/tests/release_unittest.cc +++ b/src/bin/dhcp4/tests/release_unittest.cc @@ -171,7 +171,7 @@ ReleaseTest::acquireAndRelease(const std::string& hw_address_1, if (expected_result == SHOULD_PASS) { EXPECT_FALSE(lease); - // The removal succeded, so the assigned-addresses statistic should + // The removal succeeded, so the assigned-addresses statistic should // be decreased by one EXPECT_EQ(before, after + 1); } else { diff --git a/src/bin/dhcp6/ctrl_dhcp6_srv.h b/src/bin/dhcp6/ctrl_dhcp6_srv.h index b1ca9587c1..9001c7f908 100644 --- a/src/bin/dhcp6/ctrl_dhcp6_srv.h +++ b/src/bin/dhcp6/ctrl_dhcp6_srv.h @@ -167,7 +167,7 @@ private: /// this method. /// /// @param max_leases Maximum number of leases to be reclaimed. - /// @param timeout Maximum amount of time that the reclaimation routine + /// @param timeout Maximum amount of time that the reclamation routine /// may be processing expired leases, expressed in milliseconds. /// @param remove_lease A boolean value indicating if the lease should /// be removed when it is reclaimed (if true) or it should be left in the diff --git a/src/bin/dhcp6/dhcp6_srv.cc b/src/bin/dhcp6/dhcp6_srv.cc index 7af52ea5c4..58288bd08d 100644 --- a/src/bin/dhcp6/dhcp6_srv.cc +++ b/src/bin/dhcp6/dhcp6_srv.cc @@ -1646,7 +1646,7 @@ Dhcpv6Srv::extendIA_NA(const Pkt6Ptr& query, const Pkt6Ptr& answer, ia_rsp->setT1(subnet->getT1()); ia_rsp->setT2(subnet->getT2()); - // Get DDNS udpate directions + // Get DDNS update directions bool do_fwd = false; bool do_rev = false; Option6ClientFqdnPtr fqdn = boost::dynamic_pointer_cast< @@ -1753,7 +1753,7 @@ Dhcpv6Srv::extendIA_NA(const Pkt6Ptr& query, const Pkt6Ptr& answer, // All is left is to insert the status code. if (leases.empty()) { - // The server wasn't able allocate new lease and renew an exising + // The server wasn't able allocate new lease and renew an existing // lease. In that case, the server sends NoAddrsAvail per RFC7550. ia_rsp->addOption(createStatusCode(*query, *ia_rsp, STATUS_NoAddrsAvail, @@ -1916,7 +1916,7 @@ Dhcpv6Srv::extendIA_PD(const Pkt6Ptr& query, // All is left is to insert the status code. if (leases.empty()) { - // The server wasn't able allocate new lease and renew an exising + // The server wasn't able allocate new lease and renew an existing // lease. In that case, the server sends NoPrefixAvail per RFC7550. ia_rsp->addOption(createStatusCode(*query, *ia_rsp, STATUS_NoPrefixAvail, @@ -2903,7 +2903,7 @@ Dhcpv6Srv::processInfRequest(const Pkt6Ptr& inf_request) { // Try to assign options that were requested by the client. appendRequestedOptions(inf_request, reply, co_list); - // Try to assigne vendor options that were requested by the client. + // Try to assign vendor options that were requested by the client. appendRequestedVendorOptions(inf_request, reply, ctx, co_list); return (reply); diff --git a/src/bin/dhcp6/dhcp6_srv.h b/src/bin/dhcp6/dhcp6_srv.h index f7fec430e7..a5716be65c 100644 --- a/src/bin/dhcp6/dhcp6_srv.h +++ b/src/bin/dhcp6/dhcp6_srv.h @@ -82,7 +82,7 @@ public: /// redeclaration/redefinition. @ref Daemon::getVersion() static std::string getVersion(bool extended); - /// @brief Returns server-indentifier option. + /// @brief Returns server-identifier option. /// /// @return server-id option OptionPtr getServerID() { return serverid_; } @@ -692,7 +692,7 @@ protected: /// This method iterates over all IA_NA options and calls @ref declineIA on /// each of them. /// - /// @param decline Decline messege sent by a client + /// @param decline Decline message sent by a client /// @param reply Server's response (IA_NA with status will be added here) /// @param ctx context /// @return true when expected to continue, false when hooks told us to drop @@ -722,7 +722,7 @@ protected: /// - cleans up DNS, if necessary /// - updates subnet[X].declined-addresses (per subnet stat) /// - updates declined-addresses (global stat) - /// - deassociates client information from the lease + /// - dissociates client information from the lease /// - moves the lease to DECLINED state /// - sets lease expiration time to decline-probation-period /// - adds status-code success diff --git a/src/bin/dhcp6/json_config_parser.cc b/src/bin/dhcp6/json_config_parser.cc index 995390f4cc..50e9b282de 100644 --- a/src/bin/dhcp6/json_config_parser.cc +++ b/src/bin/dhcp6/json_config_parser.cc @@ -832,7 +832,7 @@ configureDhcp6Server(Dhcpv6Srv&, isc::data::ConstElementPtr config_set) { // rollback informs whether error occurred and original data // have to be restored to global storages. bool rollback = false; - // config_pair holds ther details of the current parser when iterating over + // config_pair holds the details of the current parser when iterating over // the parsers. It is declared outside the loop so in case of error, the // name of the failing parser can be retrieved within the "catch" clause. ConfigPair config_pair; diff --git a/src/bin/dhcp6/main.cc b/src/bin/dhcp6/main.cc index 6bde296fa6..3097e10ee6 100644 --- a/src/bin/dhcp6/main.cc +++ b/src/bin/dhcp6/main.cc @@ -158,8 +158,9 @@ main(int argc, char* argv[]) { log_manager.process(); LOG_ERROR(dhcp6_logger, DHCP6_INIT_FAIL).arg(ex.what()); } catch (...) { - // The exeption thrown during the initialization could originate - // from logger subsystem. Therefore LOG_ERROR() may fail as well. + // The exception thrown during the initialization could + // originate from logger subsystem. Therefore LOG_ERROR() may + // fail as well. cerr << "Failed to initialize server: " << ex.what() << endl; } diff --git a/src/bin/dhcp6/tests/config_parser_unittest.cc b/src/bin/dhcp6/tests/config_parser_unittest.cc index 460fc625b4..be1659e439 100644 --- a/src/bin/dhcp6/tests/config_parser_unittest.cc +++ b/src/bin/dhcp6/tests/config_parser_unittest.cc @@ -562,7 +562,7 @@ public: CfgMgr::instance().clear(); } - /// @brief Test invalid option paramater value. + /// @brief Test invalid option parameter value. /// /// This test function constructs the simple configuration /// string and injects invalid option configuration into it. @@ -776,7 +776,7 @@ TEST_F(Dhcp6ParserTest, emptySubnet) { ConstElementPtr status; EXPECT_NO_THROW(status = configureDhcp6Server(srv_, json)); - + // returned value should be 0 (success) checkResult(status, 0); } @@ -3785,7 +3785,7 @@ TEST_F(Dhcp6ParserTest, classifySubnets) { // This test checks the ability of the server to parse a configuration // containing a full, valid dhcp-ddns (D2ClientConfig) entry. TEST_F(Dhcp6ParserTest, d2ClientConfig) { - // Verify that the D2 configuraiton can be fetched and is set to disabled. + // Verify that the D2 configuration can be fetched and is set to disabled. D2ClientConfigPtr d2_client_config = CfgMgr::instance().getD2ClientConfig(); EXPECT_FALSE(d2_client_config->getEnableUpdates()); @@ -3891,7 +3891,7 @@ TEST_F(Dhcp6ParserTest, invalidD2ClientConfig) { checkResult(status, 1); EXPECT_TRUE(errorContainsPosition(status, "")); - // Verify that the D2 configuraiton can be fetched and is set to disabled. + // Verify that the D2 configuration can be fetched and is set to disabled. D2ClientConfigPtr d2_client_config = CfgMgr::instance().getD2ClientConfig(); EXPECT_FALSE(d2_client_config->getEnableUpdates()); diff --git a/src/bin/dhcp6/tests/confirm_unittest.cc b/src/bin/dhcp6/tests/confirm_unittest.cc index 2bce9a886e..7a763eeb67 100644 --- a/src/bin/dhcp6/tests/confirm_unittest.cc +++ b/src/bin/dhcp6/tests/confirm_unittest.cc @@ -274,7 +274,7 @@ TEST_F(ConfirmTest, relayedClientNoSubnet) { // Send Confirm message to the server. ASSERT_NO_THROW(client.doConfirm()); // Client should have received a status code option and this option should - // indicate that the client is NotOnLink becuase subnet could not be + // indicate that the client is NotOnLink because subnet could not be // selected. ASSERT_TRUE(client.receivedStatusCode()); ASSERT_EQ(STATUS_NotOnLink, client.getStatusCode()); diff --git a/src/bin/dhcp6/tests/decline_unittest.cc b/src/bin/dhcp6/tests/decline_unittest.cc index 5d0698d630..852a0eb14d 100644 --- a/src/bin/dhcp6/tests/decline_unittest.cc +++ b/src/bin/dhcp6/tests/decline_unittest.cc @@ -166,7 +166,7 @@ Dhcpv6SrvTest::acquireAndDecline(Dhcp6Client& client, if (expected_result == SHOULD_PASS) { EXPECT_EQ(Lease::STATE_DECLINED, lease->state_); - // The decline succeded, so the declined-addresses statistic should + // The decline succeeded, so the declined-addresses statistic should // be increased by one EXPECT_EQ(after, before + 1); EXPECT_EQ(after_global, before_global + 1); diff --git a/src/bin/dhcp6/tests/dhcp6_test_utils.cc b/src/bin/dhcp6/tests/dhcp6_test_utils.cc index 7ab67b7cdd..3703035320 100644 --- a/src/bin/dhcp6/tests/dhcp6_test_utils.cc +++ b/src/bin/dhcp6/tests/dhcp6_test_utils.cc @@ -675,7 +675,7 @@ Dhcpv6SrvTest::testReceiveStats(uint8_t pkt_type, const std::string& stat_name) // fakeReceive() srv.run(); - // All expected statstics must be present. + // All expected statistics must be present. pkt6_rcvd = mgr.getObservation("pkt6-received"); tested_stat = mgr.getObservation(stat_name); ASSERT_TRUE(pkt6_rcvd); diff --git a/src/bin/dhcp6/tests/dhcp6_test_utils.h b/src/bin/dhcp6/tests/dhcp6_test_utils.h index 95f706d351..8df2522e03 100644 --- a/src/bin/dhcp6/tests/dhcp6_test_utils.h +++ b/src/bin/dhcp6/tests/dhcp6_test_utils.h @@ -376,7 +376,7 @@ public: // dependencies, we use forward declaration here. class Dhcp6Client; -// Provides suport for tests against a preconfigured subnet6 +// Provides support for tests against a preconfigured subnet6 // extends upon NakedDhcp6SrvTest class Dhcpv6SrvTest : public NakedDhcpv6SrvTest { public: diff --git a/src/bin/dhcp6/tests/fqdn_unittest.cc b/src/bin/dhcp6/tests/fqdn_unittest.cc index d645995f9d..74ee392e9b 100644 --- a/src/bin/dhcp6/tests/fqdn_unittest.cc +++ b/src/bin/dhcp6/tests/fqdn_unittest.cc @@ -234,7 +234,7 @@ public: /// @brief Adds IA option to the message. /// - /// Addded option holds an address. + /// Added option holds an address. /// /// @param iaid IAID /// @param pkt A DHCPv6 message to which the IA option should be added. @@ -391,7 +391,7 @@ public: // in a client request correctly, according to the replace-client-name // mode configuration parameter. // - // @param mode - value to use client-name-replacment parameter - for + // @param mode - value to use client-name-replacement parameter - for // mode labels such as NEVER and ALWAYS must incluce enclosing quotes: // "\"NEVER\"". This allows us to also pass in boolean literals which // are unquoted. @@ -556,7 +556,7 @@ public: /// /// @param type An expected type of the NameChangeRequest (Add or Remove). /// @param reverse An expected setting of the reverse update flag. - /// @param forward An expected setting of the forward udpate flag. + /// @param forward An expected setting of the forward update flag. /// @param addr A string representation of the IPv6 address held in the /// NameChangeRequest. /// @param dhcid An expected DHCID value. @@ -564,7 +564,7 @@ public: /// dhcp_ddns::D2Dhcid::createDigest() with the appropriate arguments. This /// method uses encryption tools to produce the value which cannot be /// easily duplicated by hand. It is more or less necessary to generate - /// these values programmatically and place them here. Should the + /// these values programatically and place them here. Should the /// underlying implementation of createDigest() change these test values /// will likely need to be updated as well. /// @param expires A timestamp when the lease associated with the @@ -793,7 +793,7 @@ TEST_F(FqdnDhcpv6SrvTest, createNameChangeRequests) { // Checks that NameChangeRequests to add entries are not // created when ddns updates are disabled. TEST_F(FqdnDhcpv6SrvTest, noAddRequestsWhenDisabled) { - // Disable DDNS udpates. + // Disable DDNS updates. disableD2(); // Create Reply message with Client Id and Server id. diff --git a/src/bin/dhcp6/tests/host_unittest.cc b/src/bin/dhcp6/tests/host_unittest.cc index 4d0bba3971..b5d7993671 100644 --- a/src/bin/dhcp6/tests/host_unittest.cc +++ b/src/bin/dhcp6/tests/host_unittest.cc @@ -532,7 +532,7 @@ public: void testLeaseForIA(const Reservation& r, size_t& address_count, size_t& prefix_count); - /// @brief Checks if the client obtined lease for specified hint. + /// @brief Checks if the client obtained lease for specified hint. /// /// The hint belongs to a specific IA (identified by IAID) and is expected /// to be returned in this IA by the server. @@ -1559,7 +1559,7 @@ TEST_F(HostTest, appendReservationDuringRenew) { EXPECT_TRUE(client_.hasLeaseForPrefix(IOAddress("3000:1:2::"), 64)); EXPECT_TRUE(client_.hasLeaseForPrefix(IOAddress("3000:1:3::"), 64)); - // Make sure that the replaced leases have been returned with zero liftimes. + // Make sure that the replaced leases have been returned with zero lifetimes. EXPECT_TRUE(client_.hasLeaseWithZeroLifetimeForAddress(dynamic_address_lease)); EXPECT_TRUE(client_.hasLeaseWithZeroLifetimeForPrefix(dynamic_prefix_lease, 64)); @@ -1578,7 +1578,7 @@ TEST_F(HostTest, appendReservationDuringRenew) { // allocated once, i.e. 6 + 6 = 12. ASSERT_EQ(12, client_.getLeaseNum()); - // All removed leases should be returned with zero liftimes. + // All removed leases should be returned with zero lifetimes. EXPECT_TRUE(client_.hasLeaseWithZeroLifetimeForAddress(IOAddress("2001:db8:1:1::1"))); EXPECT_TRUE(client_.hasLeaseWithZeroLifetimeForAddress(IOAddress("2001:db8:1:1::2"))); EXPECT_TRUE(client_.hasLeaseWithZeroLifetimeForAddress(IOAddress("2001:db8:1:1::3"))); @@ -1670,7 +1670,7 @@ TEST_F(HostTest, insertReservationDuringRenew) { EXPECT_TRUE(client_.hasLeaseForPrefix(IOAddress("3000:1:3::"), 64, IAID(6))); - // Make sure that the replaced leases have been returned with zero liftimes. + // Make sure that the replaced leases have been returned with zero lifetimes. EXPECT_TRUE(client_.hasLeaseWithZeroLifetimeForAddress(dynamic_address_lease)); EXPECT_TRUE(client_.hasLeaseWithZeroLifetimeForPrefix(dynamic_prefix_lease, 64)); } @@ -1737,7 +1737,7 @@ TEST_F(HostTest, multipleIAsConflict) { ASSERT_TRUE(client_.hasLeaseForAddress(IOAddress("2001:db8:1::2"), IAID(1))); // The address "2001:db8:1::1" was hijacked by another client so it - // must not be assigned to thsi client. + // must not be assigned to this client. ASSERT_FALSE(client_.hasLeaseForAddress(IOAddress("2001:db8:1::1"))); // This client should have got an address from the dynamic pool excluding // two addresses already assigned, i.e. excluding "2001:db8:1::1" and diff --git a/src/bin/dhcp6/tests/infrequest_unittest.cc b/src/bin/dhcp6/tests/infrequest_unittest.cc index 1950633570..145caa9abc 100644 --- a/src/bin/dhcp6/tests/infrequest_unittest.cc +++ b/src/bin/dhcp6/tests/infrequest_unittest.cc @@ -24,7 +24,7 @@ namespace { /// - one subnet used on eth0 interface /// - with address and prefix pools /// - dns-servers option -/// - Configuation 1: +/// - Configuration 1: /// - one subnet used on eth0 interface /// - no addresses or prefixes /// - domain-search option diff --git a/src/bin/dhcp6/tests/kea_controller_unittest.cc b/src/bin/dhcp6/tests/kea_controller_unittest.cc index dc2fc57c9c..180e56fe79 100644 --- a/src/bin/dhcp6/tests/kea_controller_unittest.cc +++ b/src/bin/dhcp6/tests/kea_controller_unittest.cc @@ -485,7 +485,7 @@ TEST_F(JSONFileBackendTest, timers) { "}"; writeFile(TEST_FILE, config); - // Create an instance of the server and intialize it. + // Create an instance of the server and initialize it. boost::scoped_ptr srv; ASSERT_NO_THROW(srv.reset(new ControlledDhcpv6Srv(0))); ASSERT_NO_THROW(srv->init(TEST_FILE)); @@ -562,7 +562,7 @@ TEST_F(JSONFileBackendTest, serverId) { "}"; writeFile(TEST_FILE, config); - // Create an instance of the server and intialize it. + // Create an instance of the server and initialize it. boost::scoped_ptr srv; ASSERT_NO_THROW(srv.reset(new ControlledDhcpv6Srv(0))); ASSERT_NO_THROW(srv->init(TEST_FILE)); @@ -593,7 +593,7 @@ TEST_F(JSONFileBackendTest, defaultLeaseDbBackend) { "}"; writeFile(TEST_FILE, config); - // Create an instance of the server and intialize it. + // Create an instance of the server and initialize it. boost::scoped_ptr srv; ASSERT_NO_THROW(srv.reset(new ControlledDhcpv6Srv(0))); ASSERT_NO_THROW(srv->init(TEST_FILE)); @@ -696,7 +696,7 @@ testBackendReconfiguration(const std::string& backend_first, const std::string& backend_second) { writeFile(TEST_FILE, createConfiguration(backend_first)); - // Create an instance of the server and intialize it. + // Create an instance of the server and initialize it. boost::scoped_ptr srv; ASSERT_NO_THROW(srv.reset(new NakedControlledDhcpv6Srv())); srv->setConfigFile(TEST_FILE); diff --git a/src/bin/dhcp6/tests/marker_file.h.in b/src/bin/dhcp6/tests/marker_file.h.in index e957c67230..8b7418998d 100644 --- a/src/bin/dhcp6/tests/marker_file.h.in +++ b/src/bin/dhcp6/tests/marker_file.h.in @@ -45,7 +45,7 @@ checkMarkerFile(const char* name, const char* expected); /// /// This function is used in some of the DHCP server tests. /// -/// Checkes that the specified file does NOT exist. +/// Checks that the specified file does NOT exist. /// /// @param name Name of the marker file. /// diff --git a/src/bin/dhcp6/tests/sarr_unittest.cc b/src/bin/dhcp6/tests/sarr_unittest.cc index 0aea09fd55..728af111b8 100644 --- a/src/bin/dhcp6/tests/sarr_unittest.cc +++ b/src/bin/dhcp6/tests/sarr_unittest.cc @@ -513,7 +513,7 @@ TEST_F(SARRTest, sarrStats) { // Server should have assigned a prefix. ASSERT_EQ(1, client.getLeaseNum()); - // All expected statstics must be present now. + // All expected statistics must be present now. pkt6_rcvd = mgr.getObservation("pkt6-received"); pkt6_solicit_rcvd = mgr.getObservation("pkt6-solicit-received"); pkt6_adv_sent = mgr.getObservation("pkt6-advertise-sent"); diff --git a/src/bin/keactrl/keactrl.in b/src/bin/keactrl/keactrl.in index 78ed259c98..0ffc468d64 100644 --- a/src/bin/keactrl/keactrl.in +++ b/src/bin/keactrl/keactrl.in @@ -57,7 +57,7 @@ usage() { } ### Functions managing Kea processes ### -# Contructs a server's PID file based on its binary name, the config file, +# Constructs a server's PID file based on its binary name, the config file, # and the --localstatedir and returns the contents as $_pid. If the file # does not exist, the value of $_pid is 0. If the file exists but cannot # be read the function exists with a error message. Note the PID file name diff --git a/src/bin/lfc/lfc_controller.cc b/src/bin/lfc/lfc_controller.cc index d8fcd9d1ac..844781453c 100644 --- a/src/bin/lfc/lfc_controller.cc +++ b/src/bin/lfc/lfc_controller.cc @@ -311,7 +311,7 @@ LFCController::usage(const std::string& text) { << " -f : finish file" << std::endl << " -c : configuration file" << std::endl << " -v: print version number and exit" << std::endl - << " -V: print extended version inforamtion and exit" << std::endl + << " -V: print extended version information and exit" << std::endl << " -d: optional, verbose output " << std::endl << " -h: print this message " << std::endl << std::endl; diff --git a/src/bin/lfc/lfc_controller.h b/src/bin/lfc/lfc_controller.h index ff647655bb..a6da5c1af7 100644 --- a/src/bin/lfc/lfc_controller.h +++ b/src/bin/lfc/lfc_controller.h @@ -154,7 +154,7 @@ public: private: /// Version of the DHCP protocol used, i.e. 4 or 6. int protocol_version_; - /// When true output the result of parsing the comamnd line + /// When true output the result of parsing the command line bool verbose_; std::string config_file_; ///< The path to the config file std::string previous_file_; ///< The path to the previous LFC file (if any) diff --git a/src/bin/lfc/tests/lfc_controller_unittests.cc b/src/bin/lfc/tests/lfc_controller_unittests.cc index 76a80ddb38..3ee8ae1a26 100644 --- a/src/bin/lfc/tests/lfc_controller_unittests.cc +++ b/src/bin/lfc/tests/lfc_controller_unittests.cc @@ -219,7 +219,7 @@ TEST_F(LFCControllerTest, notEnoughData) { /// @brief Verify that extra arguments cause the parse to fail. /// Parse a full command line plus some extra arguments on the end /// to verify that we don't stop parsing when we find all of the -/// required arguments. We exepct the parse to fail with an +/// required arguments. We expect the parse to fail with an /// InvalidUsage exception. TEST_F(LFCControllerTest, tooMuchData) { LFCController lfc_controller; @@ -297,7 +297,7 @@ TEST_F(LFCControllerTest, fileRotate) { int argc = 14; lfc_controller.parseArgs(argc, argv); - // Test 1: Start with no files - we expect an execption as there + // Test 1: Start with no files - we expect an exception as there // is no file to copy. EXPECT_THROW(lfc_controller.fileRotate(), RunTimeFail); removeTestFile(); diff --git a/src/bin/perfdhcp/command_options.cc b/src/bin/perfdhcp/command_options.cc index 32e8638d1f..167d20f3e5 100644 --- a/src/bin/perfdhcp/command_options.cc +++ b/src/bin/perfdhcp/command_options.cc @@ -230,7 +230,7 @@ CommandOptions::initialize(int argc, char** argv, bool print_cmd_line) { // agent. In the future we should extend it to up to 32. // See comment in https://github.com/isc-projects/kea/pull/22#issuecomment-243405600 v6_relay_encapsulation_level_ = - static_cast(positiveInteger("-A must" + static_cast(positiveInteger("-A must" " be a positive integer")); if (v6_relay_encapsulation_level_ != 1) { isc_throw(isc::InvalidParameter, "-A only supports 1 at the moment."); @@ -972,7 +972,7 @@ CommandOptions::printCommandLine() const { void CommandOptions::usage() const { std::cout << - "perfdhcp [-hv] [-4|-6] [-A] [-e]" + "perfdhcp [-hv] [-4|-6] [-A] [-e]" " [-r] [-f]\n" " [-F] [-t] [-R] [-b]\n" " [-n] [-p] [-d]\n" @@ -1086,7 +1086,7 @@ CommandOptions::usage() const { " the exchange rate (given by -r). Furthermore the sum of\n" " this value and the renew-rate (given by -f: Specifies that relayed traffic must be\n" + "-A: Specifies that relayed traffic must be\n" " generated. The argument specifies the level of encapsulation, i.e.\n" " how many relay agents are simulated. Currently the only supported\n" " value is 1, which means that the generated\n" diff --git a/src/bin/perfdhcp/perf_pkt6.h b/src/bin/perfdhcp/perf_pkt6.h index c16df58a1f..0eb45ddfd5 100644 --- a/src/bin/perfdhcp/perf_pkt6.h +++ b/src/bin/perfdhcp/perf_pkt6.h @@ -85,7 +85,7 @@ public: /// \brief Handles limited binary packet parsing for packets with /// custom offsets of options and transaction id /// - /// This methoid handles the parsing of packets that have custom offsets + /// This method handles the parsing of packets that have custom offsets /// of options or transaction ID. Use /// \ref isc::dhcp::Pkt4::addOption to specify which options to parse. /// Options should be of the \ref isc::perfdhcp::LocalizedOption diff --git a/src/bin/perfdhcp/test_control.h b/src/bin/perfdhcp/test_control.h index 342854ee42..4769a1163a 100644 --- a/src/bin/perfdhcp/test_control.h +++ b/src/bin/perfdhcp/test_control.h @@ -660,7 +660,7 @@ protected: /// being sent to the server. It collects first packets of each /// type and keeps them around until test finishes. Then they /// are printed to the user. If packet of specified type has - /// been already stored this function perfroms no operation. + /// been already stored this function performs no operation. /// This function does not perform sanity check if packet /// pointer is valid. Make sure it is before calling it. /// @@ -675,7 +675,7 @@ protected: /// being sent to the server. It collects first packets of each /// type and keeps them around until test finishes. Then they /// are printed to the user. If packet of specified type has - /// been already stored this function perfroms no operation. + /// been already stored this function performs no operation. /// This function does not perform sanity check if packet /// pointer is valid. Make sure it is before calling it. /// diff --git a/src/bin/perfdhcp/tests/command_options_helper.h b/src/bin/perfdhcp/tests/command_options_helper.h index d3e179c86d..88669385a1 100644 --- a/src/bin/perfdhcp/tests/command_options_helper.h +++ b/src/bin/perfdhcp/tests/command_options_helper.h @@ -97,7 +97,7 @@ private: /// \brief Split string to the array of C-strings. /// - /// \param text_to_split string to be splited. + /// \param text_to_split string to be split. /// \param [out] num number of substrings returned. /// \param std::bad_alloc if allocation of C-strings failed. /// \return array of C-strings created from split. @@ -108,7 +108,7 @@ private: // Iterators to be used for tokenization std::istream_iterator text_iterator(text_stream); std::istream_iterator text_end; - // Tokenize string (space is a separator) using begin and end iteratos + // Tokenize string (space is a separator) using begin and end iterators std::vector tokens(text_iterator, text_end); if (!tokens.empty()) { diff --git a/src/bin/perfdhcp/tests/perf_pkt4_unittest.cc b/src/bin/perfdhcp/tests/perf_pkt4_unittest.cc index bdd64933ca..d785a8b73d 100644 --- a/src/bin/perfdhcp/tests/perf_pkt4_unittest.cc +++ b/src/bin/perfdhcp/tests/perf_pkt4_unittest.cc @@ -344,7 +344,7 @@ TEST_F(PerfPkt4Test, PackTransactionId) { } TEST_F(PerfPkt4Test, UnpackTransactionId) { - // Initialize packet data, lebgth 268, zeros only. + // Initialize packet data, length 268, zeros only. std::vector in_data(268, 0); // Assume that transaction id is at offset 100. @@ -377,7 +377,7 @@ TEST_F(PerfPkt4Test, UnpackTransactionId) { } TEST_F(PerfPkt4Test, Writes) { - // Initialize intput buffer with 260 elements set to value 1. + // Initialize input buffer with 260 elements set to value 1. dhcp::OptionBuffer in_data(260, 1); // Initialize buffer to be used for write: 1,2,3,4,...,9 dhcp::OptionBuffer write_buf(10); diff --git a/src/bin/perfdhcp/tests/perf_pkt6_unittest.cc b/src/bin/perfdhcp/tests/perf_pkt6_unittest.cc index 54bddc3d9d..32e65a3dfb 100644 --- a/src/bin/perfdhcp/tests/perf_pkt6_unittest.cc +++ b/src/bin/perfdhcp/tests/perf_pkt6_unittest.cc @@ -217,7 +217,7 @@ TEST_F(PerfPkt6Test, InvalidOptions) { // Create packet. boost::scoped_ptr pkt2(capture()); - // Testing offset of the option (lower than pakcet size but + // Testing offset of the option (lower than packet size but // tail of the option out of bounds). LocalizedOptionPtr pkt2_serverid(new LocalizedOption(Option::V6, D6O_SERVERID, diff --git a/src/bin/perfdhcp/tests/rate_control_unittest.cc b/src/bin/perfdhcp/tests/rate_control_unittest.cc index 674659484b..1896d1e994 100644 --- a/src/bin/perfdhcp/tests/rate_control_unittest.cc +++ b/src/bin/perfdhcp/tests/rate_control_unittest.cc @@ -122,7 +122,7 @@ TEST(RateControl, isLateSent) { // depends on time. TEST(RateControl, getOutboundMessageCount) { // Test that the number of outbound messages is correctly defined by the - // rate. The agressivity is set high enough so that it will not restrict + // rate. The aggressivity is set high enough so that it will not restrict // the calculated count. NakedRateControl rc1(1000, 1000000); // Set the timestamp of the last sent message well to the past. The @@ -135,7 +135,7 @@ TEST(RateControl, getOutboundMessageCount) { // The number of messages to be sent must be roughly equal to the time // between the last sent message and the current time multiplied by the // rate. ("Roughly", as current time is advancing, so the actual interval - // when the calcuation is made may be different from the interval set.) The + // when the measurement is made may be different from the interval set.) The // margin in this test is reasonably generous, allowing for a timing error // of around 10ms. uint64_t count = 0; @@ -143,7 +143,7 @@ TEST(RateControl, getOutboundMessageCount) { EXPECT_TRUE((count >= 5240) && (count <= 5260)) << "count is " << count << ", expected range 5240-5260"; - // Check that the agressivity limits the count of messages. + // Check that the aggressivity limits the count of messages. NakedRateControl rc2(1000, 3500); rc2.last_sent_ = NakedRateControl::currentTime() - boost::posix_time::seconds(5) - diff --git a/src/bin/perfdhcp/tests/test_control_unittest.cc b/src/bin/perfdhcp/tests/test_control_unittest.cc index 0aa1d2b927..e78542a548 100644 --- a/src/bin/perfdhcp/tests/test_control_unittest.cc +++ b/src/bin/perfdhcp/tests/test_control_unittest.cc @@ -32,7 +32,7 @@ using namespace isc::perfdhcp; /// \brief Test Control class with protected members made public. /// -/// This class makes protected TestControl class'es member public +/// This class makes protected TestControl class's members public /// to allow unit testing. class NakedTestControl: public TestControl { public: diff --git a/src/bin/sockcreator/tests/sockcreator_tests.cc b/src/bin/sockcreator/tests/sockcreator_tests.cc index 576b6049f7..eef88d8f31 100644 --- a/src/bin/sockcreator/tests/sockcreator_tests.cc +++ b/src/bin/sockcreator/tests/sockcreator_tests.cc @@ -54,7 +54,7 @@ setAddressFamilyFields(sockaddr_in6* address) { address->sin6_addr = in6addr_loopback; } -// Socket has been opened, peform a check on it. The sole argument is the +// Socket has been opened, perform a check on it. The sole argument is the // socket descriptor. The TCP check is the same regardless of the address // family. The UDP check requires that the socket address be obtained so // is parameterised on the type of structure required to hold the address. @@ -94,7 +94,7 @@ udpCheck(const int socknum) { // code, so provide a convenient typedef. typedef void (*socket_check_t)(const int); -// Address-family-specific scoket checks. +// Address-family-specific socket checks. // // The first argument is used to select the overloaded check function. // The other argument is the socket descriptor number. @@ -306,7 +306,7 @@ getSockDummy(const int type, struct sockaddr* addr, const socklen_t, int send_FdDummy(const int destination, const int what) { // Make sure it is 1 byte so we know the length. We do not use more during - // the test anyway. And even with the LS bute, we can distinguish between + // the test anyway. And even with the LS byte, we can distinguish between // the different results. const char fd_data = what & 0xff; const bool status = write_data(destination, &fd_data, sizeof(fd_data)); diff --git a/src/hooks/dhcp/user_chk/pkt_send_co.cc b/src/hooks/dhcp/user_chk/pkt_send_co.cc index c36c83cf1f..499f3f1309 100644 --- a/src/hooks/dhcp/user_chk/pkt_send_co.cc +++ b/src/hooks/dhcp/user_chk/pkt_send_co.cc @@ -259,7 +259,7 @@ void add4Option(Pkt4Ptr& response, uint8_t opt_code, std::string& opt_value) { /// - DOCSIS3_V6_CONFIG_FILE from user property "bootfile" /// - DOCSIS3_V6_TFTP_SERVERS from user property "tftp_server" /// -/// @param response IPv5 reponse packet +/// @param response IPv5 response packet /// @param user User from whom properties are sourced void add6Options(Pkt6Ptr& response, const UserPtr& user) { if (!user) { diff --git a/src/hooks/dhcp/user_chk/tests/user_file_unittests.cc b/src/hooks/dhcp/user_chk/tests/user_file_unittests.cc index cdc25cb947..2ed343f832 100644 --- a/src/hooks/dhcp/user_chk/tests/user_file_unittests.cc +++ b/src/hooks/dhcp/user_chk/tests/user_file_unittests.cc @@ -41,11 +41,11 @@ TEST(UserFile, construction) { TEST(UserFile, openFile) { UserFilePtr user_file; - // Construct a user file that refers to a non existant file. + // Construct a user file that refers to a non existing file. ASSERT_NO_THROW(user_file.reset(new UserFile("NoSuchFile"))); EXPECT_FALSE(user_file->isOpen()); - // Verify a non-existant file fails to open + // Verify a non-existing file fails to open ASSERT_THROW(user_file->open(), UserFileError); EXPECT_FALSE(user_file->isOpen()); @@ -62,7 +62,7 @@ TEST(UserFile, openFile) { // Verify that we cannot open an already open file. ASSERT_THROW(user_file->open(), UserFileError); - // Verifyt we can close it. + // Verify we can close it. ASSERT_NO_THROW(user_file->close()); EXPECT_FALSE(user_file->isOpen()); @@ -75,7 +75,7 @@ TEST(UserFile, openFile) { /// @brief Tests makeUser with invalid user strings TEST(UserFile, makeUser) { const char* invalid_strs[]= { - // Missinge type element. + // Missing type element. "{ \"id\" : \"01AC00F03344\" }", // Invalid id type string value. "{ \"type\" : \"BOGUS\", \"id\" : \"01AC00F03344\"}", diff --git a/src/hooks/dhcp/user_chk/tests/user_registry_unittests.cc b/src/hooks/dhcp/user_chk/tests/user_registry_unittests.cc index 9eb83d0f39..5808501940 100644 --- a/src/hooks/dhcp/user_chk/tests/user_registry_unittests.cc +++ b/src/hooks/dhcp/user_chk/tests/user_registry_unittests.cc @@ -61,7 +61,7 @@ TEST(UserRegistry, userBasics) { EXPECT_TRUE(found_user); EXPECT_EQ(found_user->getUserId(), *id); - // Verify that searching for a non-existant user returns empty user pointer. + // Verify that searching for a non-existing user returns empty user pointer. UserIdPtr id2; ASSERT_NO_THROW(id2.reset(new UserId(UserId::HW_ADDRESS, "02020202"))); ASSERT_NO_THROW(found_user = reg->findUser(*id2)); diff --git a/src/hooks/dhcp/user_chk/tests/userid_unittests.cc b/src/hooks/dhcp/user_chk/tests/userid_unittests.cc index 45702da97c..b362119dbc 100644 --- a/src/hooks/dhcp/user_chk/tests/userid_unittests.cc +++ b/src/hooks/dhcp/user_chk/tests/userid_unittests.cc @@ -50,21 +50,21 @@ TEST(UserIdTest, hwAddress_type) { EXPECT_EQ(id->getType(), UserId::HW_ADDRESS); EXPECT_TRUE(bytes == id->getId()); - // Check relational oeprators when a == b. + // Check relational operators when a == b. UserIdPtr id2; ASSERT_NO_THROW(id2.reset(new UserId(UserId::HW_ADDRESS, id->toText()))); EXPECT_TRUE(*id == *id2); EXPECT_FALSE(*id != *id2); EXPECT_FALSE(*id < *id2); - // Check relational oeprators when a < b. + // Check relational operators when a < b. ASSERT_NO_THROW(id2.reset(new UserId(UserId::HW_ADDRESS, "01FF02AC030B0709"))); EXPECT_FALSE(*id == *id2); EXPECT_TRUE(*id != *id2); EXPECT_TRUE(*id < *id2); - // Check relational oeprators when a > b. + // Check relational operators when a > b. ASSERT_NO_THROW(id2.reset(new UserId(UserId::HW_ADDRESS, "01FF02AC030B0707"))); EXPECT_FALSE(*id == *id2); @@ -98,20 +98,20 @@ TEST(UserIdTest, duid_type) { EXPECT_EQ(id->getType(), UserId::DUID); EXPECT_TRUE(bytes == id->getId()); - // Check relational oeprators when a == b. + // Check relational operators when a == b. UserIdPtr id2; ASSERT_NO_THROW(id2.reset(new UserId(UserId::DUID, id->toText()))); EXPECT_TRUE(*id == *id2); EXPECT_FALSE(*id != *id2); EXPECT_FALSE(*id < *id2); - // Check relational oeprators when a < b. + // Check relational operators when a < b. ASSERT_NO_THROW(id2.reset(new UserId(UserId::DUID, "01FF02AC030B0709"))); EXPECT_FALSE(*id == *id2); EXPECT_TRUE(*id != *id2); EXPECT_TRUE(*id < *id2); - // Check relational oeprators when a > b. + // Check relational operators when a > b. ASSERT_NO_THROW(id2.reset(new UserId(UserId::DUID, "01FF02AC030B0707"))); EXPECT_FALSE(*id == *id2); EXPECT_TRUE(*id != *id2); diff --git a/src/hooks/dhcp/user_chk/user.cc b/src/hooks/dhcp/user_chk/user.cc index 776c8fedc9..d73cfaa62e 100644 --- a/src/hooks/dhcp/user_chk/user.cc +++ b/src/hooks/dhcp/user_chk/user.cc @@ -38,7 +38,7 @@ UserId::UserId(UserIdType id_type, const std::string & id_str) : // Input is expected to be 2-digits per bytes, no delimiters. std::vector addr_bytes; - // Strip out colon delimeters, decodeHex doesn't like them. + // Strip out colon delimiters, decodeHex doesn't like them. std::string clean_id_str = id_str; std::string::iterator end_pos = std::remove(clean_id_str.begin(), clean_id_str.end(), ':'); diff --git a/src/hooks/dhcp/user_chk/user_file.h b/src/hooks/dhcp/user_chk/user_file.h index 88b68cf8f8..8262c08672 100644 --- a/src/hooks/dhcp/user_chk/user_file.h +++ b/src/hooks/dhcp/user_chk/user_file.h @@ -43,7 +43,7 @@ public: /// /// Each entry must have a valid entry for "type" and a valid entry or "id". /// -/// If an entry contains duplicate option names, that option will be assigend +/// If an entry contains duplicate option names, that option will be assigned /// the last value found. This is typical JSON behavior. /// Currently, only string option values (i.e. enclosed in quotes) are /// supported. diff --git a/src/hooks/dhcp/user_chk/user_registry.cc b/src/hooks/dhcp/user_chk/user_registry.cc index f4acbf0231..dc4d68a89d 100644 --- a/src/hooks/dhcp/user_chk/user_registry.cc +++ b/src/hooks/dhcp/user_chk/user_registry.cc @@ -85,7 +85,7 @@ void UserRegistry::refresh() { addUser(user); } } catch (const std::exception& ex) { - // Source was compromsised so restore registry from backup. + // Source was compromised so restore registry from backup. users_ = backup; // Close the source. source_->close(); diff --git a/src/lib/asiodns/README b/src/lib/asiodns/README index e47b166638..5335e71fec 100644 --- a/src/lib/asiodns/README +++ b/src/lib/asiodns/README @@ -9,7 +9,7 @@ routines to be written in a straightfowrard step-step-step fashion rather than as a complex chain of separate handler functions. Coroutine objects (i.e., UDPServer, TCPServer and IOFetch) are objects -with reenterable operator() members. When an instance of one of these +with reentrant operator() members. When an instance of one of these classes is called as a function, it resumes at the position where it left off. Thus, a UDPServer can issue an asynchronous I/O call and specify itself as the handler object; when the call completes, the UDPServer @@ -89,7 +89,7 @@ fetch logic: | IOAsioSocket | - +-----+-----+ + +-----+-----+ | | UDPSocket TCPSocket @@ -122,7 +122,7 @@ protocol to use. The sequence is: if (! synchronous) { YIELD; } - YIELD asyncSend(query) // Send query + YIELD asyncSend(query) // Send query do { YIELD asyncReceive(response) // Read response } while (! complete(response)) diff --git a/src/lib/asiolink/asio_wrapper.h b/src/lib/asiolink/asio_wrapper.h index 402d9c755a..772bba4ebb 100644 --- a/src/lib/asiolink/asio_wrapper.h +++ b/src/lib/asiolink/asio_wrapper.h @@ -34,8 +34,8 @@ // causes two instances of error_code which should have been equal to // to not be equal. // -// The problem disappers if either error handling code is not built header -// only as this results in a single definiton of system_category() supplied +// The problem disappears if either error handling code is not built header +// only as this results in a single definition of system_category() supplied // by libboost_system; or the error handling code is not optimized. // // We're doing the test here, rather than in configure to guard against the diff --git a/src/lib/asiolink/io_address.h b/src/lib/asiolink/io_address.h index 6a08575173..a992bf135b 100644 --- a/src/lib/asiolink/io_address.h +++ b/src/lib/asiolink/io_address.h @@ -67,11 +67,11 @@ public: /// @brief Constructor for ip::address_v4 object. /// - /// This constructor is intented to be used when constructing + /// This constructor is intended to be used when constructing /// IPv4 address out of uint32_t type. Passed value must be in /// network byte order /// - /// @param v4address IPv4 address represnted by uint32_t + /// @param v4address IPv4 address represented by uint32_t IOAddress(uint32_t v4address); /// \brief Convert the address to a string. @@ -183,7 +183,7 @@ public: /// /// It is useful for comparing which address is bigger. /// Operations within one protocol family are obvious. - /// Comparisons between v4 and v6 will allways return v4 + /// Comparisons between v4 and v6 will always return v4 /// being smaller. This follows boost::boost::asio::ip implementation bool lessThan(const IOAddress& other) const { if (this->getFamily() == other.getFamily()) { diff --git a/src/lib/asiolink/tests/tcp_socket_unittest.cc b/src/lib/asiolink/tests/tcp_socket_unittest.cc index 15bb779ce5..cb9c161cc2 100644 --- a/src/lib/asiolink/tests/tcp_socket_unittest.cc +++ b/src/lib/asiolink/tests/tcp_socket_unittest.cc @@ -62,7 +62,7 @@ public: NONE = 4 ///< "Not set" state }; - /// \brief Minimim size of buffers + /// \brief Minimum size of buffers enum { MIN_SIZE = (64 * 1024 + 2) ///< 64kB + two bytes for a count }; @@ -149,7 +149,7 @@ public: return (ptr_->expected_); } - /// \brief Get offset intodData + /// \brief Get offset into data size_t& offset() { return (ptr_->offset_); } @@ -418,7 +418,7 @@ TEST(TCPSocket, sequenceTest) { // Run the callbacks. Several options are possible depending on how ASIO // is implemented and whether the message gets fragmented: // - // 1) The send handler may complete immediately, regardess of whether the + // 1) The send handler may complete immediately, regardless of whether the // data has been read by the client. (This is the most likely.) // 2) The send handler may only run after all the data has been read by // the client. (This could happen if the client's TCP buffers were too diff --git a/src/lib/cc/command_interpreter.h b/src/lib/cc/command_interpreter.h index c42f2fd49f..a6271fa229 100644 --- a/src/lib/cc/command_interpreter.h +++ b/src/lib/cc/command_interpreter.h @@ -73,7 +73,7 @@ isc::data::ConstElementPtr createAnswer(const int status_code, /// @brief Creates a standard config/command level answer message /// /// @param status_code The return code (0 for success) -/// @param status textual represenation of the status (used mostly for errors) +/// @param status textual representation of the status (used mostly for errors) /// @param arg The optional argument for the answer. This can be of /// any Element type. May be NULL. /// @return Standard command/config answer message diff --git a/src/lib/cc/data.cc b/src/lib/cc/data.cc index 65d9f6808f..62a72b5aae 100644 --- a/src/lib/cc/data.cc +++ b/src/lib/cc/data.cc @@ -1066,7 +1066,7 @@ void Element::preprocess(std::istream& in, std::stringstream& out) { line = ""; } - // getline() removes end line charaters. Unfortunately, we need + // getline() removes end line characters. Unfortunately, we need // it for getting the line numbers right (in case we report an // error. out << line; diff --git a/src/lib/cc/data.h b/src/lib/cc/data.h index 791a555344..f915abc89b 100644 --- a/src/lib/cc/data.h +++ b/src/lib/cc/data.h @@ -78,7 +78,7 @@ public: /// \endcode /// /// the position of the element "bar" is: line_ = 2; pos_ = 9, because - /// begining of the value "123" is at offset 9 from the beginning of + /// beginning of the value "123" is at offset 9 from the beginning of /// the second line, including whitespaces. /// /// Note that the @c Position structure is used as an argument to @c Element @@ -505,7 +505,7 @@ public: //@{ /// Creates an Element from the wire format in the given /// stringstream of the given length. - /// Since the wire format is JSON, thise is the same as + /// Since the wire format is JSON, this is the same as /// fromJSON, and could be removed. /// /// \param in The input stringstream. @@ -514,7 +514,7 @@ public: static ElementPtr fromWire(std::stringstream& in, int length); /// Creates an Element from the wire format in the given string - /// Since the wire format is JSON, thise is the same as + /// Since the wire format is JSON, this is the same as /// fromJSON, and could be removed. /// /// \param s The input string diff --git a/src/lib/cc/tests/data_file_unittests.cc b/src/lib/cc/tests/data_file_unittests.cc index eea89c5db2..7680a8d5a2 100644 --- a/src/lib/cc/tests/data_file_unittests.cc +++ b/src/lib/cc/tests/data_file_unittests.cc @@ -22,7 +22,7 @@ public: /// @brief writes specified text to a file /// - /// That is an auxilliary funtion used in fileRead() tests. + /// That is an auxilliary function used in fileRead() tests. /// /// @param content text to be written to disk void writeFile(const std::string& content) { diff --git a/src/lib/config/command_mgr.h b/src/lib/config/command_mgr.h index 976b2223b1..4e27fdc628 100644 --- a/src/lib/config/command_mgr.h +++ b/src/lib/config/command_mgr.h @@ -80,7 +80,7 @@ public: /// @return the only existing instance of the manager static CommandMgr& instance(); - /// @brief Opens control socket with paramters specified in socket_info + /// @brief Opens control socket with parameters specified in socket_info /// /// Currently supported types are: /// - unix (required parameters: socket-type: unix, socket-name:/unix/path) @@ -132,7 +132,7 @@ public: /// @brief Auxiliary method that removes all installed commands. /// - /// The only unwipeable method is list-commands, which is internally + /// The only unwipable method is list-commands, which is internally /// handled at all times. void deregisterAll(); diff --git a/src/lib/dhcp/docsis3_option_defs.h b/src/lib/dhcp/docsis3_option_defs.h index 7d068407b6..7aa84720fb 100644 --- a/src/lib/dhcp/docsis3_option_defs.h +++ b/src/lib/dhcp/docsis3_option_defs.h @@ -54,7 +54,7 @@ const OptionDefParams DOCSIS3_V6_DEFS[] = { { "device-id", DOCSIS3_V6_DEVICE_ID, OPT_BINARY_TYPE, false, NO_RECORD_DEF, "" }, { "time-offset", DOCSIS3_V6_TIME_OFFSET, OPT_INT32_TYPE, false, NO_RECORD_DEF, "" }, { "cmts-cm-mac", DOCSIS3_V6_CMTS_CM_MAC, OPT_BINARY_TYPE, false, NO_RECORD_DEF, "" } - // @todo add definitions for all remaning options. + // @todo add definitions for all remaining options. }; /// Number of option definitions defined. diff --git a/src/lib/dhcp/iface_mgr.cc b/src/lib/dhcp/iface_mgr.cc index 0632bac55f..897c037eca 100644 --- a/src/lib/dhcp/iface_mgr.cc +++ b/src/lib/dhcp/iface_mgr.cc @@ -68,7 +68,7 @@ Iface::closeSockets() { void Iface::closeSockets(const uint16_t family) { - // Check that the correect 'family' value has been specified. + // Check that the correct 'family' value has been specified. // The possible values are AF_INET or AF_INET6. Note that, in // the current code they are used to differentiate that the // socket is used to transmit IPv4 or IPv6 traffic. However, @@ -937,7 +937,7 @@ Pkt4Ptr IfaceMgr::receive4(uint32_t timeout_sec, uint32_t timeout_usec /* = 0 */ } else if (result < 0) { // In most cases we would like to know whether select() returned // an error because of a signal being received or for some other - // reasaon. This is because DHCP servers use signals to trigger + // reason. This is because DHCP servers use signals to trigger // certain actions, like reconfiguration or graceful shutdown. // By catching a dedicated exception the caller will know if the // error returned by the function is due to the reception of the @@ -1047,7 +1047,7 @@ Pkt6Ptr IfaceMgr::receive6(uint32_t timeout_sec, uint32_t timeout_usec /* = 0 */ } else if (result < 0) { // In most cases we would like to know whether select() returned // an error because of a signal being received or for some other - // reasaon. This is because DHCP servers use signals to trigger + // reason. This is because DHCP servers use signals to trigger // certain actions, like reconfiguration or graceful shutdown. // By catching a dedicated exception the caller will know if the // error returned by the function is due to the reception of the @@ -1161,7 +1161,7 @@ IfaceMgr::getSocket(isc::dhcp::Pkt4 const& pkt) { } const Iface::SocketCollection& socket_collection = iface->getSockets(); - // A candidate being an end of the iterator marks that it is a begining of + // A candidate being an end of the iterator marks that it is a beginning of // the socket search and that the candidate needs to be set to the first // socket found. Iface::SocketCollection::const_iterator candidate = socket_collection.end(); diff --git a/src/lib/dhcp/iface_mgr.h b/src/lib/dhcp/iface_mgr.h index 8aaf9c9248..4122ac1d3a 100644 --- a/src/lib/dhcp/iface_mgr.h +++ b/src/lib/dhcp/iface_mgr.h @@ -58,7 +58,7 @@ public: isc::Exception(file, line, what) { }; }; -/// @brief IfaceMgr exception thrown thrown when error occured during +/// @brief IfaceMgr exception thrown thrown when error occurred during /// reading data from socket. class SocketReadError : public Exception { public: @@ -66,7 +66,7 @@ public: isc::Exception(file, line, what) { }; }; -/// @brief IfaceMgr exception thrown thrown when error occured during +/// @brief IfaceMgr exception thrown thrown when error occurred during /// sedning data through socket. class SocketWriteError : public Exception { public: @@ -303,7 +303,7 @@ public: /// @brief Check if the interface has the specified address assigned. /// /// @param address Address to be checked. - /// @return true if address is assigned to the intefrace, false otherwise. + /// @return true if address is assigned to the interface, false otherwise. bool hasAddress(const isc::asiolink::IOAddress& address) const; /// @brief Adds an address to an interface. @@ -438,7 +438,7 @@ protected: /// Network interface name. std::string name_; - /// Interface index (a value that uniquely indentifies an interface). + /// Interface index (a value that uniquely identifies an interface). int ifindex_; /// List of assigned addresses. @@ -724,7 +724,7 @@ public: /// (in microseconds) /// /// @throw isc::BadValue if timeout_usec is greater than one million - /// @throw isc::dhcp::SocketReadError if error occured when receiving a + /// @throw isc::dhcp::SocketReadError if error occurred when receiving a /// packet. /// @throw isc::dhcp::SignalInterruptOnSelect when a call to select() is /// interrupted by a signal. @@ -746,7 +746,7 @@ public: /// (in microseconds) /// /// @throw isc::BadValue if timeout_usec is greater than one million - /// @throw isc::dhcp::SocketReadError if error occured when receiving a + /// @throw isc::dhcp::SocketReadError if error occurred when receiving a /// packet. /// @throw isc::dhcp::SignalInterruptOnSelect when a call to select() is /// interrupted by a signal. @@ -1010,7 +1010,7 @@ public: /// @throw PacketFilterChangeDenied if there are open IPv4 sockets. void setPacketFilter(const PktFilterPtr& packet_filter); - /// @brief Set packet filter object to handle sending and receving DHCPv6 + /// @brief Set packet filter object to handle sending and receiving DHCPv6 /// messages. /// /// Packet filter objects provide means for the @c IfaceMgr to open sockets @@ -1043,7 +1043,7 @@ public: /// implementation that supports this feature on a particular OS. /// If there isn't, the PktFilterInet object will be set. If the /// argument is set to 'false', PktFilterInet object instance will - /// be set as the Packet Filter regrdaless of the OS type. + /// be set as the Packet Filter regardless of the OS type. /// /// @param direct_response_desired specifies whether the Packet Filter /// object being set should support direct traffic to the host diff --git a/src/lib/dhcp/iface_mgr_error_handler.h b/src/lib/dhcp/iface_mgr_error_handler.h index 0956bf69ac..6408b543cc 100644 --- a/src/lib/dhcp/iface_mgr_error_handler.h +++ b/src/lib/dhcp/iface_mgr_error_handler.h @@ -23,7 +23,7 @@ /// cases it is expected that the exception is thrown instead. A possible /// solution would be to enclose this conditional behavior in a function. /// However, despite the hate for macros, the macro seems to be a bit -/// better solution in this case as it allows to convenietly pass an +/// better solution in this case as it allows to conveniently pass an /// error string in a stream (not as a string). /// /// @param ex_type Exception to be thrown if error_handler is NULL. diff --git a/src/lib/dhcp/libdhcp++.h b/src/lib/dhcp/libdhcp++.h index 38009d44b7..e80e9d3a0f 100644 --- a/src/lib/dhcp/libdhcp++.h +++ b/src/lib/dhcp/libdhcp++.h @@ -298,7 +298,7 @@ public: /// @brief Removes runtime option definitions. static void clearRuntimeOptionDefs(); - /// @brief Reverts uncommited changes to runtime option definitions. + /// @brief Reverts uncommitted changes to runtime option definitions. static void revertRuntimeOptionDefs(); /// @brief Commits runtime option definitions. @@ -368,7 +368,7 @@ private: /// Container for v6 vendor option definitions static VendorOptionDefContainers vendor6_defs_; - /// Container for additional option defnitions created in runtime. + /// Container for additional option definitions created in runtime. static util::StagedValue runtime_option_defs_; }; diff --git a/src/lib/dhcp/opaque_data_tuple.h b/src/lib/dhcp/opaque_data_tuple.h index f055fab716..c3fe07585f 100644 --- a/src/lib/dhcp/opaque_data_tuple.h +++ b/src/lib/dhcp/opaque_data_tuple.h @@ -114,7 +114,7 @@ public: /// @brief Assigns data to the tuple. /// /// This function replaces existing data in the tuple with the new data. - /// If the speficified buffer length is greater than the size of the buffer, + /// If the specified buffer length is greater than the size of the buffer, /// the behavior of this function is undefined. /// @param data Iterator pointing to the beginning of the buffer being /// assigned. The source buffer may be an STL object or an array of @@ -179,7 +179,7 @@ public: /// and writes it to the specified buffer. The new are appended to the /// buffer, so as data existing in the buffer is preserved. /// - /// The tuple is considered malformed if one of the follwing occurs: + /// The tuple is considered malformed if one of the following occurs: /// - the size of the data is 0 (tuple is empty), /// - the size of the data is greater than 255 and the size of the length /// field is 1 byte (see @c LengthFieldType). diff --git a/src/lib/dhcp/option4_client_fqdn.cc b/src/lib/dhcp/option4_client_fqdn.cc index 1984e8b7e3..5c277da855 100644 --- a/src/lib/dhcp/option4_client_fqdn.cc +++ b/src/lib/dhcp/option4_client_fqdn.cc @@ -52,9 +52,9 @@ public: /// @brief Constructor, from wire data. /// - /// @param first An iterator pointing to the begining of the option data + /// @param first An iterator pointing to the beginning of the option data /// in the wire format. - /// @param last An iterator poiting to the end of the option data in the + /// @param last An iterator pointing to the end of the option data in the /// wire format. Option4ClientFqdnImpl(OptionBufferConstIter first, OptionBufferConstIter last); @@ -92,9 +92,9 @@ public: /// @brief Parse the Option provided in the wire format. /// - /// @param first An iterator pointing to the begining of the option data + /// @param first An iterator pointing to the beginning of the option data /// in the wire format. - /// @param last An iterator poiting to the end of the option data in the + /// @param last An iterator pointing to the end of the option data in the /// wire format. void parseWireData(OptionBufferConstIter first, OptionBufferConstIter last); @@ -106,9 +106,9 @@ public: /// @brief Parse domain-name emcoded in the deprecated ASCII format. /// - /// @param first An iterator pointing to the begining of the option data + /// @param first An iterator pointing to the beginning of the option data /// where domain-name is stored. - /// @param last An iterator poiting to the end of the option data where + /// @param last An iterator pointing to the end of the option data where /// domain-name is stored. void parseASCIIDomainName(OptionBufferConstIter first, OptionBufferConstIter last); @@ -121,7 +121,7 @@ Option4ClientFqdnImpl(const uint8_t flags, const std::string& domain_name, // cppcheck 1.57 complains that const enum value is not passed // by reference. Note that, it accepts the non-const enum value - // to be passed by value. In both cases it is unneccessary to + // to be passed by value. In both cases it is unnecessary to // pass the enum by reference. // cppcheck-suppress passedByValue const Option4ClientFqdn::DomainNameType name_type) @@ -188,7 +188,7 @@ Option4ClientFqdnImpl:: setDomainName(const std::string& domain_name, // cppcheck 1.57 complains that const enum value is not passed // by reference. Note that, it accepts the non-const enum - // to be passed by value. In both cases it is unneccessary to + // to be passed by value. In both cases it is unnecessary to // pass the enum by reference. // cppcheck-suppress passedByValue const Option4ClientFqdn::DomainNameType name_type) { diff --git a/src/lib/dhcp/option6_client_fqdn.cc b/src/lib/dhcp/option6_client_fqdn.cc index e1c7c565c7..02922f9f3a 100644 --- a/src/lib/dhcp/option6_client_fqdn.cc +++ b/src/lib/dhcp/option6_client_fqdn.cc @@ -47,9 +47,9 @@ public: /// @brief Constructor, from wire data. /// - /// @param first An iterator pointing to the begining of the option data + /// @param first An iterator pointing to the beginning of the option data /// in the wire format. - /// @param last An iterator poiting to the end of the option data in the + /// @param last An iterator pointing to the end of the option data in the /// wire format. Option6ClientFqdnImpl(OptionBufferConstIter first, OptionBufferConstIter last); @@ -87,9 +87,9 @@ public: /// @brief Parse the Option provided in the wire format. /// - /// @param first An iterator pointing to the begining of the option data + /// @param first An iterator pointing to the beginning of the option data /// in the wire format. - /// @param last An iterator poiting to the end of the option data in the + /// @param last An iterator pointing to the end of the option data in the /// wire format. void parseWireData(OptionBufferConstIter first, OptionBufferConstIter last); diff --git a/src/lib/dhcp/option6_iaprefix.h b/src/lib/dhcp/option6_iaprefix.h index e3a9b57ef5..f38e77f44c 100644 --- a/src/lib/dhcp/option6_iaprefix.h +++ b/src/lib/dhcp/option6_iaprefix.h @@ -44,7 +44,7 @@ namespace dhcp { /// that the prefixes from the string are created locally (not received over the /// wire) and should be validated before the option is created. If we wanted /// to set non-significant bits to 0 when the prefix is created from the textual -/// format it would have some peformance implications, because the option would +/// format it would have some performance implications, because the option would /// need to be turned into wire format, appropriate bits set to 0 and then /// option would need to be created again from the wire format. We may consider /// doing it if we find a use case where it is required. diff --git a/src/lib/dhcp/option_custom.cc b/src/lib/dhcp/option_custom.cc index 643459f11a..69bca1ecec 100644 --- a/src/lib/dhcp/option_custom.cc +++ b/src/lib/dhcp/option_custom.cc @@ -523,7 +523,7 @@ void OptionCustom::writeFqdn(const std::string& fqdn, const uint32_t index) { checkIndex(index); - // Create a temporay buffer where the FQDN will be written. + // Create a temporary buffer where the FQDN will be written. OptionBuffer buf; // Try to write to the temporary buffer rather than to the // buffers_ member directly guarantees that we don't modify @@ -531,7 +531,7 @@ OptionCustom::writeFqdn(const std::string& fqdn, const uint32_t index) { // is valid. OptionDataTypeUtil::writeFqdn(fqdn, buf); // If we got to this point it means that the FQDN is valid. - // We can move the contents of the teporary buffer to the + // We can move the contents of the temporary buffer to the // target buffer. std::swap(buffers_[index], buf); } diff --git a/src/lib/dhcp/option_data_types.h b/src/lib/dhcp/option_data_types.h index 7532747374..e99dc13441 100644 --- a/src/lib/dhcp/option_data_types.h +++ b/src/lib/dhcp/option_data_types.h @@ -341,7 +341,7 @@ public: /// @brief Get data type buffer length. /// /// This function returns the size of a particular data type. - /// Values retured by this function correspond to the data type + /// Values returned by this function correspond to the data type /// sizes defined in OptionDataTypeTraits (IPV4_ADDRESS_TYPE and /// IPV6_ADDRESS_TYPE are exceptions here) so they rather indicate /// the fixed length of the data being written into the buffer, diff --git a/src/lib/dhcp/option_definition.cc b/src/lib/dhcp/option_definition.cc index aa2d949f2c..f657511ce4 100644 --- a/src/lib/dhcp/option_definition.cc +++ b/src/lib/dhcp/option_definition.cc @@ -438,7 +438,7 @@ OptionDefinition::haveOpaqueDataTuplesFormat() const { bool OptionDefinition::convertToBool(const std::string& value_str) const { - // Case insensitve check that the input is one of: "true" or "false". + // Case-insensitive check that the input is one of: "true" or "false". if (boost::iequals(value_str, "true")) { return (true); diff --git a/src/lib/dhcp/option_definition.h b/src/lib/dhcp/option_definition.h index b90f5d5a79..63d9834d18 100644 --- a/src/lib/dhcp/option_definition.h +++ b/src/lib/dhcp/option_definition.h @@ -102,7 +102,7 @@ class OptionIntArray; /// option type is used. In such cases the data field types within the record /// are specified using \ref OptionDefinition::addRecordField. /// -/// When the OptionDefinition object has been sucessfully created, it can be +/// When the OptionDefinition object has been successfully created, it can be /// queried to return the appropriate option factory function for the specified /// specified option format. There are a number of "standard" factory functions /// that cover well known (common) formats. If the particular format does not diff --git a/src/lib/dhcp/option_space_container.h b/src/lib/dhcp/option_space_container.h index 6b557ab58b..d07d2874ef 100644 --- a/src/lib/dhcp/option_space_container.h +++ b/src/lib/dhcp/option_space_container.h @@ -71,7 +71,7 @@ public: /// @return a list of option spaces. /// /// @todo This function is likely to be removed once - /// we create a structore of OptionSpaces defined + /// we create a structure of OptionSpaces defined /// through the configuration manager. std::list getOptionSpaceNames() const { std::list names; diff --git a/src/lib/dhcp/option_string.h b/src/lib/dhcp/option_string.h index dfc907f77a..0c73647e00 100644 --- a/src/lib/dhcp/option_string.h +++ b/src/lib/dhcp/option_string.h @@ -89,7 +89,7 @@ public: /// /// This function decodes option data from the provided buffer. Note that /// it does not decode the option code and length, so the iterators must - /// point to the begining and end of the option payload respectively. + /// point to the beginning and end of the option payload respectively. /// The size of the decoded payload must be at least 1 byte. /// /// @param begin the iterator pointing to the option payload. diff --git a/src/lib/dhcp/option_vendor_class.cc b/src/lib/dhcp/option_vendor_class.cc index e6ae79c754..ddfd6df8b6 100644 --- a/src/lib/dhcp/option_vendor_class.cc +++ b/src/lib/dhcp/option_vendor_class.cc @@ -167,7 +167,7 @@ OptionVendorClass::toText(int indent) const { // Apply indentation s << std::string(indent, ' '); - // Print type, length and first occurence of enterprise id. + // Print type, length and first occurrence of enterprise id. s << "type=" << getType() << ", len=" << len() - getHeaderLen() << ", " " enterprise id=0x" << std::hex << getVendorId() << std::dec; // Iterate over all tuples and print their size and contents. diff --git a/src/lib/dhcp/option_vendor_class.h b/src/lib/dhcp/option_vendor_class.h index 14a29a3030..1ba3872838 100644 --- a/src/lib/dhcp/option_vendor_class.h +++ b/src/lib/dhcp/option_vendor_class.h @@ -24,7 +24,7 @@ namespace dhcp { /// The format of DHCPv6 Vendor Class option (16) is described in section 22.16 /// of RFC3315 and the format of the DHCPv4 V-I Vendor Class option (124) is /// described in section 3 of RFC3925. Each of these options carries enterprise -/// id followed by the collection of tuples carring opaque data. A single tuple +/// id followed by the collection of tuples carrying opaque data. A single tuple /// consists of the field holding opaque data length and the actual data. /// In case of the DHCPv4 V-I Vendor Class each tuple is preceded by the /// 4-byte long enterprise id. Also, the field which carries the length of diff --git a/src/lib/dhcp/pkt6.cc b/src/lib/dhcp/pkt6.cc index bb6c9723ec..a1fde4619f 100644 --- a/src/lib/dhcp/pkt6.cc +++ b/src/lib/dhcp/pkt6.cc @@ -314,7 +314,7 @@ Pkt6::packUDP() { } - // DHCPv6 header: message-type (1 octect) + transaction id (3 octets) + // DHCPv6 header: message-type (1 octet) + transaction id (3 octets) buffer_out_.writeUint8(msg_type_); // store 3-octet transaction-id buffer_out_.writeUint8( (transid_ >> 16) & 0xff ); diff --git a/src/lib/dhcp/pkt_filter_bpf.cc b/src/lib/dhcp/pkt_filter_bpf.cc index 474b8684e1..992c3b209b 100644 --- a/src/lib/dhcp/pkt_filter_bpf.cc +++ b/src/lib/dhcp/pkt_filter_bpf.cc @@ -26,7 +26,7 @@ const unsigned int MAX_BPF_OPEN_ATTEMPTS = 100; /// received on local loopback interface. const unsigned int BPF_LOCAL_LOOPBACK_HEADER_LEN = 4; -/// The following structure defines a Berkely Packet Filter program to perform +/// The following structure defines a Berkeley Packet Filter program to perform /// packet filtering. The program operates on Ethernet packets. To help with /// interpretation of the program, for the types of Ethernet packets we are /// interested in, the header layout is: @@ -229,7 +229,7 @@ PktFilterBPF::openSocket(Iface& iface, // Open fallback socket first. If it fails, it will give us an indication // that there is another service (perhaps DHCP server) running. - // The function will throw an exception and effectivelly cease opening + // The function will throw an exception and effectively cease opening // the BPF device below. int fallback = openFallbackSocket(addr, port); @@ -310,7 +310,7 @@ PktFilterBPF::openSocket(Iface& iface, close(fallback); close(sock); isc_throw(SocketConfigError, "Unable to obtain the required" - " buffer legth for reads from BPF device"); + " buffer length for reads from BPF device"); } if (buf_len < sizeof(bpf_hdr)) { @@ -355,14 +355,14 @@ PktFilterBPF::openSocket(Iface& iface, } // Configure the BPF device to use the immediate mode. This ensures - // that the read function returns immediatelly, instead of waiting + // that the read function returns immediately, instead of waiting // for the kernel to fill up the buffer, which would likely cause // read hangs. int flag = 1; if (ioctl(sock, BIOCIMMEDIATE, &flag) < 0) { close(fallback); close(sock); - isc_throw(SocketConfigError, "Failed to set promiscious mode for" + isc_throw(SocketConfigError, "Failed to set promiscuous mode for" " BPF device"); } @@ -411,10 +411,10 @@ PktFilterBPF::receive(Iface& iface, const SocketInfo& socket_info) { datalen = read(socket_info.sockfd_, iface.getReadBuffer(), iface.getReadBufferSize()); // If negative value is returned by read(), it indicates that an - // error occured. If returned value is 0, no data was read from the + // error occurred. If returned value is 0, no data was read from the // socket. In both cases something has gone wrong, because we expect // that a chunk of data is there. We signal the lack of data by - // returing an empty packet. + // returning an empty packet. if (datalen <= 0) { return Pkt4Ptr(); } diff --git a/src/lib/dhcp/pkt_filter_bpf.h b/src/lib/dhcp/pkt_filter_bpf.h index 62948ac109..ae276c92d5 100644 --- a/src/lib/dhcp/pkt_filter_bpf.h +++ b/src/lib/dhcp/pkt_filter_bpf.h @@ -46,7 +46,7 @@ namespace dhcp { /// In nutshell, the BPF device is created by opening the file /dev/bpf%d /// where %d is a number. The BPF device is configured by issuing ioctl /// commands listed here: http://www.freebsd.org/cgi/man.cgi?bpf(4). -/// The specific configuration used by Kea DHCP server is decribed in +/// The specific configuration used by Kea DHCP server is described in /// documentation of @c PktFilterBPF::openSocket. /// /// Use of BPF requires Kea to encode and decode the datalink and network @@ -73,7 +73,7 @@ public: /// - set filter program to receive DHCP messages encapsulated in UDP /// packets /// - set immediate mode which causes the read function to return - /// immediatelly and do not wait for the whole read buffer to be filled + /// immediately and do not wait for the whole read buffer to be filled /// by the kernel (to avoid hangs) /// /// It also obtains the following configuration from the kernel: diff --git a/src/lib/dhcp/pkt_filter_inet.h b/src/lib/dhcp/pkt_filter_inet.h index 9075874da8..eb69de3c86 100644 --- a/src/lib/dhcp/pkt_filter_inet.h +++ b/src/lib/dhcp/pkt_filter_inet.h @@ -15,7 +15,7 @@ namespace dhcp { /// @brief Packet handling class using AF_INET socket family /// -/// This class provides methods to send and recive packet via socket using +/// This class provides methods to send and receive packet via socket using /// AF_INET family and SOCK_DGRAM type. class PktFilterInet : public PktFilter { public: @@ -28,7 +28,7 @@ public: /// @brief Check if packet can be sent to the host without address directly. /// /// This Packet Filter sends packets through AF_INET datagram sockets, so - /// it can't inject the HW address of the destionation host into the packet. + /// it can't inject the HW address of the destination host into the packet. /// Therefore this class does not support direct responses. /// /// @return false always. @@ -61,7 +61,7 @@ public: /// @return Received packet /// @throw isc::dhcp::SocketReadError if an error occurs during reception /// of the packet. - /// @throw An execption thrown by the isc::dhcp::Pkt4 object if DHCPv4 + /// @throw An exception thrown by the isc::dhcp::Pkt4 object if DHCPv4 /// message parsing fails. virtual Pkt4Ptr receive(Iface& iface, const SocketInfo& socket_info); @@ -72,7 +72,7 @@ public: /// @param pkt packet to be sent /// /// @return result of sending a packet. It is 0 if successful. - /// @throw isc::dhcp::SocketWriteError if an error occures during sending + /// @throw isc::dhcp::SocketWriteError if an error occurs during sending /// a DHCP message through the socket. virtual int send(const Iface& iface, uint16_t sockfd, const Pkt4Ptr& pkt); diff --git a/src/lib/dhcp/pkt_filter_inet6.h b/src/lib/dhcp/pkt_filter_inet6.h index 3c9dc79630..9e2ce63a6a 100644 --- a/src/lib/dhcp/pkt_filter_inet6.h +++ b/src/lib/dhcp/pkt_filter_inet6.h @@ -41,7 +41,7 @@ public: /// group. /// /// @return A structure describing a primary and fallback socket. - /// @throw isc::dhcp::SocketConfigError if error occured when opening + /// @throw isc::dhcp::SocketConfigError if error occurred when opening /// or configuring a socket. virtual SocketInfo openSocket(const Iface& iface, const isc::asiolink::IOAddress& addr, @@ -69,7 +69,7 @@ public: /// @brief Sends DHCPv6 message through a specified interface and socket. /// - /// Thie function sends a DHCPv6 message through a specified interface and + /// The function sends a DHCPv6 message through a specified interface and /// socket. In general, there may be multiple sockets open on a single /// interface as a single interface may have multiple IPv6 addresses. /// @@ -78,7 +78,7 @@ public: /// @param pkt A packet to be sent. /// /// @return A result of sending the message. It is 0 if successful. - /// @throw isc::dhcp::SocketWriteError if error occured when sending a + /// @throw isc::dhcp::SocketWriteError if error occurred when sending a /// packet. virtual int send(const Iface& iface, uint16_t sockfd, const Pkt6Ptr& pkt); diff --git a/src/lib/dhcp/pkt_filter_lpf.cc b/src/lib/dhcp/pkt_filter_lpf.cc index 73ec38f81d..3d8a5508e2 100644 --- a/src/lib/dhcp/pkt_filter_lpf.cc +++ b/src/lib/dhcp/pkt_filter_lpf.cc @@ -21,7 +21,7 @@ namespace { using namespace isc::dhcp; -/// The following structure defines a Berkely Packet Filter program to perform +/// The following structure defines a Berkeley Packet Filter program to perform /// packet filtering. The program operates on Ethernet packets. To help with /// interpretation of the program, for the types of Ethernet packets we are /// interested in, the header layout is: @@ -136,7 +136,7 @@ PktFilterLPF::openSocket(Iface& iface, // Open fallback socket first. If it fails, it will give us an indication // that there is another service (perhaps DHCP server) running. - // The function will throw an exception and effectivelly cease opening + // The function will throw an exception and effectively cease opening // raw socket below. int fallback = openFallbackSocket(addr, port); @@ -227,10 +227,10 @@ PktFilterLPF::receive(Iface& iface, const SocketInfo& socket_info) { // have to get the data from the raw socket too. int data_len = read(socket_info.sockfd_, raw_buf, sizeof(raw_buf)); // If negative value is returned by read(), it indicates that an - // error occured. If returned value is 0, no data was read from the + // error occurred. If returned value is 0, no data was read from the // socket. In both cases something has gone wrong, because we expect // that a chunk of data is there. We signal the lack of data by - // returing an empty packet. + // returning an empty packet. if (data_len <= 0) { return Pkt4Ptr(); } diff --git a/src/lib/dhcp/pkt_filter_lpf.h b/src/lib/dhcp/pkt_filter_lpf.h index f0c9c863e0..8f5fd8408a 100644 --- a/src/lib/dhcp/pkt_filter_lpf.h +++ b/src/lib/dhcp/pkt_filter_lpf.h @@ -16,7 +16,7 @@ namespace dhcp { /// @brief Packet handling class using Linux Packet Filtering /// -/// This class provides methods to send and recive DHCPv4 messages using raw +/// This class provides methods to send and receive DHCPv4 messages using raw /// sockets and Linux Packet Filtering. It is used by @c isc::dhcp::IfaceMgr /// to send DHCPv4 messages to the hosts which don't have an IPv4 address /// assigned yet. diff --git a/src/lib/dhcp/protocol_util.h b/src/lib/dhcp/protocol_util.h index c6fa7421fe..bd9cf26dc5 100644 --- a/src/lib/dhcp/protocol_util.h +++ b/src/lib/dhcp/protocol_util.h @@ -15,7 +15,7 @@ namespace isc { namespace dhcp { -/// @brief Exception thrown when error occured during parsing packet's headers. +/// @brief Exception thrown when error occurred during parsing packet's headers. /// /// This exception is thrown when parsing link, Internet or Transport layer /// header has failed. diff --git a/src/lib/dhcp/std_option_defs.h b/src/lib/dhcp/std_option_defs.h index cc0e2fc43a..457d00b61b 100644 --- a/src/lib/dhcp/std_option_defs.h +++ b/src/lib/dhcp/std_option_defs.h @@ -215,7 +215,7 @@ const OptionDefParams STANDARD_V4_OPTION_DEFINITIONS[] = { { "vivso-suboptions", DHO_VIVSO_SUBOPTIONS, OPT_UINT32_TYPE, false, NO_RECORD_DEF, "" } - // @todo add definitions for all remaning options. + // @todo add definitions for all remaining options. }; /// Number of option definitions defined. @@ -269,9 +269,9 @@ RECORD_DECL(CLIENT_NII_RECORDS, OPT_UINT8_TYPE, OPT_UINT8_TYPE, OPT_UINT8_TYPE); /// /// @warning in this array, the initializers are provided for all /// OptionDefParams struct's members despite initializers for -/// 'records' and 'record_size' could be ommited for entries for +/// 'records' and 'record_size' could be omitted for entries for /// which 'type' does not equal to OPT_RECORD_TYPE. If initializers -/// are ommitted the corresponding values should default to 0. +/// are omitted the corresponding values should default to 0. /// This however does not work on Solaris (GCC) which issues a /// warning about lack of initializers for some struct members /// causing build to fail. diff --git a/src/lib/dhcp/tests/duid_factory_unittest.cc b/src/lib/dhcp/tests/duid_factory_unittest.cc index 87fcf92501..0fa8c7e765 100644 --- a/src/lib/dhcp/tests/duid_factory_unittest.cc +++ b/src/lib/dhcp/tests/duid_factory_unittest.cc @@ -347,7 +347,7 @@ TEST_F(DUIDFactoryTest, createLLTExplicitHtype) { } // This test verifies that the factory class creates DUID-LLT from -// explcitly specified link layer address, when other parameters +// explicitly specified link layer address, when other parameters // are generated. TEST_F(DUIDFactoryTest, createLLTExplicitLinkLayerAddress) { ASSERT_NO_THROW(factory().createLLT(0, 0, toVector("121212121212"))); diff --git a/src/lib/dhcp/tests/iface_mgr_test_config.h b/src/lib/dhcp/tests/iface_mgr_test_config.h index 9963089dbd..26d3adfa1c 100644 --- a/src/lib/dhcp/tests/iface_mgr_test_config.h +++ b/src/lib/dhcp/tests/iface_mgr_test_config.h @@ -194,7 +194,7 @@ public: /// /// The test uses stub implementation of packet filter object. It is /// possible to configure that object to report having a capability - /// to directly repond to clients which don't have an address yet. + /// to directly respond to clients which don't have an address yet. /// This function sets this property for packet filter object. /// /// @param direct_resp Value to be set. diff --git a/src/lib/dhcp/tests/iface_mgr_unittest.cc b/src/lib/dhcp/tests/iface_mgr_unittest.cc index 5136a10ed3..afb4865cd1 100644 --- a/src/lib/dhcp/tests/iface_mgr_unittest.cc +++ b/src/lib/dhcp/tests/iface_mgr_unittest.cc @@ -119,7 +119,7 @@ TEST(IfaceTest, countActive4) { /// TestPktFilter::receive will never be called. The appropriate extension /// to IfaceMgr is planned along with implementation of other "Packet /// Filters" such as these supporting Linux Packet Filtering and -/// Berkley Packet Filtering. +/// Berkeley Packet Filtering. class TestPktFilter : public PktFilter { public: @@ -210,7 +210,7 @@ public: /// @brief Returns the collection of existing interfaces. IfaceCollection& getIfacesLst() { return (ifaces_); } - /// @brief This function creates fictitious interfaces with fictious + /// @brief This function creates fictitious interfaces with fictitious /// addresses. /// /// These interfaces can be used in tests that don't actually try @@ -390,7 +390,7 @@ public: #endif } - // Get ther number of IPv4 or IPv6 sockets on the loopback interface + // Get the number of IPv4 or IPv6 sockets on the loopback interface int getOpenSocketsCount(const Iface& iface, uint16_t family) const { // Get all sockets. Iface::SocketCollection sockets = iface.getSockets(); @@ -833,7 +833,7 @@ TEST_F(IfaceMgrTest, multipleSockets) { cout << "Local loopback interface not found. Skipping test. " << endl; return; } - // Once sockets have been sucessfully opened, they are supposed to + // Once sockets have been successfully opened, they are supposed to // be on the list. Here we start to test if all expected sockets // are on the list and no other (unexpected) socket is there. Iface::SocketCollection sockets = iface_ptr->getSockets(); @@ -874,7 +874,7 @@ TEST_F(IfaceMgrTest, multipleSockets) { sockets = iface_ptr->getSockets(); ASSERT_EQ(0, sockets.size()); - // We are still in posession of socket descriptors that we created + // We are still in possession of socket descriptors that we created // on the beginning of this test. We can use them to check whether // closeSockets() only removed them from the list or they have been // really closed. @@ -1209,7 +1209,7 @@ TEST_F(IfaceMgrTest, sendReceive4) { // skip checking source port of sent address. // Close the socket. Further we will test if errors are reported - // properly on attempt to use closed soscket. + // properly on attempt to use closed socket. close(socket1); // Warning: kernel bug on FreeBSD. The following code checks that attempt to @@ -1226,7 +1226,7 @@ TEST_F(IfaceMgrTest, sendReceive4) { // // @todo: This part of the test is currently disabled on all BSD systems as it was // the quick fix. We need a more elegant (config-based) solution to disable -// this check on affected systems only. The ticket has been submited for this +// this check on affected systems only. The ticket has been submitted for this // work: http://kea.isc.org/ticket/2971 #ifndef OS_BSD EXPECT_THROW(ifacemgr->receive4(10), SocketReadError); @@ -1399,11 +1399,11 @@ TEST_F(IfaceMgrTest, checkPacketFilterRawSocket) { // Note: This test will only run on non-Linux and non-BSD systems. // This test checks whether it is possible to use IfaceMgr to figure -// out which Pakcket Filter object should be used when direct responses +// out which Packet Filter object should be used when direct responses // to hosts, having no address assigned are desired or not desired. // Since direct responses aren't supported on systems other than Linux // and BSD the function under test should always set object of -// PktFilterInet type as current Packet Filter. This object does not +// PktFilterInet type as current Packet Filter. This object does not //support direct responses. Once implementation is added on systems // other than BSD and Linux the OS specific version of the test will // be removed. @@ -1599,7 +1599,7 @@ TEST_F(IfaceMgrTest, openSocket4ErrorHandler) { // open and bound to the same address and port. An attempt to open // another socket and bind to this address and port should fail. ASSERT_NO_THROW(ifacemgr.openSockets4(DHCP4_SERVER_PORT, true, error_handler)); - // We expect that an error occured when we tried to open a socket on + // We expect that an error occurred when we tried to open a socket on // eth0, but the socket on eth1 should open just fine. EXPECT_EQ(1, errors_count_); @@ -1712,7 +1712,7 @@ TEST_F(IfaceMgrTest, openSockets6NoLinkLocal) { // Check that the number of sockets is correct on each interface. checkSocketsCount6(*ifacemgr.getIface("lo"), 0); - // The thrid parameter specifies that the number of link-local + // The third parameter specifies that the number of link-local // addresses for eth0 is equal to 0. checkSocketsCount6(*ifacemgr.getIface("eth0"), 0, 0); checkSocketsCount6(*ifacemgr.getIface("eth1"), 0, 1); @@ -1731,7 +1731,7 @@ TEST_F(IfaceMgrTest, openSockets6NoLinkLocal) { } -// This test checks that socket is open on the non-muticast-capable +// This test checks that socket is open on the non-multicast-capable // interface. This socket simply doesn't join multicast group. TEST_F(IfaceMgrTest, openSockets6NotMulticast) { NakedIfaceMgr ifacemgr; @@ -2014,7 +2014,7 @@ TEST_F(IfaceMgrTest, openSocket6ErrorHandler) { // opened on eth0 and an attempt to open another socket and bind to // the same address and port should fail. ASSERT_NO_THROW(ifacemgr.openSockets6(DHCP6_SERVER_PORT, error_handler)); - // We expect that an error occured when we tried to open a socket on + // We expect that an error occurred when we tried to open a socket on // eth0, but the socket on eth1 should open just fine. EXPECT_EQ(1, errors_count_); @@ -2387,7 +2387,7 @@ TEST_F(IfaceMgrTest, detectIfaces) { NakedIfaceMgr ifacemgr; // We are using struct ifaddrs as it is the only good portable one - // ifreq and ioctls are far from portabe. For BSD ifreq::ifa_flags field + // ifreq and ioctls are far from portable. For BSD ifreq::ifa_flags field // is only a short which, nowadays, can be negative struct ifaddrs *iflist = 0, *ifptr = 0; ASSERT_EQ(0, getifaddrs(&iflist)) diff --git a/src/lib/dhcp/tests/libdhcp++_unittest.cc b/src/lib/dhcp/tests/libdhcp++_unittest.cc index 50fa4e3a82..dd71f0fee5 100644 --- a/src/lib/dhcp/tests/libdhcp++_unittest.cc +++ b/src/lib/dhcp/tests/libdhcp++_unittest.cc @@ -490,7 +490,7 @@ TEST_F(LibDhcpTest, unpackOptions6) { ASSERT_TRUE(opt_oro); // Get set of uint16_t values. std::vector opts = opt_oro->getValues(); - // Prepare the refrence data. + // Prepare the reference data. std::vector expected_opts; expected_opts.push_back(0x6C6D); // equivalent to: 108, 109 expected_opts.push_back(0x6E6F); // equivalent to 110, 111 @@ -718,7 +718,7 @@ TEST_F(LibDhcpTest, packOptions4) { // we want to use this buffer as a reference to verify that produced // option in on-wire format is correct. - // Create Ciruit ID sub-option and add to RAI. + // Create Circuit ID sub-option and add to RAI. OptionPtr circuit_id(new Option(Option::V4, RAI_OPTION_AGENT_CIRCUIT_ID, OptionBuffer(v4_opts + 46, v4_opts + 50))); @@ -736,7 +736,7 @@ TEST_F(LibDhcpTest, packOptions4) { isc::dhcp::OptionCollection opts; // list of options // Note that we insert each option under the same option code into - // the map. This gurantees that options are packed in the same order + // the map. This guarantees that options are packed in the same order // they were added. Otherwise, options would get sorted by code and // the resulting buffer wouldn't match with the reference buffer. opts.insert(make_pair(opt1->getType(), opt1)); diff --git a/src/lib/dhcp/tests/opaque_data_tuple_unittest.cc b/src/lib/dhcp/tests/opaque_data_tuple_unittest.cc index 474da98b51..f90ff0295e 100644 --- a/src/lib/dhcp/tests/opaque_data_tuple_unittest.cc +++ b/src/lib/dhcp/tests/opaque_data_tuple_unittest.cc @@ -386,7 +386,7 @@ TEST(OpaqueDataTuple, unpack1ByteZeroLength) { EXPECT_EQ(0, tuple.getLength()); } -// This test verfifies that exception is thrown if the empty buffer is being +// This test verifies that exception is thrown if the empty buffer is being // parsed. TEST(OpaqueDataTuple, unpack1ByteEmptyBuffer) { OpaqueDataTuple tuple(OpaqueDataTuple::LENGTH_1_BYTE); diff --git a/src/lib/dhcp/tests/option6_ia_unittest.cc b/src/lib/dhcp/tests/option6_ia_unittest.cc index e2a7cc9823..74ed6ab1a4 100644 --- a/src/lib/dhcp/tests/option6_ia_unittest.cc +++ b/src/lib/dhcp/tests/option6_ia_unittest.cc @@ -80,7 +80,7 @@ public: EXPECT_EQ(12, opt->len() - opt->getHeaderLen()); EXPECT_EQ(type, opt->getType()); - EXPECT_EQ(16, outBuf_.getLength()); // lenght(IA_NA) = 16 + EXPECT_EQ(16, outBuf_.getLength()); // length(IA_NA) = 16 // Check if pack worked properly: InputBuffer out(outBuf_.getData(), outBuf_.getLength()); diff --git a/src/lib/dhcp/tests/option_definition_unittest.cc b/src/lib/dhcp/tests/option_definition_unittest.cc index fbb67a9a3e..9125c8851b 100644 --- a/src/lib/dhcp/tests/option_definition_unittest.cc +++ b/src/lib/dhcp/tests/option_definition_unittest.cc @@ -137,7 +137,7 @@ TEST_F(OptionDefinitionTest, copyConstructor) { EXPECT_EQ("isc", opt_def_copy2.getEncapsulatedSpace()); } -// This test checks that two option definitions may be compared fot equality. +// This test checks that two option definitions may be compared for equality. TEST_F(OptionDefinitionTest, equality) { // Equal definitions. EXPECT_TRUE(OptionDefinition("option-foo", 5, "uint16", false) @@ -741,7 +741,7 @@ TEST_F(OptionDefinitionTest, recordIAAddr6) { // The purpose of this test is to verify that definition can be created // for option that comprises record of data. In this particular test -// the IAADDR option is used. The data for the option is speicifed as +// the IAADDR option is used. The data for the option is specified as // a vector of strings. Each string carries the data for the corresponding // data field. TEST_F(OptionDefinitionTest, recordIAAddr6Tokenized) { diff --git a/src/lib/dhcp/tests/option_int_unittest.cc b/src/lib/dhcp/tests/option_int_unittest.cc index b9ff8aa0f2..481050c8b0 100644 --- a/src/lib/dhcp/tests/option_int_unittest.cc +++ b/src/lib/dhcp/tests/option_int_unittest.cc @@ -131,7 +131,7 @@ public: // Data length is 2 bytes. EXPECT_EQ(2, opt->len() - opt->getHeaderLen()); EXPECT_EQ(TEST_OPT_CODE, opt->getType()); - // The total length is 2 bytes for data and 2 or 4 bytes for aheader. + // The total length is 2 bytes for data and 2 or 4 bytes for a header. if (u == Option::V4) { EXPECT_EQ(4, out_buf_.getLength()); } else { diff --git a/src/lib/dhcp/tests/option_space_unittest.cc b/src/lib/dhcp/tests/option_space_unittest.cc index d31254398b..0477bbcf88 100644 --- a/src/lib/dhcp/tests/option_space_unittest.cc +++ b/src/lib/dhcp/tests/option_space_unittest.cc @@ -60,7 +60,7 @@ TEST(OptionSpaceTest, validateName) { EXPECT_TRUE(OptionSpace::validateName("1234")); EXPECT_TRUE(OptionSpace::validateName("UPPER_CASE_allowed")); - // Negative test scenarions: empty strings, dots, spaces are not + // Negative test scenarios: empty strings, dots, spaces are not // allowed EXPECT_FALSE(OptionSpace::validateName("")); EXPECT_FALSE(OptionSpace::validateName(" ")); diff --git a/src/lib/dhcp/tests/option_unittest.cc b/src/lib/dhcp/tests/option_unittest.cc index c9fc49d762..b18d92ebfe 100644 --- a/src/lib/dhcp/tests/option_unittest.cc +++ b/src/lib/dhcp/tests/option_unittest.cc @@ -131,7 +131,7 @@ TEST_F(OptionTest, v4_data2) { data.push_back(67); // Data contains extra garbage at beginning and at the end. It should be - // ignored, as we pass interators to proper data. Only subset (limited by + // ignored, as we pass iterators to proper data. Only subset (limited by // iterators) of the vector should be used. // expData contains expected content (just valid data, without garbage). scoped_ptr