Kea
3.1.1
subnets_user_context.h
Go to the documentation of this file.
1
// Copyright (C) 2017-2025 Internet Systems Consortium, Inc. ("ISC")
2
//
3
// This Source Code Form is subject to the terms of the Mozilla Public
4
// License, v. 2.0. If a copy of the MPL was not distributed with this
5
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7
#include <config.h>
8
#include <
cc/data.h
>
9
10
namespace
isc
{
11
namespace
legal_log
{
12
17
template
<
typename
SubnetPtrType>
18
bool
isLoggingDisabled
(
const
SubnetPtrType& subnet) {
19
if
(subnet) {
20
data::ConstElementPtr
context = subnet->getContext();
21
// Context must be a map if specified.
22
if
(context && (context->getType() ==
data::Element::map
)) {
23
data::ConstElementPtr
do_legal_logging = context->get(
"legal-logging"
);
24
// "legal-logging" parameter must be a boolean, if specified.
25
if
(do_legal_logging && (do_legal_logging->getType() ==
data::Element::boolean
)) {
26
return
(!do_legal_logging->boolValue());
27
}
28
}
29
}
30
// legal-logging parameter not specified, so default to false.
31
return
(
false
);
32
}
33
34
}
// end of namespace isc::dhcp
35
}
// end of namespace isc
isc::data::Element::map
@ map
Definition
data.h:147
isc::data::Element::boolean
@ boolean
Definition
data.h:142
data.h
isc::data::ConstElementPtr
boost::shared_ptr< const Element > ConstElementPtr
Definition
data.h:29
isc::legal_log
Definition
legal_log_log.cc:13
isc::legal_log::isLoggingDisabled
bool isLoggingDisabled(const SubnetPtrType &subnet)
Checks if legal logging is disabled for a subnet.
Definition
subnets_user_context.h:18
isc
Defines the logger used by the top-level component of kea-lfc.
Definition
agent_parser.cc:148
src
hooks
dhcp
forensic_log
subnets_user_context.h
Generated on Fri Aug 29 2025 13:13:10 for Kea by
1.13.2