Task that performs a full link dump from the kernel.
More...
#include <nl_link_dump_task.hxx>
Task that performs a full link dump from the kernel.
Issues an RTM_GETLINK dump and collects LinkEvent entries as messages are received. Returns the accumulated LinkEventList on completion.
◆ LinkDumpTask()
| llmx::rtaco::LinkDumpTask::LinkDumpTask |
( |
SocketGuard & | socket_guard, |
|
|
std::pmr::memory_resource * | pmr, |
|
|
uint16_t | ifindex, |
|
|
uint32_t | sequence ) |
|
noexcept |
Construct a LinkDumpTask.
- Parameters
-
| socket_guard | Reference to the socket guard. |
| pmr | Memory resource used for event list allocations. |
| ifindex | Interface index to target (0 = all). |
| sequence | Netlink message sequence number. |
◆ dispatch_link()
| auto llmx::rtaco::LinkDumpTask::dispatch_link |
( |
const nlmsghdr & | header | ) |
-> std::optional< std::expected< LinkEventList, std::error_code > > |
|
private |
◆ handle_done()
| auto llmx::rtaco::LinkDumpTask::handle_done |
( |
| ) |
-> std::expected< LinkEventList, std::error_code > |
|
private |
◆ handle_error()
| auto llmx::rtaco::LinkDumpTask::handle_error |
( |
const nlmsghdr & | header | ) |
-> std::expected< LinkEventList, std::error_code > |
|
private |
◆ prepare_request()
| void llmx::rtaco::LinkDumpTask::prepare_request |
( |
| ) |
|
Prepare the netlink request to dump links.
◆ process_message()
| auto llmx::rtaco::LinkDumpTask::process_message |
( |
const nlmsghdr & | header | ) |
-> std::optional< std::expected< LinkEventList, std::error_code > > |
Process a received netlink message for link dump responses.
- Parameters
-
| header | Netlink message header. |
- Returns
- Optional expected with LinkEventList on completion or an error.
◆ learned_
The documentation for this class was generated from the following files: