9#include <boost/asio/awaitable.hpp>
10#include <boost/asio/io_context.hpp>
11#include <boost/asio/strand.hpp>
12#include <boost/asio/steady_timer.hpp>
44 Control(boost::asio::io_context& io)
noexcept;
90 auto probe_neighbor(uint16_t ifindex, std::span<uint8_t, 16> address)
94 auto flush_neighbor(uint16_t ifindex, std::span<uint8_t, 16> address)
98 auto get_neighbor(uint16_t ifindex, std::span<uint8_t, 16> address)
103 -> boost::asio::awaitable<void_result_t>;
107 -> boost::asio::awaitable<void_result_t>;
111 -> boost::asio::awaitable<neighbor_result_t>;
125 -> boost::asio::awaitable<void_result_t>;
128 -> boost::asio::awaitable<void_result_t>;
131 -> boost::asio::awaitable<neighbor_result_t>;
133 boost::asio::io_context&
io_;
134 boost::asio::strand<boost::asio::io_context::executor_type>
strand_;
auto acquire_socket_token() -> boost::asio::awaitable< void >
Definition nl_control.cxx:242
auto async_dump_routes_impl() -> boost::asio::awaitable< route_list_result_t >
Definition nl_control.cxx:141
std::expected< RouteEventList, std::error_code > route_list_result_t
Definition nl_control.hxx:32
auto dump_neighbors() -> neighbor_list_result
Synchronously dump neighbor entries from the kernel.
Definition nl_control.cxx:61
auto async_dump_neighbors() -> boost::asio::awaitable< neighbor_list_result >
Asynchronously dump neighbors.
Definition nl_control.cxx:89
std::expected< NeighborEventList, std::error_code > neighbor_list_result
Definition nl_control.hxx:36
Control(Control &&)=delete
auto get_neighbor(uint16_t ifindex, std::span< uint8_t, 16 > address) -> neighbor_result_t
Get a neighbor entry synchronously.
Definition nl_control.cxx:123
boost::asio::io_context & io_
Definition nl_control.hxx:133
boost::asio::steady_timer gate_
Definition nl_control.hxx:135
std::expected< LinkEventList, std::error_code > link_list_result_t
Definition nl_control.hxx:34
auto async_dump_addresses_impl() -> boost::asio::awaitable< address_list_result_t >
Definition nl_control.cxx:155
Control(const Control &)=delete
auto async_flush_neighbor(uint16_t ifindex, std::span< uint8_t, 16 > address) -> boost::asio::awaitable< void_result_t >
Asynchronously flush a neighbor.
Definition nl_control.cxx:103
auto async_probe_neighbor_impl(uint16_t ifindex, std::span< uint8_t, 16 > address) -> boost::asio::awaitable< void_result_t >
Definition nl_control.cxx:200
~Control()
Destroy the Control object and release resources.
auto async_get_neighbor(uint16_t ifindex, std::span< uint8_t, 16 > address) -> boost::asio::awaitable< neighbor_result_t >
Asynchronously get a neighbor.
Definition nl_control.cxx:131
Control & operator=(Control &&)=delete
auto async_dump_routes() -> boost::asio::awaitable< route_list_result_t >
Asynchronously dump routes.
Definition nl_control.cxx:71
std::expected< void, std::error_code > void_result_t
Definition nl_control.hxx:37
auto async_probe_neighbor(uint16_t ifindex, std::span< uint8_t, 16 > address) -> boost::asio::awaitable< void_result_t >
Asynchronously probe a neighbor.
Definition nl_control.cxx:117
auto async_get_neighbor_impl(uint16_t ifindex, std::span< uint8_t, 16 > address) -> boost::asio::awaitable< neighbor_result_t >
Definition nl_control.cxx:228
void stop()
Stop ongoing operations and release control resources.
Definition nl_control.cxx:137
Control & operator=(const Control &)=delete
auto dump_routes() -> route_list_result_t
Synchronously dump routes from the kernel.
Definition nl_control.cxx:51
auto dump_addresses() -> address_list_result_t
Synchronously dump addresses from the kernel.
Definition nl_control.cxx:56
boost::asio::strand< boost::asio::io_context::executor_type > strand_
Definition nl_control.hxx:134
auto flush_neighbor(uint16_t ifindex, std::span< uint8_t, 16 > address) -> void_result_t
Flush a neighbour entry (synchronous).
Definition nl_control.cxx:95
auto async_dump_links_impl() -> boost::asio::awaitable< link_list_result_t >
Definition nl_control.cxx:185
std::expected< AddressEventList, std::error_code > address_list_result_t
Definition nl_control.hxx:33
auto probe_neighbor(uint16_t ifindex, std::span< uint8_t, 16 > address) -> void_result_t
Probe a neighbor entry (synchronous).
Definition nl_control.cxx:109
std::expected< NeighborEvent, std::error_code > neighbor_result_t
Definition nl_control.hxx:35
std::atomic_uint32_t sequence_
Definition nl_control.hxx:137
Control(boost::asio::io_context &io) noexcept
Construct a Control instance attached to an io_context.
auto dump_links() -> link_list_result_t
Synchronously dump links from the kernel.
Definition nl_control.cxx:66
auto async_flush_neighbor_impl(uint16_t ifindex, std::span< uint8_t, 16 > address) -> boost::asio::awaitable< void_result_t >
Definition nl_control.cxx:214
auto async_dump_links() -> boost::asio::awaitable< link_list_result_t >
Asynchronously dump links.
Definition nl_control.cxx:83
auto async_dump_neighbors_impl() -> boost::asio::awaitable< neighbor_list_result >
Definition nl_control.cxx:170
SocketGuard socket_guard_
Definition nl_control.hxx:136
auto async_dump_addresses() -> boost::asio::awaitable< address_list_result_t >
Asynchronously dump addresses.
Definition nl_control.cxx:77
Thread-safe guard owning a labeled Socket.
Definition nl_socket_guard.hxx:25
Definition nl_common.hxx:21
Definition nl_common.hxx:20