llmx-rtaco 0.0.1
RTNL-only netlink control-plane library for Linux (C++23).
Loading...
Searching...
No Matches
llmx::rtaco::RouteEvent Struct Reference

#include <nl_route_event.hxx>

Public Types

enum class  Type : uint16_t { UNKNOWN = 0 , NEW_ROUTE = RTM_NEWROUTE , DELETE_ROUTE = RTM_DELROUTE }
enum class  Flags : uint32_t {
  NONE = 0 , NOTIFY = (1u << 8) , CLONED = (1u << 9) , EQUALIZE = (1u << 10) ,
  PREFIX = (1u << 11) , LOOKUP_TABLE = (1u << 12) , FIB_MATCH = (1u << 13) , OFFLOAD = (1u << 14) ,
  TRAP = (1u << 15) , OFFLOAD_FAILED = (1u << 29)
}

Static Public Member Functions

static auto from_nlmsghdr (const nlmsghdr &header) -> RouteEvent
 Parse a RouteEvent from a netlink message header.

Public Attributes

Type type {Type::UNKNOWN}
uint8_t family {0}
uint8_t dst_prefix_len {0}
uint8_t src_prefix_len {0}
uint8_t scope {0}
uint8_t protocol {0}
uint8_t route_type {0}
Flags flags {Flags::NONE}
uint32_t table {0}
uint32_t priority {0}
uint32_t oif_index {0}
std::string dst {}
std::string src {}
std::string gateway {}
std::string prefsrc {}
std::string oif {}

Member Enumeration Documentation

◆ Flags

enum class llmx::rtaco::RouteEvent::Flags : uint32_t
strong
Enumerator
NONE 
NOTIFY 
CLONED 
EQUALIZE 
PREFIX 
LOOKUP_TABLE 
FIB_MATCH 
OFFLOAD 
TRAP 
OFFLOAD_FAILED 

◆ Type

enum class llmx::rtaco::RouteEvent::Type : uint16_t
strong
Enumerator
UNKNOWN 
NEW_ROUTE 
DELETE_ROUTE 

Member Function Documentation

◆ from_nlmsghdr()

auto llmx::rtaco::RouteEvent::from_nlmsghdr ( const nlmsghdr & header) -> RouteEvent
static

Parse a RouteEvent from a netlink message header.

Extracts route attributes and fills a RouteEvent structure.

Member Data Documentation

◆ dst

std::string llmx::rtaco::RouteEvent::dst {}

◆ dst_prefix_len

uint8_t llmx::rtaco::RouteEvent::dst_prefix_len {0}

◆ family

uint8_t llmx::rtaco::RouteEvent::family {0}

◆ flags

Flags llmx::rtaco::RouteEvent::flags {Flags::NONE}

◆ gateway

std::string llmx::rtaco::RouteEvent::gateway {}

◆ oif

std::string llmx::rtaco::RouteEvent::oif {}

◆ oif_index

uint32_t llmx::rtaco::RouteEvent::oif_index {0}

◆ prefsrc

std::string llmx::rtaco::RouteEvent::prefsrc {}

◆ priority

uint32_t llmx::rtaco::RouteEvent::priority {0}

◆ protocol

uint8_t llmx::rtaco::RouteEvent::protocol {0}

◆ route_type

uint8_t llmx::rtaco::RouteEvent::route_type {0}

◆ scope

uint8_t llmx::rtaco::RouteEvent::scope {0}

◆ src

std::string llmx::rtaco::RouteEvent::src {}

◆ src_prefix_len

uint8_t llmx::rtaco::RouteEvent::src_prefix_len {0}

◆ table

uint32_t llmx::rtaco::RouteEvent::table {0}

◆ type

Type llmx::rtaco::RouteEvent::type {Type::UNKNOWN}

The documentation for this struct was generated from the following files: