24template <
class PktPtrType>
40template <
class PktPtrType>
42 boost::shared_ptr<RadiusAuthPendingRequest<PktPtrType>>;
47template <
class PktPtrType>
68 get(
const std::vector<uint8_t>&
id)
const {
69 auto const& it = map_.find(
id);
70 if (it != map_.end()) {
83 void set(
const std::vector<uint8_t>&
id, PktPtrType query) {
91 void remove(
const std::vector<uint8_t>&
id) {
92 static_cast<void>(map_.erase(
id));
119 const std::vector<uint8_t>&
id,
126 const std::vector<uint8_t>
id_;
199 const std::vector<uint8_t>&
id,
200 const std::string& text);
210 const std::vector<uint8_t>&
id,
211 const std::string& text);
228 bool& both_global,
const std::string& cclass);
245 bool& both_global,
const std::string& cclass);
The IOAddress class represents an IP addresses (version agnostic)
Represents DHCPv4 packet.
Represents a DHCPv6 packet.
static void terminate6Internal(RadiusAuthEnv &env, int result, AttributesPtr recv_attrs, dhcp::Pkt6Ptr &query, bool &drop)
Termination callback body - IPv6.
static void terminate4Internal(RadiusAuthEnv &env, int result, AttributesPtr recv_attrs, dhcp::Pkt4Ptr &query, bool &drop)
Termination callback body - IPv4.
RadiusAuthPendingRequests< dhcp::Pkt6Ptr > requests6_
Pending RADIUS access requests - IPv6.
static void terminate4(RadiusAuthEnv env, int result, AttributesPtr recv_attrs)
Termination callback - IPv4.
RadiusAccess()
Constructor.
static bool reselectSubnet(const dhcp::Pkt4Ptr &query, uint32_t &subnet_id, bool &both_global, const std::string &cclass)
Subnet reselect - class/pool IPv4.
static void terminate6(RadiusAuthEnv env, int result, AttributesPtr recv_attrs)
Termination callback - IPv6.
virtual ~RadiusAccess()=default
Destructor.
bool getIdentifier(dhcp::Pkt4 &query, std::vector< uint8_t > &id, std::string &text)
Get Identifier – IPv4.
RadiusAuthPendingRequests< dhcp::Pkt4Ptr > requests4_
Pending RADIUS access requests - IPv4.
RadiusAuthHandlerPtr buildAuth(dhcp::Pkt4 &query, uint32_t subnet_id, const std::vector< uint8_t > &id, const std::string &text)
Build RadiusAuth handler for Access-Request - IPv4.
Class of Radius access environments.
RadiusAuthEnv(uint32_t subnet_id, const std::vector< uint8_t > &id, AttributesPtr send_attrs)
Constructor.
const std::vector< uint8_t > id_
Identifier.
uint32_t subnet_id_
Subnet Id (aka client/NAS port).
AttributesPtr send_attrs_
Attributes to send.
RadiusAuthHandler(RadiusAuthEnv env, const CallbackAuth &callback)
Constructor.
virtual ~RadiusAuthHandler()=default
Destructor.
RadiusAuthEnv env_
Environment.
void start()
Start communication.
RadiusAsyncAuthPtr auth_
Pointer to the communication class.
Class of pending Radius access request.
PktPtrType query_
The query which triggered the access request.
RadiusAuthPendingRequest(PktPtrType query)
Constructor.
Class of pending Radius access requests.
RadiusAuthPendingRequestPtr< PktPtrType > get(const std::vector< uint8_t > &id) const
Get a pending access request from the map.
void clear()
Clear the map.
void set(const std::vector< uint8_t > &id, PktPtrType query)
Set a pending access request into the map.
std::mutex mutex_
The mutex.
size_t size() const
Size of the map.
void remove(const std::vector< uint8_t > &id)
Remove a pending access request from the map.
RadiusService(const std::string &name)
Constructor.
boost::shared_ptr< Pkt4 > Pkt4Ptr
A pointer to Pkt4 object.
boost::shared_ptr< Pkt6 > Pkt6Ptr
A pointer to Pkt6 packet.
boost::shared_ptr< RadiusAuthPendingRequest< PktPtrType > > RadiusAuthPendingRequestPtr
Pointer to a pending Radius access request.
boost::shared_ptr< Attributes > AttributesPtr
Shared pointers to attribute collection.
boost::shared_ptr< RadiusAsyncAuth > RadiusAsyncAuthPtr
Pointer to asynchronous authentication.
std::function< void(int, AttributesPtr)> CallbackAuth
Type of callback for authentication termination.
boost::shared_ptr< RadiusAuthHandler > RadiusAuthHandlerPtr
Type of pointers to Radius access communication handler.
Defines the logger used by the top-level component of kea-lfc.