Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Kea
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
446
Issues
446
List
Boards
Labels
Service Desk
Milestones
Merge Requests
71
Merge Requests
71
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ISC Open Source Projects
Kea
Commits
d135a0e1
Commit
d135a0e1
authored
Nov 20, 2012
by
Stephen Morris
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[2404] Minor changes to make files conform to programming style
parent
b7bce1d6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
16 deletions
+16
-16
src/lib/dhcp/duid.cc
src/lib/dhcp/duid.cc
+12
-12
src/lib/dhcp/duid.h
src/lib/dhcp/duid.h
+4
-4
No files found.
src/lib/dhcp/duid.cc
View file @
d135a0e1
...
...
@@ -33,7 +33,7 @@ DUID::DUID(const std::vector<uint8_t>& duid) {
}
}
DUID
::
DUID
(
const
uint8_t
*
data
,
size_t
len
)
{
DUID
::
DUID
(
const
uint8_t
*
data
,
size_t
len
)
{
if
(
len
>
MAX_DUID_LEN
)
{
isc_throw
(
OutOfRange
,
"DUID too large"
);
}
...
...
@@ -72,36 +72,36 @@ std::string DUID::toText() const {
return
(
tmp
.
str
());
}
bool
DUID
::
operator
==
(
const
DUID
&
other
)
const
{
bool
DUID
::
operator
==
(
const
DUID
&
other
)
const
{
return
(
this
->
duid_
==
other
.
duid_
);
}
bool
DUID
::
operator
!=
(
const
DUID
&
other
)
const
{
bool
DUID
::
operator
!=
(
const
DUID
&
other
)
const
{
return
(
this
->
duid_
!=
other
.
duid_
);
}
//
/ c
onstructor based on vector<uint8_t>
//
C
onstructor based on vector<uint8_t>
ClientId
::
ClientId
(
const
std
::
vector
<
uint8_t
>&
clientid
)
:
DUID
(
clientid
)
{
:
DUID
(
clientid
)
{
}
//
/ c
onstructor based on C-style data
//
C
onstructor based on C-style data
ClientId
::
ClientId
(
const
uint8_t
*
clientid
,
size_t
len
)
:
DUID
(
clientid
,
len
)
{
:
DUID
(
clientid
,
len
)
{
}
//
/ @brief r
eturns a copy of client-id data
//
R
eturns a copy of client-id data
const
std
::
vector
<
uint8_t
>
ClientId
::
getClientId
()
const
{
return
(
duid_
);
}
//
c
ompares two client-ids
bool
ClientId
::
operator
==
(
const
ClientId
&
other
)
const
{
//
C
ompares two client-ids
bool
ClientId
::
operator
==
(
const
ClientId
&
other
)
const
{
return
(
this
->
duid_
==
other
.
duid_
);
}
//
c
ompares two client-ids
bool
ClientId
::
operator
!=
(
const
ClientId
&
other
)
const
{
//
C
ompares two client-ids
bool
ClientId
::
operator
!=
(
const
ClientId
&
other
)
const
{
return
(
this
->
duid_
!=
other
.
duid_
);
}
...
...
src/lib/dhcp/duid.h
View file @
d135a0e1
...
...
@@ -49,7 +49,7 @@ class DUID {
DUID
(
const
std
::
vector
<
uint8_t
>&
duid
);
/// @brief creates a DUID
DUID
(
const
uint8_t
*
duid
,
size_t
len
);
DUID
(
const
uint8_t
*
duid
,
size_t
len
);
/// @brief returns a const reference to the actual DUID value
///
...
...
@@ -90,17 +90,17 @@ class ClientId : DUID {
ClientId
(
const
std
::
vector
<
uint8_t
>&
clientid
);
/// constructor based on C-style data
ClientId
(
const
uint8_t
*
clientid
,
size_t
len
);
ClientId
(
const
uint8_t
*
clientid
,
size_t
len
);
/// @brief returns reference to the client-id data
///
const
std
::
vector
<
uint8_t
>
getClientId
()
const
;
// compares two client-ids
bool
operator
==
(
const
ClientId
&
other
)
const
;
bool
operator
==
(
const
ClientId
&
other
)
const
;
// compares two client-ids
bool
operator
!=
(
const
ClientId
&
other
)
const
;
bool
operator
!=
(
const
ClientId
&
other
)
const
;
};
};
// end of isc::dhcp namespace
...
...
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