![]() |
Kea 3.1.1
|
Base class for communication with servers. More...
#include <radius_request.h>
Public Member Functions | |
RadiusRequest (const MsgCode code, uint32_t subnet_id, const AttributesPtr &send_attrs, bool sync, const Exchange::Handler &handler) | |
Constructor. | |
virtual | ~RadiusRequest ()=default |
Destructor. | |
ExchangePtr | getExchange () |
Get the exchange. | |
int | getRC () const |
Get the error code. | |
AttributesPtr | getReqAttrs () const |
Get request attributes. | |
AttributesPtr | getRespAttrs () const |
Get response attributes. | |
virtual void | start () |
Start communication. | |
Protected Attributes | |
ExchangePtr | exchange_ |
Exchange. | |
uint32_t | nas_port_ |
Client/NAS port (from Subnet Id). | |
Base class for communication with servers.
It represents the common part of authentication/authorization and accounting communication.
Definition at line 44 of file radius_request.h.
isc::radius::RadiusRequest::RadiusRequest | ( | const MsgCode | code, |
uint32_t | subnet_id, | ||
const AttributesPtr & | send_attrs, | ||
bool | sync, | ||
const Exchange::Handler & | handler ) |
Constructor.
code | message code (PW_ACCESS_REQUEST or PW_ACCOUNTING_REQUEST). |
subnet_id | Subnet ID (aka client/NAS port). |
send_attrs | Attributes to send. |
sync | true if synchronous, false if asynchronous. |
handler | Termination handler. |
Definition at line 37 of file radius_request.cc.
References isc::radius::RadiusImpl::acct_, isc::radius::RadiusImpl::auth_, exchange_, isc::radius::Attribute::fromInt(), isc::radius::getNASPort(), isc::radius::RadiusImpl::instance(), nas_port_, isc::radius::PW_ACCESS_REQUEST, isc::radius::PW_NAS_PORT, and isc::radius::RadiusImpl::retries_.
Referenced by isc::radius::RadiusAcct::RadiusAcct(), and isc::radius::RadiusAuth::RadiusAuth().
|
virtualdefault |
Destructor.
|
inline |
Get the exchange.
Definition at line 100 of file radius_request.h.
References exchange_.
|
inline |
Get the error code.
Definition at line 71 of file radius_request.h.
References exchange_.
Referenced by isc::radius::RadiusSyncAcct::start(), and isc::radius::RadiusSyncAuth::start().
|
inline |
Get request attributes.
Definition at line 78 of file radius_request.h.
References exchange_.
|
inline |
Get response attributes.
Definition at line 89 of file radius_request.h.
References exchange_.
Referenced by isc::radius::RadiusSyncAuth::start().
|
inlinevirtual |
Start communication.
In synchronous mode it returns when exchange(s) is(are) finished, in asynchronous mode it initiates the (first) exchange.
Reimplemented in isc::radius::RadiusAsyncAcct, isc::radius::RadiusAsyncAuth, isc::radius::RadiusSyncAcct, and isc::radius::RadiusSyncAuth.
Definition at line 66 of file radius_request.h.
References exchange_.
Referenced by isc::radius::RadiusAsyncAcct::start(), isc::radius::RadiusAsyncAuth::start(), isc::radius::RadiusSyncAcct::start(), and isc::radius::RadiusSyncAuth::start().
|
protected |
Definition at line 109 of file radius_request.h.
Referenced by RadiusRequest(), getExchange(), getRC(), getReqAttrs(), getRespAttrs(), isc::radius::RadiusAsyncAcct::start(), isc::radius::RadiusAsyncAuth::start(), start(), isc::radius::RadiusSyncAcct::start(), and isc::radius::RadiusSyncAuth::start().
|
protected |
Client/NAS port (from Subnet Id).
Definition at line 106 of file radius_request.h.
Referenced by RadiusRequest(), isc::radius::RadiusAsyncAcct::start(), isc::radius::RadiusAsyncAuth::start(), isc::radius::RadiusSyncAcct::start(), and isc::radius::RadiusSyncAuth::start().