Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
ISC Open Source Projects
Kea
Commits
0a648a9e
Commit
0a648a9e
authored
Jun 17, 2019
by
Marcin Siodelski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[
#642
,
!373
] Explained how globals are fetched for various selectors.
parent
45036444
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
122 additions
and
0 deletions
+122
-0
src/hooks/dhcp/mysql_cb/mysql_cb_dhcp4.h
src/hooks/dhcp/mysql_cb/mysql_cb_dhcp4.h
+31
-0
src/hooks/dhcp/mysql_cb/mysql_cb_dhcp6.h
src/hooks/dhcp/mysql_cb/mysql_cb_dhcp6.h
+31
-0
src/lib/dhcpsrv/config_backend_dhcp4.h
src/lib/dhcpsrv/config_backend_dhcp4.h
+30
-0
src/lib/dhcpsrv/config_backend_dhcp6.h
src/lib/dhcpsrv/config_backend_dhcp6.h
+30
-0
No files found.
src/hooks/dhcp/mysql_cb/mysql_cb_dhcp4.h
View file @
0a648a9e
...
@@ -162,6 +162,10 @@ public:
...
@@ -162,6 +162,10 @@ public:
/// @brief Retrieves global parameter value.
/// @brief Retrieves global parameter value.
///
///
/// Typically, the server selector used for this query should be set to
/// ONE. It is possible to use the MULTIPLE server selector but in that
/// case only the first found parameter is returned.
///
/// @param server_selector Server selector.
/// @param server_selector Server selector.
/// @param name Name of the global parameter to be retrieved.
/// @param name Name of the global parameter to be retrieved.
/// @return Value of the global parameter.
/// @return Value of the global parameter.
...
@@ -172,6 +176,33 @@ public:
...
@@ -172,6 +176,33 @@ public:
/// @brief Retrieves all global parameters.
/// @brief Retrieves all global parameters.
///
///
/// Using the server selector it is possible to fetch the parameters for
/// one or more servers. The following list describes what parameters are
/// returned depending on the server selector specified:
/// - ALL: only common parameters are returned which are associated with
/// the logical server 'all'. No parameters associated with the explicit
/// server tags are returned.
///
/// - ONE: parameters used by the particular sever are returned. This includes
/// parameters associated with the particular server (identified by tag)
/// and parameters associated with the logical server 'all' when server
/// specific parameters are not given. For example, if there is a
/// renew-timer specified for 'server1' tag, different value of the
/// renew-timer specified for 'all' servers and a rebind-timer specified
/// for 'all' servers, the caller will receive renew-timer value associated
/// with the server1 and the rebind-timer value associated with all servers,
/// because there is no explicit rebind-timer specified for server1.
///
/// - MULTIPLE: parameters used by multiple servers, but those associated
/// with specific server tags take precedence over the values specified for
/// 'all' servers. This is similar to the case of ONE server described
/// above. The effect of querying for parameters belonging to multiple
/// servers is the same as issuing multiple queries with ONE server
/// being selected multiple times.
///
/// - UNASSIGNED: parameters not associated with any servers.
///
///
/// @param server_selector Server selector.
/// @param server_selector Server selector.
virtual
data
::
StampedValueCollection
virtual
data
::
StampedValueCollection
getAllGlobalParameters4
(
const
db
::
ServerSelector
&
server_selector
)
const
;
getAllGlobalParameters4
(
const
db
::
ServerSelector
&
server_selector
)
const
;
...
...
src/hooks/dhcp/mysql_cb/mysql_cb_dhcp6.h
View file @
0a648a9e
...
@@ -162,6 +162,10 @@ public:
...
@@ -162,6 +162,10 @@ public:
/// @brief Retrieves global parameter value.
/// @brief Retrieves global parameter value.
///
///
/// Typically, the server selector used for this query should be set to
/// ONE. It is possible to use the MULTIPLE server selector but in that
/// case only the first found parameter is returned.
///
/// @param server_selector Server selector.
/// @param server_selector Server selector.
/// @param name Name of the global parameter to be retrieved.
/// @param name Name of the global parameter to be retrieved.
/// @return Value of the global parameter.
/// @return Value of the global parameter.
...
@@ -172,6 +176,33 @@ public:
...
@@ -172,6 +176,33 @@ public:
/// @brief Retrieves all global parameters.
/// @brief Retrieves all global parameters.
///
///
/// Using the server selector it is possible to fetch the parameters for
/// one or more servers. The following list describes what parameters are
/// returned depending on the server selector specified:
/// - ALL: only common parameters are returned which are associated with
/// the logical server 'all'. No parameters associated with the explicit
/// server tags are returned.
///
/// - ONE: parameters used by the particular sever are returned. This includes
/// parameters associated with the particular server (identified by tag)
/// and parameters associated with the logical server 'all' when server
/// specific parameters are not given. For example, if there is a
/// renew-timer specified for 'server1' tag, different value of the
/// renew-timer specified for 'all' servers and a rebind-timer specified
/// for 'all' servers, the caller will receive renew-timer value associated
/// with the server1 and the rebind-timer value associated with all servers,
/// because there is no explicit rebind-timer specified for server1.
///
/// - MULTIPLE: parameters used by multiple servers, but those associated
/// with specific server tags take precedence over the values specified for
/// 'all' servers. This is similar to the case of ONE server described
/// above. The effect of querying for parameters belonging to multiple
/// servers is the same as issuing multiple queries with ONE server
/// being selected multiple times.
///
/// - UNASSIGNED: parameters not associated with any servers.
///
///
/// @param server_selector Server selector.
/// @param server_selector Server selector.
virtual
data
::
StampedValueCollection
virtual
data
::
StampedValueCollection
getAllGlobalParameters6
(
const
db
::
ServerSelector
&
server_selector
)
const
;
getAllGlobalParameters6
(
const
db
::
ServerSelector
&
server_selector
)
const
;
...
...
src/lib/dhcpsrv/config_backend_dhcp4.h
View file @
0a648a9e
...
@@ -165,6 +165,10 @@ public:
...
@@ -165,6 +165,10 @@ public:
/// @brief Retrieves global parameter value.
/// @brief Retrieves global parameter value.
///
///
/// Typically, the server selector used for this query should be set to
/// ONE. It is possible to use the MULTIPLE server selector but in that
/// case only the first found parameter is returned.
///
/// @param selector Server selector.
/// @param selector Server selector.
/// @param name Name of the global parameter to be retrieved.
/// @param name Name of the global parameter to be retrieved.
/// @return Value of the global parameter or null if parameter doesn't
/// @return Value of the global parameter or null if parameter doesn't
...
@@ -175,6 +179,32 @@ public:
...
@@ -175,6 +179,32 @@ public:
/// @brief Retrieves all global parameters.
/// @brief Retrieves all global parameters.
///
///
/// Using the server selector it is possible to fetch the parameters for
/// one or more servers. The following list describes what parameters are
/// returned depending on the server selector specified:
/// - ALL: only common parameters are returned which are associated with
/// the logical server 'all'. No parameters associated with the explicit
/// server tags are returned.
///
/// - ONE: parameters used by the particular sever are returned. This includes
/// parameters associated with the particular server (identified by tag)
/// and parameters associated with the logical server 'all' when server
/// specific parameters are not given. For example, if there is a
/// renew-timer specified for 'server1' tag, different value of the
/// renew-timer specified for 'all' servers and a rebind-timer specified
/// for 'all' servers, the caller will receive renew-timer value associated
/// with the server1 and the rebind-timer value associated with all servers,
/// because there is no explicit rebind-timer specified for server1.
///
/// - MULTIPLE: parameters used by multiple servers, but those associated
/// with specific server tags take precedence over the values specified for
/// 'all' servers. This is similar to the case of ONE server described
/// above. The effect of querying for parameters belonging to multiple
/// servers is the same as issuing multiple queries with ONE server
/// being selected multiple times.
///
/// - UNASSIGNED: parameters not associated with any servers.
///
/// @param selector Server selector.
/// @param selector Server selector.
/// @return Collection of global parameters.
/// @return Collection of global parameters.
virtual
data
::
StampedValueCollection
virtual
data
::
StampedValueCollection
...
...
src/lib/dhcpsrv/config_backend_dhcp6.h
View file @
0a648a9e
...
@@ -166,6 +166,10 @@ public:
...
@@ -166,6 +166,10 @@ public:
/// @brief Retrieves global parameter value.
/// @brief Retrieves global parameter value.
///
///
/// Typically, the server selector used for this query should be set to
/// ONE. It is possible to use the MULTIPLE server selector but in that
/// case only the first found parameter is returned.
///
/// @param selector Server selector.
/// @param selector Server selector.
/// @param name Name of the global parameter to be retrieved.
/// @param name Name of the global parameter to be retrieved.
/// @return Value of the global parameter or null if parameter doesn't
/// @return Value of the global parameter or null if parameter doesn't
...
@@ -176,6 +180,32 @@ public:
...
@@ -176,6 +180,32 @@ public:
/// @brief Retrieves all global parameters.
/// @brief Retrieves all global parameters.
///
///
/// Using the server selector it is possible to fetch the parameters for
/// one or more servers. The following list describes what parameters are
/// returned depending on the server selector specified:
/// - ALL: only common parameters are returned which are associated with
/// the logical server 'all'. No parameters associated with the explicit
/// server tags are returned.
///
/// - ONE: parameters used by the particular sever are returned. This includes
/// parameters associated with the particular server (identified by tag)
/// and parameters associated with the logical server 'all' when server
/// specific parameters are not given. For example, if there is a
/// renew-timer specified for 'server1' tag, different value of the
/// renew-timer specified for 'all' servers and a rebind-timer specified
/// for 'all' servers, the caller will receive renew-timer value associated
/// with the server1 and the rebind-timer value associated with all servers,
/// because there is no explicit rebind-timer specified for server1.
///
/// - MULTIPLE: parameters used by multiple servers, but those associated
/// with specific server tags take precedence over the values specified for
/// 'all' servers. This is similar to the case of ONE server described
/// above. The effect of querying for parameters belonging to multiple
/// servers is the same as issuing multiple queries with ONE server
/// being selected multiple times.
///
/// - UNASSIGNED: parameters not associated with any servers.
///
/// @param selector Server selector.
/// @param selector Server selector.
/// @return Collection of global parameters.
/// @return Collection of global parameters.
virtual
data
::
StampedValueCollection
virtual
data
::
StampedValueCollection
...
...
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