Kea: mt_lease_query_mgr.h Source File

| Kea 3.0.0

mt_lease_query_mgr.h
Go to the documentation of this file.
1// Copyright (C) 2022-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 MT_LEASE_QUERY_LISTENER_MGR_H
8#define MT_LEASE_QUERY_LISTENER_MGR_H
9
10#include <asiolink/io_address.h>
11#include <asiolink/io_service.h>
12#include <asiolink/io_service_thread_pool.h>
13#include <tcp/mt_tcp_listener_mgr.h>
14#include <lease_query_listener.h>
15#include <thread>
16#include <vector>
17
18namespace isc {
19namespace lease_query {
20
31 class MtLeaseQueryListenerMgr : public tcp::MtTcpListenerMgr {
32public:
48 MtLeaseQueryListenerMgr(const asiolink::IOAddress& address,
49 const uint16_t port,
50 const uint16_t family,
51 const tcp::TcpListener::IdleTimeout& idle_timeout,
52 const uint16_t thread_pool_size = 1,
53 asiolink::TlsContextPtr context = asiolink::TlsContextPtr(),
54 tcp::TcpConnectionFilterCallback connection_filter = 0,
55 const size_t max_concurrent_queries = 0);
56
58 virtual ~MtLeaseQueryListenerMgr();
59
70 tcp::TcpListenerPtr listenerFactory(const asiolink::IOServicePtr& io_service,
71 const asiolink::IOAddress& server_address,
72 const unsigned short server_port,
73 const asiolink::TlsContextPtr& tls_context,
74 const tcp::TcpListener::IdleTimeout& idle_timeout,
75 const tcp::TcpConnectionFilterCallback& connection_filter);
76private:
78 uint16_t family_;
79
81 size_t max_concurrent_queries_;
82};
83
85 typedef boost::shared_ptr<MtLeaseQueryListenerMgr> MtLeaseQueryListenerMgrPtr;
86
87} // namespace isc::lease_query
88} // namespace isc
89
90#endif // MT_LEASE_QUERY_LISTENER_MGR_H
isc::asiolink::IOAddress
The IOAddress class represents an IP addresses (version agnostic)
Definition io_address.h:45
isc::lease_query::MtLeaseQueryListenerMgr::listenerFactory
tcp::TcpListenerPtr listenerFactory(const asiolink::IOServicePtr &io_service, const asiolink::IOAddress &server_address, const unsigned short server_port, const asiolink::TlsContextPtr &tls_context, const tcp::TcpListener::IdleTimeout &idle_timeout, const tcp::TcpConnectionFilterCallback &connection_filter)
Defines a factory function for creating listeners.
Definition mt_lease_query_mgr.cc:45
isc::lease_query::MtLeaseQueryListenerMgr::~MtLeaseQueryListenerMgr
virtual ~MtLeaseQueryListenerMgr()
Destructor.
Definition mt_lease_query_mgr.cc:63
isc::lease_query::MtLeaseQueryListenerMgr::MtLeaseQueryListenerMgr
MtLeaseQueryListenerMgr(const asiolink::IOAddress &address, const uint16_t port, const uint16_t family, const tcp::TcpListener::IdleTimeout &idle_timeout, const uint16_t thread_pool_size=1, asiolink::TlsContextPtr context=asiolink::TlsContextPtr(), tcp::TcpConnectionFilterCallback connection_filter=0, const size_t max_concurrent_queries=0)
Constructor.
Definition mt_lease_query_mgr.cc:26
isc::tcp::MtTcpListenerMgr
Manages a thread-pool that is used to drive a TcpListener.
Definition mt_tcp_listener_mgr.h:43
io_address.h
io_service.h
io_service_thread_pool.h
lease_query_listener.h
mt_tcp_listener_mgr.h
isc::asiolink::TlsContextPtr
boost::shared_ptr< TlsContext > TlsContextPtr
The type of shared pointers to TlsContext objects.
Definition common_tls.h:37
isc::asiolink::IOServicePtr
boost::shared_ptr< IOService > IOServicePtr
Defines a smart pointer to an IOService instance.
Definition io_service.h:28
isc::lease_query
Definition blq_msg.h:15
isc::lease_query::MtLeaseQueryListenerMgrPtr
boost::shared_ptr< MtLeaseQueryListenerMgr > MtLeaseQueryListenerMgrPtr
Defines a shared pointer to MtLeaseQueryListenerMgr.
Definition mt_lease_query_mgr.h:85
isc::tcp::TcpConnectionFilterCallback
std::function< bool(const boost::asio::ip::tcp::endpoint &)> TcpConnectionFilterCallback
Type of the callback for filtering new connections by ip address.
Definition tcp_connection.h:154
isc::tcp::TcpListenerPtr
boost::shared_ptr< TcpListener > TcpListenerPtr
Pointer to a TcpListener.
Definition tcp_listener.h:164
isc
Defines the logger used by the top-level component of kea-lfc.
Definition agent_parser.cc:148
isc::tcp::TcpListener::IdleTimeout
Idle connection timeout.
Definition tcp_listener.h:31