</section>
<section id="dhcp4-option-data-defaults">
- <title>Unspecified parameters for option configuration</title>
+ <title>Unspecified parameters for DHCPv4 option configuration</title>
<para>In many cases it is not required to specify all parameters for
an option configuration and the default values may be used. However, it is
important to understand the implications of not specifing some of them
</section>
<section id="dhcp6-option-data-defaults">
- <title>Unspecified parameters for option configuration</title>
+ <title>Unspecified parameters for DHCPv6 option configuration</title>
<para>In many cases it is not required to specify all parameters for
an option configuration and the default values can be used. However, it is
important to understand the implications of not specifing some of them
-// Copyright (C) 2011-2013 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2011-2014 Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
/// @param u universe (v4 or V6)
/// @param name Option name.
///
- /// @return Pointer the option definition or NULL pointer it option
+ /// @return Pointer to the option definition or NULL pointer if option
/// definition has not been found.
static OptionDefinitionPtr getOptionDef(const Option::Universe u,
const std::string& name);
code = uint32_values_->getParam("code");
} catch (const exception& ex) {
- return (OptionalValue<uint32_t>(code));
+ // The code parameter was not found. Return an unspecified
+ // value.
+ return (OptionalValue<uint32_t>());
}
if (code == 0) {
name = string_values_->getParam("name");
} catch (...) {
- return (OptionalValue<std::string>(name));
+ return (OptionalValue<std::string>());
}
if (name.find(" ") != std::string::npos) {
data = string_values_->getParam("data");
} catch (...) {
+ // The "data" parameter was not found. Return an empty value.
return (data);
}
/// @brief Retrieves parsed option name as an optional value.
///
/// @param parent A data element holding full option data configuration.
- /// It is used here to log a position if the element holding a code
+ /// It is used here to log a position if the element holding a name
/// is not specified and its position is therefore unavailable.
///
/// @return Option name, possibly unspecified.