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

Protocol descriptor for netlink sockets. More...

#include <nl_protocol.hxx>

Public Types

using endpoint = Endpoint<Protocol>
using socket = boost::asio::basic_raw_socket<Protocol>

Public Member Functions

 Protocol ()=default
 Protocol (int proto) noexcept
 Construct a Protocol wrapper for a given netlink protocol.
auto type () const noexcept -> int
 Socket type for this protocol (SOCK_RAW).
auto protocol () const noexcept -> int
 Underlying protocol number used with socket(2).
auto family () const noexcept -> int
 Address family (AF_NETLINK).

Private Attributes

int proto_ {0}

Detailed Description

Protocol descriptor for netlink sockets.

Holds the protocol number and provides typedefs and helpers used by the Boost.Asio basic_raw_socket instantiation for netlink communication.

Member Typedef Documentation

◆ endpoint

◆ socket

using llmx::rtaco::Protocol::socket = boost::asio::basic_raw_socket<Protocol>

Constructor & Destructor Documentation

◆ Protocol() [1/2]

llmx::rtaco::Protocol::Protocol ( )
default

◆ Protocol() [2/2]

llmx::rtaco::Protocol::Protocol ( int proto)
inlineexplicitnoexcept

Construct a Protocol wrapper for a given netlink protocol.

Member Function Documentation

◆ family()

auto llmx::rtaco::Protocol::family ( ) const -> int
inlinenoexcept

Address family (AF_NETLINK).

◆ protocol()

auto llmx::rtaco::Protocol::protocol ( ) const -> int
inlinenoexcept

Underlying protocol number used with socket(2).

◆ type()

auto llmx::rtaco::Protocol::type ( ) const -> int
inlinenoexcept

Socket type for this protocol (SOCK_RAW).

Member Data Documentation

◆ proto_

int llmx::rtaco::Protocol::proto_ {0}
private

The documentation for this class was generated from the following file: