Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
ee7dbbde
Commit
ee7dbbde
authored
Nov 28, 2012
by
Stephen Morris
Browse files
[2312] Fix some typos and missing Doxygen keywords
parent
863da09e
Changes
7
Hide whitespace changes
Inline
Side-by-side
src/lib/dhcp/option6_int.h
View file @
ee7dbbde
...
...
@@ -89,7 +89,7 @@ public:
// Depending on the data type length we use different utility functions
// writeUint16 or writeUint32 which write the data in the network byte
// order to the provided buffer. The same functions can be safely used
// for either unsiged or signed integers so there is not need to create
// for either unsig
n
ed or signed integers so there is not need to create
// special cases for intX_t types.
switch
(
OptionDataTypeTraits
<
T
>::
len
)
{
case
1
:
...
...
@@ -128,7 +128,7 @@ public:
// Depending on the data type length we use different utility functions
// readUint16 or readUint32 which read the data laid in the network byte
// order from the provided buffer. The same functions can be safely used
// for either unsiged or signed integers so there is not need to create
// for either unsig
n
ed or signed integers so there is not need to create
// special cases for intX_t types.
int
data_size_len
=
OptionDataTypeTraits
<
T
>::
len
;
switch
(
data_size_len
)
{
...
...
src/lib/dhcp/option6_int_array.h
View file @
ee7dbbde
...
...
@@ -118,7 +118,7 @@ public:
// Depending on the data type length we use different utility functions
// writeUint16 or writeUint32 which write the data in the network byte
// order to the provided buffer. The same functions can be safely used
// for either unsiged or signed integers so there is not need to create
// for either unsig
n
ed or signed integers so there is not need to create
// special cases for intX_t types.
switch
(
OptionDataTypeTraits
<
T
>::
len
)
{
case
1
:
...
...
@@ -164,7 +164,7 @@ public:
// Depending on the data type length we use different utility functions
// readUint16 or readUint32 which read the data laid in the network byte
// order from the provided buffer. The same functions can be safely used
// for either unsiged or signed integers so there is not need to create
// for either unsig
n
ed or signed integers so there is not need to create
// special cases for intX_t types.
int
data_size_len
=
OptionDataTypeTraits
<
T
>::
len
;
switch
(
data_size_len
)
{
...
...
src/lib/dhcp/option_custom.h
View file @
ee7dbbde
...
...
@@ -42,7 +42,6 @@ public:
///
/// @param def option definition.
/// @param u specifies universe (V4 or V6).
/// @param def option definition.
/// @param data content of the option.
///
/// @throw OutOfRange if option buffer is truncated.
...
...
@@ -112,7 +111,6 @@ public:
// Get the option definition type.
OptionDataType
data_type
=
definition_
.
getType
();
//
if
(
data_type
==
OPT_RECORD_TYPE
)
{
const
OptionDefinition
::
RecordFieldsCollection
&
record_fields
=
definition_
.
getRecordFields
();
...
...
@@ -154,15 +152,15 @@ public:
virtual
void
unpack
(
OptionBufferConstIter
begin
,
OptionBufferConstIter
end
);
/// Returns string representation of the option.
///
@brief
Returns string representation of the option.
///
/// @param indent number of spaces before printed text.
///
/// @return string with text representation.
virtual
std
::
string
toText
(
int
indent
=
0
);
/// Returns length of the complete option (data length +
DHCPv4/DHCPv6
/// option header)
///
@brief
Returns length of the complete option (data length +
///
DHCPv4/DHCPv6
option header)
///
/// @return length of the option
virtual
uint16_t
len
();
...
...
@@ -192,6 +190,8 @@ private:
/// @brief Check if data field index is valid.
///
/// @param index Data field index to check.
///
/// @throw isc::OutOfRange if index is out of range.
void
checkIndex
(
const
uint32_t
index
)
const
;
...
...
src/lib/dhcp/option_data_types.cc
View file @
ee7dbbde
...
...
@@ -160,7 +160,7 @@ void
OptionDataTypeUtil
::
writeBinary
(
const
std
::
string
&
hex_str
,
std
::
vector
<
uint8_t
>&
buf
)
{
// Binary value means that the value is encoded as a string
// of hexadecimal d
e
igits. We need to decode this string
// of hexadecimal digits. We need to decode this string
// to the binary format here.
OptionBuffer
binary
;
try
{
...
...
@@ -186,7 +186,7 @@ OptionDataTypeUtil::readBool(const std::vector<uint8_t>& buf) {
return
(
false
);
}
isc_throw
(
BadDataTypeCast
,
"unable to read the buffer as boolean"
<<
" value. In
a
vlid value "
<<
static_cast
<
int
>
(
buf
[
0
]));
<<
" value. Inv
a
lid value "
<<
static_cast
<
int
>
(
buf
[
0
]));
}
void
...
...
src/lib/dhcp/option_data_types.h
View file @
ee7dbbde
...
...
@@ -192,12 +192,12 @@ public:
/// @brief Get data type buffer length.
///
/// This function
m
returs the size of a particular data type.
/// This function retur
n
s the size of a particular data type.
/// Values retured 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,
/// not the sizeof the particular data type. Thus for data types
/// not the size
of the particular data type. Thus for data types
/// such as string, binary etc. for which the buffer length can't
/// be determined this function returns 0.
/// In addition, this function returns the data sizes for
...
...
@@ -280,7 +280,7 @@ public:
return
(
value
);
}
/// @brief Write integer or unsiged integer value into a buffer.
/// @brief Write integer or unsig
n
ed integer value into a buffer.
///
/// @param value an integer value to be written into a buffer.
/// @param [out] buf output buffer.
...
...
@@ -318,7 +318,7 @@ public:
static
void
readString
(
const
std
::
vector
<
uint8_t
>&
buf
,
std
::
string
&
value
);
/// @brief Write
utf
8-encoded string into a buffer.
/// @brief Write
UTF
8-encoded string into a buffer.
///
/// @param value string value to be written into a buffer.
/// @param [out] buf output buffer.
...
...
src/lib/dhcp/option_definition.cc
View file @
ee7dbbde
...
...
@@ -223,7 +223,7 @@ OptionDefinition::validate() const {
err_str
<<
"binary data field can't be laid before data fields"
<<
" of other types."
;
}
/// Empty typ
y
is not allowed within a record.
/// Empty typ
e
is not allowed within a record.
if
(
*
it
==
OPT_EMPTY_TYPE
)
{
err_str
<<
"empty data type can't be stored as a field in an"
<<
" option record."
;
...
...
src/lib/dhcp/tests/option_custom_unittest.cc
View file @
ee7dbbde
...
...
@@ -50,7 +50,7 @@ public:
}
}
/// @brief Write integer (signed or unsiged) into a buffer.
/// @brief Write integer (signed or unsig
n
ed) into a buffer.
///
/// @param value integer value.
/// @param [out] buf output buffer.
...
...
@@ -159,8 +159,8 @@ TEST_F(OptionCustomTest, binaryData) {
EXPECT_TRUE
(
std
::
equal
(
buf_in
.
begin
(),
buf_in
.
end
(),
buf_out
.
begin
()));
}
// The purpose of this test is to verify that
the
option definition comprising
// single boolean value can be used to create an instance of custom option.
// The purpose of this test is to verify that
an
option definition comprising
//
a
single boolean value can be used to create an instance of custom option.
TEST_F
(
OptionCustomTest
,
booleanData
)
{
OptionDefinition
opt_def
(
"OPTION_FOO"
,
1000
,
"boolean"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment