Kea 3.1.1
isc::radius::RadiusRequest Class Reference

Base class for communication with servers. More...

#include <radius_request.h>

+ Inheritance diagram for isc::radius::RadiusRequest:

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).
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ RadiusRequest()

isc::radius::RadiusRequest::RadiusRequest ( const MsgCode code,
uint32_t subnet_id,
const AttributesPtr & send_attrs,
bool sync,
const Exchange::Handler & handler )

Constructor.

Parameters
codemessage code (PW_ACCESS_REQUEST or PW_ACCOUNTING_REQUEST).
subnet_idSubnet ID (aka client/NAS port).
send_attrsAttributes to send.
synctrue if synchronous, false if asynchronous.
handlerTermination 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().

+ Here is the call graph for this function:

◆ ~RadiusRequest()

virtual isc::radius::RadiusRequest::~RadiusRequest ( )
virtualdefault

Destructor.

Member Function Documentation

◆ getExchange()

ExchangePtr isc::radius::RadiusRequest::getExchange ( )
inline

Get the exchange.

Returns
The exchange.

Definition at line 100 of file radius_request.h.

References exchange_.

◆ getRC()

int isc::radius::RadiusRequest::getRC ( ) const
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().

◆ getReqAttrs()

AttributesPtr isc::radius::RadiusRequest::getReqAttrs ( ) const
inline

Get request attributes.

Returns
attributes from the to be sent request message.

Definition at line 78 of file radius_request.h.

References exchange_.

◆ getRespAttrs()

AttributesPtr isc::radius::RadiusRequest::getRespAttrs ( ) const
inline

Get response attributes.

Returns
attributes from the received response message.

Definition at line 89 of file radius_request.h.

References exchange_.

Referenced by isc::radius::RadiusSyncAuth::start().

◆ start()

virtual void isc::radius::RadiusRequest::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().

Member Data Documentation

◆ exchange_

◆ nas_port_

uint32_t isc::radius::RadiusRequest::nas_port_
protected

The documentation for this class was generated from the following files: