7#ifndef RADIUS_REQUEST_H
8#define RADIUS_REQUEST_H
81 return (request->getAttributes());
92 return (response->getAttributes());
154 virtual void start()
override;
181 virtual void start()
override;
235 virtual void start()
override;
262 virtual void start()
override;
std::function< void(const ExchangePtr ex)> Handler
Termination handler.
RadiusAcct(uint32_t subnet_id, const AttributesPtr &send_attrs, bool sync, const Exchange::Handler &handler)
Constructor.
virtual ~RadiusAcct()=default
Destructor.
static void invokeCallback(const CallbackAcct &callback, const ExchangePtr exchange)
Invoke accounting communication callback.
virtual void start() override
Start communication.
virtual ~RadiusAsyncAcct()=default
Destructor.
RadiusAsyncAcct(uint32_t subnet_id, const AttributesPtr &send_attrs, const CallbackAcct &callback)
Constructor.
static void invokeCallback(const CallbackAuth &callback, const ExchangePtr exchange)
Invoke authentication communication callback.
virtual void start() override
Start communication.
virtual ~RadiusAsyncAuth()=default
Destructor.
RadiusAsyncAuth(uint32_t subnet_id, const AttributesPtr &send_attrs, const CallbackAuth &callback)
Constructor.
virtual ~RadiusAuth()=default
Destructor.
RadiusAuth(uint32_t subnet_id, const AttributesPtr &send_attrs, bool sync, const Exchange::Handler &handler)
Constructor.
virtual ~RadiusRequest()=default
Destructor.
int getRC() const
Get the error code.
RadiusRequest(const MsgCode code, uint32_t subnet_id, const AttributesPtr &send_attrs, bool sync, const Exchange::Handler &handler)
Constructor.
ExchangePtr getExchange()
Get the exchange.
AttributesPtr getRespAttrs() const
Get response attributes.
virtual void start()
Start communication.
uint32_t nas_port_
Client/NAS port (from Subnet Id).
AttributesPtr getReqAttrs() const
Get request attributes.
ExchangePtr exchange_
Exchange.
virtual void start() override
Start communication.
virtual ~RadiusSyncAcct()=default
Destructor.
RadiusSyncAcct(uint32_t subnet_id, const AttributesPtr &send_attrs, const CallbackAcct &callback)
Constructor.
CallbackAcct callback_
Accounting termination callback.
RadiusSyncAuth(uint32_t subnet_id, const AttributesPtr &send_attrs, const CallbackAuth &callback)
Constructor.
virtual ~RadiusSyncAuth()=default
Destructor.
CallbackAuth callback_
Authentication termination callback.
virtual void start() override
Start communication.
boost::shared_ptr< Attributes > AttributesPtr
Shared pointers to attribute collection.
std::function< void(int)> CallbackAcct
Type of callback for accounting termination.
boost::shared_ptr< RadiusAsyncAuth > RadiusAsyncAuthPtr
Pointer to asynchronous authentication.
boost::shared_ptr< RadiusSyncAcct > RadiusSyncAcctPtr
Pointer to synchronous accounting.
boost::shared_ptr< Exchange > ExchangePtr
Type of shared pointers to RADIUS exchange object.
boost::shared_ptr< RadiusSyncAuth > RadiusSyncAuthPtr
Pointer to synchronous authentication.
std::function< void(int, AttributesPtr)> CallbackAuth
Type of callback for authentication termination.
boost::shared_ptr< Message > MessagePtr
Shared pointers to message.
MsgCode
Standard RADIUS message code.
uint32_t getNASPort(uint32_t subnet_id)
Remap a subnet ID to a NAS port.
boost::shared_ptr< RadiusAsyncAcct > RadiusAsyncAcctPtr
Pointer to asynchronous accounting.
Defines the logger used by the top-level component of kea-lfc.