Documentation

Quickstart.

Build rtaco, install it, and link it from your own CMake target.

Prerequisites

  • • C++23 compiler on Linux
  • • Boost (Asio, Signals2, System)
  • • Linux netlink headers (typically linux-libc-dev / kernel headers)
  • • CMake ≥ 3.22 and Ninja

Configure & build

build
cmake -S . -B build -G Ninja \
  -DCMAKE_BUILD_TYPE=Release \
  -DRTACO_BUILD_EXAMPLES=ON
cmake --build build

Install

install
cmake --install build

Consume from CMake

CMakeLists.txt
find_package(llmx-rtaco CONFIG REQUIRED)
target_link_libraries(your_target PRIVATE llmx::rtaco)

Minimal usage

main.cxx
#include <boost/asio.hpp>
#include <rtaco/nl_control.hxx>
#include <rtaco/nl_listener.hxx>

auto main() -> int {
  boost::asio::io_context io;

  llmx::rtaco::Control ctl{io};
  if (auto routes = ctl.dump_routes(); !routes) {
    // routes.error() is a std::error_code
    return 1;
  }

  llmx::rtaco::Listener listener{io};
  listener.connect_to_event([](const llmx::rtaco::RouteEvent& ev) {
    // do something with ev
  });
  listener.start();

  io.run();
  return 0;
}

More complete setups live in examples/.

Privileges

Some operations — for example neighbor probe / flush — typically require CAP_NET_ADMIN. Run examples under sudo or with the appropriate capabilities.