llmx-rtaco 0.0.1
RTNL-only netlink control-plane library for Linux (C++23).
Loading...
Searching...
No Matches
llmx::rtaco::NeighborProbeTask Class Reference

Task that triggers a neighbor probe (solicit) for an address. More...

#include <nl_neighbor_probe_task.hxx>

Inheritance diagram for llmx::rtaco::NeighborProbeTask:
llmx::rtaco::NeighborTask< NeighborProbeTask, void > llmx::rtaco::RequestTask< NeighborProbeTask, void >

Public Member Functions

 NeighborProbeTask (SocketGuard &socket_guard, uint16_t uint16_t, uint32_t sequence, std::span< uint8_t, 16 > address)
 Construct a NeighborProbeTask to probe a neighbor address.
void prepare_request ()
 Prepare the netlink request to probe the neighbor.
auto process_message (const nlmsghdr &header) -> std::optional< std::expected< void, std::error_code > >
 Process a response message for the probe operation.
Public Member Functions inherited from llmx::rtaco::NeighborTask< NeighborProbeTask, void >
auto request_payload () const -> std::span< const uint8_t >
 Get the serialized request payload for the neighbor request.
Public Member Functions inherited from llmx::rtaco::RequestTask< NeighborProbeTask, void >
 RequestTask (SocketGuard &socket_guard, uint16_t ifindex, uint32_t sequence) noexcept
 Construct a RequestTask.
virtual ~RequestTask ()=default
 Virtual destructor.
auto async_run () -> boost::asio::awaitable< std::expected< void, std::error_code > >
 Run the request asynchronously and return the result.

Private Member Functions

auto handle_error (const nlmsghdr &header) -> std::expected< void, std::error_code >

Private Attributes

std::array< uint8_t, 16 > address_

Additional Inherited Members

Protected Member Functions inherited from llmx::rtaco::NeighborTask< NeighborProbeTask, void >
void build_request (uint16_t msg_type, uint16_t msg_flags, uint16_t ndm_state, uint8_t ndm_flags, std::span< uint8_t, 16 > address)
Protected Member Functions inherited from llmx::rtaco::RequestTask< NeighborProbeTask, void >
auto socket () noexcept -> Socket &
auto sequence () const noexcept -> uint32_t
auto ifindex () const noexcept -> uint16_t
Protected Attributes inherited from llmx::rtaco::NeighborTask< NeighborProbeTask, void >
NeighborRequest request_

Detailed Description

Task that triggers a neighbor probe (solicit) for an address.

Requests the kernel to probe the neighbor (e.g., send an ARP/ND solicitation) and processes the completion or error responses.

Constructor & Destructor Documentation

◆ NeighborProbeTask()

llmx::rtaco::NeighborProbeTask::NeighborProbeTask ( SocketGuard & socket_guard,
uint16_t uint16_t ,
uint32_t sequence,
std::span< uint8_t, 16 > address )

Construct a NeighborProbeTask to probe a neighbor address.

Parameters
socket_guardSocket guard used for IO.
uint16_tInterface index.
sequenceNetlink message sequence number.
addressAddress bytes to probe.

Member Function Documentation

◆ handle_error()

auto llmx::rtaco::NeighborProbeTask::handle_error ( const nlmsghdr & header) -> std::expected< void, std::error_code >
private

◆ prepare_request()

void llmx::rtaco::NeighborProbeTask::prepare_request ( )

Prepare the netlink request to probe the neighbor.

◆ process_message()

auto llmx::rtaco::NeighborProbeTask::process_message ( const nlmsghdr & header) -> std::optional< std::expected< void, std::error_code > >

Process a response message for the probe operation.

Member Data Documentation

◆ address_

std::array<uint8_t, 16> llmx::rtaco::NeighborProbeTask::address_
private

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