Kea 3.1.1
ping_check_config.h
Go to the documentation of this file.
1// Copyright (C) 2023-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#ifndef PING_CHECK_CONFIG_H
8#define PING_CHECK_CONFIG_H
9
10#include <cc/data.h>
11#include <cc/simple_parser.h>
12
13namespace isc {
14namespace ping_check {
15
19public:
22
25
27 ~PingCheckConfig() = default;
28
35
39 bool getEnablePingCheck() const {
40 return (enable_ping_check_);
41 };
42
46 void setEnablePingCheck(bool value) {
47 enable_ping_check_ = value;
48 }
49
53 uint32_t getMinPingRequests() const {
54 return (min_ping_requests_);
55 };
56
60 void setMinPingRequests(uint32_t value) {
61 min_ping_requests_ = value;
62 }
63
67 uint32_t getReplyTimeout() const {
68 return (reply_timeout_);
69 }
70
74 void setReplyTimeout(uint32_t value) {
75 reply_timeout_ = value;
76 }
77
81 uint32_t getPingClttSecs() const {
82 return (ping_cltt_secs_);
83 }
84
88 void setPingClttSecs(uint32_t value) {
89 ping_cltt_secs_ = value;
90 }
91
95 uint32_t getPingChannelThreads() const {
96 return (ping_channel_threads_);
97 }
98
102 void setPingChannelThreads(uint32_t value) {
103 ping_channel_threads_ = value;
104 }
105
106private:
107 // @brief True if checking is enabled.
108 bool enable_ping_check_;
109
112 uint32_t min_ping_requests_;
113
116 uint32_t reply_timeout_;
117
121 uint32_t ping_cltt_secs_;
122
125 size_t ping_channel_threads_;
126};
127
129typedef boost::shared_ptr<PingCheckConfig> PingCheckConfigPtr;
130
131} // end of namespace ping_check
132} // end of namespace isc
133
134#endif
void setMinPingRequests(uint32_t value)
Sets the value of min-ping-requests.
bool getEnablePingCheck() const
Fetches the value of enable-ping-check.
void parse(data::ConstElementPtr config)
Extracts member values from an Element::map.
uint32_t getPingClttSecs() const
Fetches the value of ping-cltt-secs.
static const data::SimpleKeywords CONFIG_KEYWORDS
List of valid parameters and expected types.
void setEnablePingCheck(bool value)
Sets the value of enable-ping-check.
uint32_t getMinPingRequests() const
Fetches the value of min-ping-requests.
uint32_t getReplyTimeout() const
Fetches the value of reply-timeout.
void setPingChannelThreads(uint32_t value)
Sets the value of ping-channel-threads.
void setReplyTimeout(uint32_t value)
Sets the value of reply-timeout.
uint32_t getPingChannelThreads() const
Fetches the value of ping-channel-threads.
void setPingClttSecs(uint32_t value)
Sets the value of ping-cltt-secs.
~PingCheckConfig()=default
Destructor.
boost::shared_ptr< const Element > ConstElementPtr
Definition data.h:29
std::map< std::string, isc::data::Element::types > SimpleKeywords
This specifies all accepted keywords with their types.
boost::shared_ptr< PingCheckConfig > PingCheckConfigPtr
Defines a shared pointer to a PingCheckConfig.
Defines the logger used by the top-level component of kea-lfc.