Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Adam Osuchowski
Kea
Commits
196f0896
Commit
196f0896
authored
Aug 21, 2014
by
Marcin Siodelski
Browse files
[3477] Addressed review comments.
parent
5763fe88
Changes
8
Hide whitespace changes
Inline
Side-by-side
src/bin/d2/d2_cfg_mgr.cc
View file @
196f0896
...
...
@@ -197,7 +197,7 @@ D2CfgMgr::getD2Params() {
}
std
::
string
D2CfgMgr
::
getConfigSummary
(
const
uint
16
_t
)
{
D2CfgMgr
::
getConfigSummary
(
const
uint
32
_t
)
{
return
(
getD2Params
()
->
getConfigSummary
());
}
...
...
src/bin/d2/d2_cfg_mgr.h
View file @
196f0896
...
...
@@ -244,7 +244,7 @@ public:
/// to be returned. This parameter is ignored for the D2.
///
/// @return Summary of the configuration in the textual format.
virtual
std
::
string
getConfigSummary
(
const
uint
16
_t
selection
);
virtual
std
::
string
getConfigSummary
(
const
uint
32
_t
selection
);
protected:
/// @brief Performs the parsing of the given "params" element.
...
...
src/bin/d2/d2_config.cc
View file @
196f0896
...
...
@@ -92,7 +92,8 @@ D2Params::validateContents() {
std
::
string
D2Params
::
getConfigSummary
()
const
{
std
::
ostringstream
s
;
s
<<
"listening on "
<<
getIpAddress
()
<<
", port "
<<
getPort
();
s
<<
"listening on "
<<
getIpAddress
()
<<
", port "
<<
getPort
()
<<
", using "
<<
ncrProtocolToString
(
ncr_protocol_
);
return
(
s
.
str
());
}
...
...
src/bin/d2/d_cfg_mgr.h
View file @
196f0896
...
...
@@ -318,7 +318,7 @@ public:
/// to be returned.
///
/// @return Summary of the configuration in the textual format.
virtual
std
::
string
getConfigSummary
(
const
uint
16
_t
selection
)
=
0
;
virtual
std
::
string
getConfigSummary
(
const
uint
32
_t
selection
)
=
0
;
protected:
/// @brief Parses a set of scalar configuration elements into global
...
...
src/bin/d2/tests/d_cfg_mgr_unittests.cc
View file @
196f0896
...
...
@@ -59,7 +59,7 @@ public:
}
/// @brief Returns summary of configuration in the textual format.
virtual
std
::
string
getConfigSummary
(
const
uint
16
_t
)
{
virtual
std
::
string
getConfigSummary
(
const
uint
32
_t
)
{
return
(
""
);
}
};
...
...
src/bin/d2/tests/d_test_stubs.h
View file @
196f0896
...
...
@@ -183,7 +183,7 @@ public:
/// @brief Returns configuration summary in the textual format.
///
/// @return Always an empty string.
virtual
std
::
string
getConfigSummary
(
const
uint
16
_t
)
{
virtual
std
::
string
getConfigSummary
(
const
uint
32
_t
)
{
return
(
""
);
}
...
...
@@ -711,7 +711,7 @@ public:
/// @brief Returns a summary of the configuration in the textual format.
///
/// @return Always an empty string.
virtual
std
::
string
getConfigSummary
(
const
uint
16
_t
)
{
virtual
std
::
string
getConfigSummary
(
const
uint
32
_t
)
{
return
(
""
);
}
...
...
src/lib/dhcpsrv/configuration.h
View file @
196f0896
...
...
@@ -87,17 +87,26 @@ struct Configuration {
/// @name Constants for selection of parameters returned by @c getConfigSummary
///
//@{
static
const
uint16_t
CFGSEL_NONE
=
0x0000
;
///< Nothing selected
static
const
uint16_t
CFGSEL_SUBNET4
=
0x0001
;
///< Number of IPv4 subnets
static
const
uint16_t
CFGSEL_SUBNET6
=
0x0002
;
///< Number of IPv6 subnets
static
const
uint16_t
CFGSEL_IFACE4
=
0x0004
;
///< Number of enabled ifaces
static
const
uint16_t
CFGSEL_IFACE6
=
0x0008
;
///< Number of v6 ifaces
static
const
uint16_t
CFGSEL_DDNS
=
0x0010
;
///< DDNS enabled/disabled
static
const
uint16_t
CFGSEL_SUBNET
=
0x0003
;
///< Number of all subnets
static
const
uint16_t
CFGSEL_ALL4
=
0x0015
;
///< IPv4 related config
static
const
uint16_t
CFGSEL_ALL6
=
0x001A
;
///< IPv6 related config
static
const
uint16_t
CFGSEL_ALL
=
0xFFFF
;
///< Whole config
/// Nothing selected
static
const
uint32_t
CFGSEL_NONE
=
0x00000000
;
/// Number of IPv4 subnets
static
const
uint32_t
CFGSEL_SUBNET4
=
0x00000001
;
/// Number of IPv6 subnets
static
const
uint32_t
CFGSEL_SUBNET6
=
0x00000002
;
/// Number of enabled ifaces
static
const
uint32_t
CFGSEL_IFACE4
=
0x00000004
;
/// Number of v6 ifaces
static
const
uint32_t
CFGSEL_IFACE6
=
0x00000008
;
/// DDNS enabled/disabled
static
const
uint32_t
CFGSEL_DDNS
=
0x00000010
;
/// Number of all subnets
static
const
uint32_t
CFGSEL_SUBNET
=
0x00000003
;
/// IPv4 related config
static
const
uint32_t
CFGSEL_ALL4
=
0x00000015
;
/// IPv6 related config
static
const
uint32_t
CFGSEL_ALL6
=
0x0000001A
;
/// Whole config
static
const
uint32_t
CFGSEL_ALL
=
0xFFFFFFFF
;
//@}
/// @brief logging specific information
...
...
src/lib/dhcpsrv/tests/configuration_unittest.cc
View file @
196f0896
...
...
@@ -149,6 +149,7 @@ ConfigurationTest::clearSubnets() {
void
ConfigurationTest
::
enableDDNS
(
const
bool
enable
)
{
// D2 configuration should always be non-NULL.
CfgMgr
::
instance
().
getD2ClientConfig
()
->
enableUpdates
(
enable
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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