21#include <boost/noncopyable.hpp>
22#include <boost/shared_ptr.hpp>
29#include <unordered_set>
37static const uint32_t SUBNET_ID_DEFAULT = 0;
108 return (io_context_);
115 io_context_ = io_service;
122 return (io_service_);
129 io_service_ = io_service;
154 boost::shared_ptr<RadiusAccess>
auth_;
157 boost::shared_ptr<RadiusAccounting>
acct_;
252 std::list<ExchangePtr> exchange_list_;
276 static std::unordered_set<std::thread::id> set_;
279 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 resumeThreadPool()
Resume the thread pool.
void checkSharedNetworks()
Check shared network server configuration.
std::string dictionary_
Dictionary path.
bool checkHostBackends()
Check host backends (cache and radius).
RadiusImpl()
Protected constructor.
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.
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.
void pauseThreadPool()
Pause the thread pool.
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_
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.
RadiusBackendPtr backend_
Radius backend.
boost::shared_ptr< RadiusAccounting > acct_
Pointer to accounting (never null).
void cleanup()
Clean up members.
asiolink::IoServiceThreadPoolPtr thread_pool_
Thread pool.
data::ElementPtr toElement() const override
Unparse implementation configuration.
unsigned retries_
Retries.
std::map< uint32_t, uint32_t > remap_
Subnet ID to NAS port map.
static const RadiusImplPtr & instancePtr()
Returns pointer to the sole instance of radius implementation.
std::string session_history_filename_
Session history filename.
void setIOContext(isc::asiolink::IOServicePtr io_service)
Set the hook I/O service.
bool reselect_subnet_pool_
Reselect subnet using pool.
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.
isc::asiolink::IOServicePtr getIOService()
Get the hook I/O service.
static RadiusImpl & instance()
RadiusImpl is a singleton class.
void checkPausePermissions()
Check if the current thread can transition the thread pool to the paused state.
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< Exchange > ExchangePtr
Type of shared pointers to RADIUS exchange object.
boost::shared_ptr< RadiusBackend > RadiusBackendPtr
Pointer to host backend.
Defines the logger used by the top-level component of kea-lfc.
Abstract class for configuration Cfg_* classes.