22#include <boost/noncopyable.hpp>
23#include <boost/shared_ptr.hpp>
30#include <unordered_set>
48 unsigned thread_pool_size = 0);
106 unsigned thread_pool_size_;
115 std::list<ExchangePtr> exchange_list_;
126static const uint32_t SUBNET_ID_DEFAULT = 0;
226 return (io_context_);
233 io_context_ = io_service;
240 return (io_service_);
247 io_service_ = io_service;
281 boost::shared_ptr<RadiusTls>
tls_;
284 boost::shared_ptr<RadiusAccess>
auth_;
287 boost::shared_ptr<RadiusAccounting>
acct_;
382 static std::unordered_set<std::thread::id> set_;
385 static std::mutex mutex_;
IdentifierType
Type of the host identifier.
static bool check()
Check if the current thread is in hook code or not.
Radius hooks library implementation.
static std::atomic< bool > shutdown_
Flag which indicates that the instance is shutting down.
unsigned thread_pool_size_
Thread pool size.
void checkSharedNetworks()
Check shared network server configuration.
std::string dictionary_
Dictionary path.
bool checkHostBackends()
Check host backends (cache and radius).
RadiusImpl()
Protected constructor.
boost::shared_ptr< RadiusTls > tls_
Pointer to tls (never null).
dhcp::CacheHostDataSourcePtr cache_
Host cache.
std::string bindaddr_
bindaddr.
bool clientid_pop0_
Client Id pop leading zero(s).
isc::asiolink::IOServicePtr getIOContext()
Get the hook I/O service.
void setAccountingIdleTimer()
Set the accounting idle timer.
const Servers & getAccessServers() const
Get servers for access.
dhcp::Host::IdentifierType id_type4_
Identifier type for IPv4.
void reset()
Reset the state as it was just created.
void unregisterExchange(ExchangePtr exchange)
Unregister Exchange.
bool reselect_subnet_address_
Reselect subnet using address.
void init(data::ElementPtr &config)
Initialize.
void registerExchange(ExchangePtr exchange)
Register Exchange.
boost::shared_ptr< RadiusAccess > auth_
Pointer to access (never null).
bool extract_duid_
Extract Duid from Client Id.
void startServices()
Start the I/O mechanisms.
unsigned timeout_
Timeout.
dhcp::Host::IdentifierType id_type6_
Identifier type for IPv6.
bool canonical_mac_address_
Canonical MAC address.
unsigned deadtime_
Deadtime.
bool serveAccounting() const
Check if accounting is served.
RadiusBackendPtr backend_
Radius backend.
boost::shared_ptr< RadiusAccounting > acct_
Pointer to accounting (never null).
void cleanup()
Clean up members.
data::ElementPtr toElement() const override
Unparse implementation configuration.
unsigned retries_
Retries.
std::map< uint32_t, uint32_t > remap_
Subnet ID to NAS port map.
UdpClientPtr udp_client_
UDP client.
static const RadiusImplPtr & instancePtr()
Returns pointer to the sole instance of radius implementation.
const Servers & getAccountingServers() const
Get servers for accounting.
std::string session_history_filename_
Session history filename.
void setIOContext(isc::asiolink::IOServicePtr io_service)
Set the hook I/O service.
void setAccessIdleTimer()
Set the access idle timer.
bool reselect_subnet_pool_
Reselect subnet using pool.
isc::tcp::TcpClientPtr tcp_client_
TCP client.
void checkEarlyGlobalResvLookup()
Check the early global host reservations lookup flag.
bool clientid_printable_
Client Id try printable.
void setIOService(isc::asiolink::IOServicePtr io_service)
Set the hook I/O service.
RadiusProtocol proto_
Transport protocol.
isc::asiolink::IOServicePtr getIOService()
Get the hook I/O service.
static RadiusImpl & instance()
RadiusImpl is a singleton class.
bool serveAccess() const
Check if access is served.
bool use_message_authenticator_
Use Message-Authenticator attribute.
Radius service for TLS transport.
void registerExchange(ExchangePtr exchange)
Register Exchange.
void unregisterExchange(ExchangePtr exchange)
Unregister Exchange.
const asiolink::IOServicePtr getThreadIOService() const
Fetches a pointer to the internal IOService used to drive the thread-pool in multi-threaded mode.
void checkPermissions()
Check if the current thread can perform thread pool state transition.
void resume()
Resumes running the client's thread pool.
void stop()
Halts client-side IO activity.
UdpClient(const asiolink::IOServicePtr &io_service, unsigned thread_pool_size=0)
Constructor.
void pause()
Pauses the client's thread pool.
void start()
Starts running the client's thread pool, if multi-threaded.
unsigned getThreadPoolSize() const
Fetches the maximum size of the thread pool.
boost::shared_ptr< IoServiceThreadPool > IoServiceThreadPoolPtr
Defines a pointer to a thread pool.
boost::shared_ptr< IOService > IOServicePtr
Defines a smart pointer to an IOService instance.
boost::shared_ptr< Element > ElementPtr
boost::shared_ptr< CacheHostDataSource > CacheHostDataSourcePtr
CacheHostDataSource pointer.
boost::shared_ptr< RadiusImpl > RadiusImplPtr
boost::shared_ptr< UdpClient > UdpClientPtr
Pointer to UDP client.
RadiusProtocol
Transport protocols.
std::vector< ServerPtr > Servers
Type of RADIUS server collection.
boost::shared_ptr< Exchange > ExchangePtr
Type of shared pointers to RADIUS exchange object.
boost::shared_ptr< RadiusBackend > RadiusBackendPtr
Pointer to host backend.
boost::shared_ptr< TcpClient > TcpClientPtr
Defines a pointer to an TcpClient instance.
Defines the logger used by the top-level component of kea-lfc.
Abstract class for configuration Cfg_* classes.