variable IPV6_NEXT_HEADER

Common nextHeader values (RFC 8200 §4, IANA "Protocol Numbers" registry). nextHeader shares its value space with IPv4's protocol field, so upper-layer values like UDP and TCP match @binstruct/udp's IP_PROTOCOL_UDP / @binstruct/icmp's IP_PROTOCOL_ICMP. This package does not parse any of the extension headers listed here — they are provided so callers can recognize them in nextHeader before deciding how to walk payload themselves.

Examples

Example 1

import { assertEquals } from "@std/assert";
import { IPV6_NEXT_HEADER } from "@binstruct/ipv6";

assertEquals(IPV6_NEXT_HEADER.TCP, 6);
assertEquals(IPV6_NEXT_HEADER.UDP, 17);
assertEquals(IPV6_NEXT_HEADER.ICMPV6, 58);
assertEquals(IPV6_NEXT_HEADER.NO_NEXT_HEADER, 59);

Properties

HOP_BY_HOP: number

Hop-by-Hop Options extension header

TCP: number

TCP (RFC 9293)

UDP: number

UDP (RFC 768)

ROUTING: number

Routing extension header

FRAGMENT: number

Fragment extension header

ESP: number

Encapsulating Security Payload

Authentication Header

ICMPV6: number

ICMPv6 (RFC 4443)

No next header — nothing follows the fixed header or preceding extension header

Destination Options extension header