VIPA 0.1.0
Header-only C++23 SIMD-assisted IPv4/IPv6 text parser.
Loading...
Searching...
No Matches
ipv6.hxx File Reference
#include <algorithm>
#include <array>
#include <bit>
#include <cstdint>
#include <optional>
#include <string_view>
#include "address.hxx"
#include "detail/classify.hxx"
#include "detail/simd.hxx"
#include "ipv4.hxx"

Go to the source code of this file.

Classes

struct  llmx::vipa::detail::IPv6Scan
 Character-position masks collected while scanning IPv6 text. More...

Namespaces

namespace  llmx
namespace  llmx::vipa
namespace  llmx::vipa::detail

Functions

constexpr auto llmx::vipa::detail::low_mask64 (std::size_t len) noexcept -> uint64_t
 Return a low-bit mask with len bits set.
constexpr auto llmx::vipa::detail::low_mask32 (std::size_t len) noexcept -> uint32_t
 Return a 32-bit low-bit mask with len bits set.
constexpr auto llmx::vipa::detail::range_mask64 (std::size_t begin, std::size_t end) noexcept -> uint64_t
 Return a mask covering [begin, end) bit positions.
auto llmx::vipa::detail::scan_ipv6_scalar (std::string_view text, IPv6Scan &scan) noexcept -> bool
 Scan IPv6 text with portable scalar character classification.
auto llmx::vipa::detail::scan_ipv6 (std::string_view text, IPv6Scan &scan) noexcept -> bool
 Scan IPv6 text with the best enabled implementation.
bool llmx::vipa::detail::parse_ipv6_piece (std::string_view piece, uint16_t &value) noexcept
 Parse one 1-4 digit IPv6 hexadecimal group.
auto llmx::vipa::detail::find_next_colon (IPv6Scan scan, std::size_t begin, std::size_t end) noexcept -> std::size_t
 Find the next colon bit in [begin, end).
auto llmx::vipa::detail::append_ipv4_tail (std::array< uint16_t, 8 > &groups, uint8_t &count, std::string_view tail) noexcept -> bool
 Append an embedded IPv4 tail as two IPv6 16-bit groups.
auto llmx::vipa::detail::parse_ipv6_side (std::string_view text, std::size_t begin, std::size_t end, IPv6Scan scan, std::array< uint16_t, 8 > &groups, uint8_t &count) noexcept -> bool
 Parse one side of an IPv6 address around optional :: compression.
auto llmx::vipa::parse_ipv6 (std::string_view text) noexcept -> std::optional< IPv6Address >
 Parse IPv6 text into sixteen network-order bytes.