A view over a packet buffer providing access to various protocol headers.
More...
#include <buffer_view.hxx>
A view over a packet buffer providing access to various protocol headers.
◆ BufferView()
| vbvx::BufferView::BufferView |
( |
const void * | data, |
|
|
uint16_t | length ) |
|
inlineconstexprnoexcept |
◆ arp_header()
◆ data()
| auto vbvx::BufferView::data |
( |
| ) |
const -> std::span< const buffer_t > |
|
inlineconstexprnoexcept |
Get the underlying buffer data as a span.
◆ ether_header()
Get Ethernet header view.
◆ ether_type()
| auto vbvx::BufferView::ether_type |
( |
| ) |
const -> std::optional< EtherType > |
|
inlineconstexprnoexcept |
Get the EtherType of the packet for possible VLAN tag.
◆ icmp4_header()
◆ icmp6_header()
◆ ip4_header()
◆ ip4_ihl_bytes()
| auto vbvx::BufferView::ip4_ihl_bytes |
( |
| ) |
const -> std::optional< uint8_t > |
|
inlineconstexprnoexcept |
Get the number of bytes in the IPv4 header.
◆ ip6_header()
◆ ip_protocol()
| auto vbvx::BufferView::ip_protocol |
( |
| ) |
const -> std::optional< IpProtocol > |
|
inlineconstexprnoexcept |
Get the IP protocol (IPv4 or IPv6).
◆ l3_offset()
| auto vbvx::BufferView::l3_offset |
( |
| ) |
const -> uint16_t |
|
inlineconstexprnoexcept |
Get the offset of the Layer 3 header.
◆ l4_offset()
| auto vbvx::BufferView::l4_offset |
( |
| ) |
const -> std::optional< uint16_t > |
|
inlineconstexprnoexcept |
Get the offset of the Layer 4 header.
◆ length()
| auto vbvx::BufferView::length |
( |
| ) |
const -> uint16_t |
|
inlineconstexprnoexcept |
Get the length of the buffer.
◆ srv6_header()
Get SRv6 Header view if present.
◆ tcp_header()
◆ udp_header()
◆ vlan_header()
◆ vlan_id()
| auto vbvx::BufferView::vlan_id |
( |
| ) |
const -> std::optional< uint16_t > |
|
inlineconstexprnoexcept |
Get VLAN ID if VLAN tag is present.
The documentation for this class was generated from the following file: