llarp::net::ProtocolInfo

information about an IP protocol

#include <traffic_policy.hpp>

Public Functions

Name
bool BEncode(llarp_buffer_t * buf) const
bool BDecode(llarp_buffer_t * buf)
bool MatchesPacket(const IPPacket & pkt) const
returns true if an ip packet looks like it matches this protocol info returns false otherwise
bool operator<(const ProtocolInfo & other) const
ProtocolInfo() =default
ProtocolInfo(std::string_view spec)

Public Attributes

Name
IPProtocol protocol
ip protocol byte of this protocol
std::optional< port_t > port
the layer 3 port if applicable

Public Functions Documentation

function BEncode

bool BEncode(
    llarp_buffer_t * buf
) const

function BDecode

bool BDecode(
    llarp_buffer_t * buf
)

function MatchesPacket

bool MatchesPacket(
    const IPPacket & pkt
) const

returns true if an ip packet looks like it matches this protocol info returns false otherwise

function operator<

inline bool operator<(
    const ProtocolInfo & other
) const

function ProtocolInfo

ProtocolInfo() =default

function ProtocolInfo

explicit ProtocolInfo(
    std::string_view spec
)

Public Attributes Documentation

variable protocol

IPProtocol protocol;

ip protocol byte of this protocol

variable port

std::optional< port_t > port;

the layer 3 port if applicable


Updated on 2026-01-10 at 22:49:45 +0000