|
llmx-rtaco 0.0.1
RTNL-only netlink control-plane library for Linux (C++23).
|
Namespaces | |
| namespace | detail |
Classes | |
| class | Control |
| High-level control interface for kernel netlink operations. More... | |
| class | Listener |
| Asynchronous netlink message listener and event dispatcher. More... | |
| class | Signal |
| Signal/slot wrapper supporting synchronous and asynchronous execution. More... | |
| class | Signal< R(Args...), Combiner > |
| struct | enable_bitmask_operators |
| Enable bitwise operators for an enum class. More... | |
| struct | AddressEvent |
| struct | enable_bitmask_operators< AddressEvent::Flags > |
| struct | LinkEvent |
| struct | enable_bitmask_operators< LinkEvent::Flags > |
| struct | NeighborEvent |
| struct | RouteEvent |
| struct | enable_bitmask_operators< RouteEvent::Flags > |
| class | Endpoint |
| Netlink-specific endpoint wrapper for Boost.Asio. More... | |
| class | Protocol |
| Protocol descriptor for netlink sockets. More... | |
| class | Socket |
| RAII wrapper for a Boost.Asio netlink socket. More... | |
| class | SocketGuard |
| Thread-safe guard owning a labeled Socket. More... | |
| class | AddressDumpTask |
| Task that performs a full address dump from the kernel. More... | |
| struct | AddressRequest |
| class | AddressTask |
| Base task type for address-related netlink operations. More... | |
| class | LinkDumpTask |
| Task that performs a full link dump from the kernel. More... | |
| struct | LinkRequest |
| class | LinkTask |
| Base task type for link-related netlink operations. More... | |
| class | NeighborDumpTask |
| Task that performs a complete neighbor table dump. More... | |
| class | NeighborFlushTask |
| Task that flushes (deletes) a specific neighbor entry. More... | |
| class | NeighborGetTask |
| Task that retrieves a single neighbor entry. More... | |
| class | NeighborProbeTask |
| Task that triggers a neighbor probe (solicit) for an address. More... | |
| struct | NeighborRequest |
| class | NeighborTask |
| Base task type for neighbor-related netlink operations. More... | |
| class | RequestTask |
| Base template for single-request netlink tasks. More... | |
| class | RouteDumpTask |
| Task that performs a full route table dump from the kernel. More... | |
| struct | RouteRequest |
| class | RouteTask |
| Base task type for route-related netlink operations. More... | |
Concepts | |
| concept | IsEnumeration |
| concept | IsNetlinkEvent |
| concept | request_behavior |
Typedefs | |
| using | AddressEventList = std::pmr::vector<AddressEvent> |
| using | LinkEventList = std::pmr::vector<LinkEvent> |
| using | NeighborEventList = std::pmr::vector<NeighborEvent> |
| using | RouteEventList = std::pmr::vector<RouteEvent> |
Enumerations | |
| enum class | ExecPolicy { Sync , Async } |
Functions | |
| constexpr auto | trim_string (std::string_view sv) -> std::string |
| Remove trailing NUL characters and return an owning string. | |
| template<size_t N> | |
| constexpr auto | trim_string (const std::array< char, N > &arr) -> std::string |
| Remove trailing NULs from a fixed-size char array and return a string. | |
| auto | extract_ifname (const nlmsghdr &header) -> std::string |
| Extract the interface name from a netlink header. | |
| auto | attribute_string (const rtattr &attr) -> std::string |
| Convert an rtattr payload to a trimmed std::string. | |
| auto | attribute_address (const rtattr &attr, uint8_t family) -> std::string |
| Convert an rtattr payload to a text representation of an IP address. | |
| auto | attribute_uint32 (const rtattr &attr) -> uint32_t |
| Read a uint32_t value from an rtattr payload. | |
| auto | attribute_hwaddr (const rtattr &attr) -> std::string |
| Format a hardware address (MAC) from an rtattr payload as a string. | |
| template<typename MsgT> | |
| const MsgT * | get_msg_payload (const nlmsghdr &header) |
| Get a typed pointer to the message payload in a netlink header. | |
| template<typename MsgT, typename Fn> | |
| void | for_each_attr (const nlmsghdr &header, const MsgT *info, Fn &&fn) |
| Iterate over rtattr attributes for a given message payload. | |
| auto | type_to_string (IsNetlinkEvent auto &&type) noexcept -> std::string_view |
| Convert a netlink message or event type to a readable name. | |
| auto | family_to_string (uint8_t family) noexcept -> std::string_view |
| Convert an address family constant to a human-readable name. | |
| auto | protocol_to_string (uint8_t protocol) noexcept -> std::string_view |
| Convert a protocol identifier to a readable name. | |
| auto | route_type_to_string (uint8_t route_type) noexcept -> std::string_view |
| Convert a route type constant to a string. | |
| template<typename E> | |
| constexpr E | operator| (E lhs, E rhs) |
| template<typename E> | |
| constexpr E | operator& (E lhs, E rhs) |
| template<typename E> | |
| constexpr E | operator^ (E lhs, E rhs) |
| template<typename E> | |
| constexpr E | operator~ (E val) |
| template<typename E> | |
| constexpr E & | operator|= (E &lhs, E rhs) |
| template<typename E> | |
| constexpr E & | operator&= (E &lhs, E rhs) |
| template<typename E> | |
| constexpr E & | operator^= (E &lhs, E rhs) |
| template<typename E, std::integral U> | |
| constexpr E | operator<< (E lhs, U shift) |
| template<typename E, std::integral U> | |
| constexpr E | operator>> (E lhs, U shift) |
Variables | |
| template<typename _Tp> | |
| constexpr bool | enable_bitmask_operators_v = enable_bitmask_operators<_Tp>::value |
| constexpr uint32_t | DEFAULT_GROUP_MASK |
| using llmx::rtaco::AddressEventList = std::pmr::vector<AddressEvent> |
| using llmx::rtaco::LinkEventList = std::pmr::vector<LinkEvent> |
| using llmx::rtaco::NeighborEventList = std::pmr::vector<NeighborEvent> |
| using llmx::rtaco::RouteEventList = std::pmr::vector<RouteEvent> |
|
strong |
|
inline |
Convert an rtattr payload to a text representation of an IP address.
Supports IPv4 and IPv6 families.
| attr | Attribute containing the address bytes. |
| family | Address family (AF_INET or AF_INET6). |
|
inline |
Format a hardware address (MAC) from an rtattr payload as a string.
Produces a colon-separated lowercase hex representation.
|
inline |
Convert an rtattr payload to a trimmed std::string.
| attr | Attribute whose payload is interpreted as a NUL-terminated string. |
|
inline |
Read a uint32_t value from an rtattr payload.
Returns 0 on insufficient payload length.
|
inline |
Extract the interface name from a netlink header.
Parses netlink attributes for an ifinfomsg within the provided header and returns the interface name if present.
| header | Netlink message header containing an ifinfomsg. |
|
inlinenoexcept |
Convert an address family constant to a human-readable name.
|
inline |
Iterate over rtattr attributes for a given message payload.
Calls the provided function for each attribute discovered.
|
inline |
Get a typed pointer to the message payload in a netlink header.
| MsgT | Message type expected in the payload (e.g., ifinfomsg). |
| header | Netlink message header. |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
inlinenoexcept |
Convert a protocol identifier to a readable name.
|
inlinenoexcept |
Convert a route type constant to a string.
|
inlineconstexpr |
Remove trailing NULs from a fixed-size char array and return a string.
Convenience overload for fixed-size char arrays.
|
inlineconstexpr |
Remove trailing NUL characters and return an owning string.
Trims any trailing '\0' characters from the provided string_view and returns a newly allocated std::string containing the result.
| sv | Input string view possibly containing trailing NULs. |
|
inlinenoexcept |
Convert a netlink message or event type to a readable name.
| IsNetlinkEvent | An enumeration or integral type representing the message/event type. |
| type | The event/type value. |
|
constexpr |
|
constexpr |