|
llmx-rtaco 0.0.1
RTNL-only netlink control-plane library for Linux (C++23).
|
Task that flushes (deletes) a specific neighbor entry. More...
#include <nl_neighbor_flush_task.hxx>
Public Member Functions | |
| NeighborFlushTask (SocketGuard &socket_guard, uint16_t ifindex, uint32_t sequence, std::span< uint8_t, 16 > address) | |
| Construct a NeighborFlushTask to remove a neighbor entry. | |
| void | prepare_request () |
| Prepare the netlink request to flush the neighbor entry. | |
| auto | process_message (const nlmsghdr &header) -> std::optional< std::expected< void, std::error_code > > |
| Process a response message for the flush operation. | |
| Public Member Functions inherited from llmx::rtaco::NeighborTask< NeighborFlushTask, 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< NeighborFlushTask, 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< NeighborFlushTask, 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< NeighborFlushTask, void > | |
| auto | socket () noexcept -> Socket & |
| auto | sequence () const noexcept -> uint32_t |
| auto | ifindex () const noexcept -> uint16_t |
| Protected Attributes inherited from llmx::rtaco::NeighborTask< NeighborFlushTask, void > | |
| NeighborRequest | request_ |
Task that flushes (deletes) a specific neighbor entry.
Constructs and sends an RTM_GETNEIGH/RTM_NEWNEIGH-style request to remove the specified neighbor and processes the kernel's response.
| llmx::rtaco::NeighborFlushTask::NeighborFlushTask | ( | SocketGuard & | socket_guard, |
| uint16_t | ifindex, | ||
| uint32_t | sequence, | ||
| std::span< uint8_t, 16 > | address ) |
Construct a NeighborFlushTask to remove a neighbor entry.
| socket_guard | Socket guard used to send the request. |
| ifindex | Interface index. |
| sequence | Netlink message sequence number. |
| address | Address bytes to identify the neighbor. |
|
private |
| void llmx::rtaco::NeighborFlushTask::prepare_request | ( | ) |
Prepare the netlink request to flush the neighbor entry.
| auto llmx::rtaco::NeighborFlushTask::process_message | ( | const nlmsghdr & | header | ) | -> std::optional< std::expected< void, std::error_code > > |
Process a response message for the flush operation.
| header | Netlink message header. |
|
private |