VBVX 0.1.0
Header-only C++23 library for safe, zero-copy parsing of packet buffers.
Loading...
Searching...
No Matches
vbvx::ArpHeader Struct Reference

Address Resolution Protocol (ARP) header. More...

#include <arp.hxx>

Public Member Functions

constexpr auto htype () const noexcept -> ArpHType
constexpr auto ptype () const noexcept -> EtherType
constexpr auto opcode () const noexcept -> ArpOpCode
constexpr auto sender_mac () const noexcept -> std::span< const uint8_t, 6 >
constexpr auto target_mac () const noexcept -> std::span< const uint8_t, 6 >
constexpr auto sender_ipv4 () const noexcept -> std::span< const uint8_t, 4 >
constexpr auto target_ipv4 () const noexcept -> std::span< const uint8_t, 4 >
constexpr auto sender_ipv4_host () const noexcept -> uint32_t
constexpr auto target_ipv4_host () const noexcept -> uint32_t
constexpr void set_opcode (ArpOpCode code) noexcept

Public Attributes

uint16_t htype_be
uint16_t ptype_be
uint8_t hlen
uint8_t plen
uint16_t oper_be
uint8_t sha [6]
uint8_t spa [4]
uint8_t tha [6]
uint8_t tpa [4]

Detailed Description

Address Resolution Protocol (ARP) header.

See also
IANA ARP Parameters: https://www.iana.org/assignments/arp-parameters/arp-parameters.xhtml
IETF RFC 826 (Ethernet Address Resolution Protocol): https://datatracker.ietf.org/doc/html/rfc826

Member Function Documentation

◆ htype()

auto vbvx::ArpHeader::htype ( ) const -> ArpHType
inlineconstexprnoexcept

◆ opcode()

auto vbvx::ArpHeader::opcode ( ) const -> ArpOpCode
inlineconstexprnoexcept

◆ ptype()

auto vbvx::ArpHeader::ptype ( ) const -> EtherType
inlineconstexprnoexcept

◆ sender_ipv4()

auto vbvx::ArpHeader::sender_ipv4 ( ) const -> std::span< const uint8_t, 4 >
inlineconstexprnoexcept

◆ sender_ipv4_host()

auto vbvx::ArpHeader::sender_ipv4_host ( ) const -> uint32_t
inlineconstexprnoexcept

◆ sender_mac()

auto vbvx::ArpHeader::sender_mac ( ) const -> std::span< const uint8_t, 6 >
inlineconstexprnoexcept

◆ set_opcode()

void vbvx::ArpHeader::set_opcode ( ArpOpCode code)
inlineconstexprnoexcept

◆ target_ipv4()

auto vbvx::ArpHeader::target_ipv4 ( ) const -> std::span< const uint8_t, 4 >
inlineconstexprnoexcept

◆ target_ipv4_host()

auto vbvx::ArpHeader::target_ipv4_host ( ) const -> uint32_t
inlineconstexprnoexcept

◆ target_mac()

auto vbvx::ArpHeader::target_mac ( ) const -> std::span< const uint8_t, 6 >
inlineconstexprnoexcept

Member Data Documentation

◆ hlen

uint8_t vbvx::ArpHeader::hlen

◆ htype_be

uint16_t vbvx::ArpHeader::htype_be

◆ oper_be

uint16_t vbvx::ArpHeader::oper_be

◆ plen

uint8_t vbvx::ArpHeader::plen

◆ ptype_be

uint16_t vbvx::ArpHeader::ptype_be

◆ sha

uint8_t vbvx::ArpHeader::sha[6]

◆ spa

uint8_t vbvx::ArpHeader::spa[4]

◆ tha

uint8_t vbvx::ArpHeader::tha[6]

◆ tpa

uint8_t vbvx::ArpHeader::tpa[4]

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