kea-custom-hooks
FeM custom hooks libraries for Kea DHCP
Classes | Public Member Functions | List of all members
aai::ArpwatchRequestHandler Class Reference

High-level handler for ARPwatch requests. More...

#include <ArpwatchRequestHandler.hpp>

Classes

struct  RpcMethodName
 

Public Member Functions

 ArpwatchRequestHandler (HiredisAdapter &redis)
 
 ArpwatchRequestHandler (const ArpwatchRequestHandler &)=delete
 
ArpwatchRequestHandleroperator= (const ArpwatchRequestHandler &)=delete
 
 ArpwatchRequestHandler (ArpwatchRequestHandler &&)=delete
 
ArpwatchRequestHandleroperator= (ArpwatchRequestHandler &&)=delete
 
 ~ArpwatchRequestHandler ()=default
 
void register_method_handlers (XmlRpcServer &rpc_server)
 Register this instance's method handlers in the aai::XmlRpcServer. More...
 
RPC method handlers

These functions are the actual handlers for RPC method.

They take the arguments from the RPC server and perform the requested action on the local lease storage.

All these functions are named similar to the XML-RPC method names as required by the ARPwatch specification.

Returns
The resolved MAC as string, if one exists. Otherwise, nothing is returned.
std::optional< std::string > resolve_ip_to_mac (std::string_view ip)
 

Detailed Description

High-level handler for ARPwatch requests.

This class is the bridge between the local lease storage and the XML-RPC interface, taking parsed XML-RPC requests, processing them using the local lease storage and returning the result to the XML-RPC interface.

Definition at line 20 of file ArpwatchRequestHandler.hpp.

Constructor & Destructor Documentation

◆ ArpwatchRequestHandler() [1/3]

aai::ArpwatchRequestHandler::ArpwatchRequestHandler ( HiredisAdapter redis)
inlineexplicit

Definition at line 29 of file ArpwatchRequestHandler.hpp.

◆ ArpwatchRequestHandler() [2/3]

aai::ArpwatchRequestHandler::ArpwatchRequestHandler ( const ArpwatchRequestHandler )
delete

◆ ArpwatchRequestHandler() [3/3]

aai::ArpwatchRequestHandler::ArpwatchRequestHandler ( ArpwatchRequestHandler &&  )
delete

◆ ~ArpwatchRequestHandler()

aai::ArpwatchRequestHandler::~ArpwatchRequestHandler ( )
default

Member Function Documentation

◆ operator=() [1/2]

ArpwatchRequestHandler & aai::ArpwatchRequestHandler::operator= ( ArpwatchRequestHandler &&  )
delete

◆ operator=() [2/2]

ArpwatchRequestHandler & aai::ArpwatchRequestHandler::operator= ( const ArpwatchRequestHandler )
delete

◆ register_method_handlers()

void aai::ArpwatchRequestHandler::register_method_handlers ( XmlRpcServer rpc_server)

Register this instance's method handlers in the aai::XmlRpcServer.

Definition at line 35 of file ArpwatchRequestHandler.cpp.

◆ resolve_ip_to_mac()

std::optional< std::string > aai::ArpwatchRequestHandler::resolve_ip_to_mac ( std::string_view  ip)

Definition at line 42 of file ArpwatchRequestHandler.cpp.


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