Struct section_header_t

Inheritance Relationships

Base Type

Struct Documentation

struct libnokogiri::pcapng::blocks::section_header_t : public libnokogiri::pcapng::block_t

Block that indicates the start of a section in a pcapng file.

The section header block is the only mandatory block type in pcapng files. It identifies the beginning of a section of the capture file.

This block does not contain capture data itself but rather it identifies a collection of blocks that are logically correlated.

There can be multiple of these blocks in the same pcapng file, however a section can not contain another section.

Public Functions

constexpr section_header_t() noexcept
constexpr section_header_t(std::uint32_t bom, version_t version, std::int64_t length) noexcept
std::uint32_t bom() const noexcept

Gets the byte-order-mark, used for checking the endian of the file

version_t version() const noexcept

Gets the version of the section

std::int64_t section_length() const noexcept

Gets the length of the section, if -1 is returned the section length must be calculated by scanning every block and totaling the sizes

Public Static Attributes

constexpr std::uint32_t magic = 0x1A2B3C4D