Expand description
IPv6 protocol implementation
Provides IPv6 packet construction, parsing, address utilities, NDP (Neighbor Discovery Protocol) cache management, and dual-stack configuration for simultaneous IPv4/IPv6 networking.
Structs§
- Dual
Stack Config - Dual-stack network configuration
- Ipv6
Header - IPv6 packet header (40 bytes fixed)
- Ipv6
Interface Addr - IPv6 interface address with prefix length and scope
- Ipv6
State - Complete IPv6 subsystem state
- Ipv6
Stats - IPv6 statistics
- NdpCache
- NDP neighbor cache
- NdpEntry
- NDP neighbor cache entry
Enums§
Constants§
- DEFAULT_
HOP_ LIMIT - Default hop limit (equivalent to IPv4 TTL)
- ETHERTYPE_
IPV6 - EtherType for IPv6
- ICMP
V6_ NEIGHBOR_ ADVERT - ICMP
V6_ NEIGHBOR_ SOLICIT - ICMP
V6_ REDIRECT - ICMP
V6_ ROUTER_ ADVERT - ICMP
V6_ ROUTER_ SOLICIT - ICMPv6 NDP message types
- IPV6_
HEADER_ SIZE - IPv6 header size in bytes (fixed, unlike IPv4)
- IPV6_
MIN_ MTU - IPv6 minimum MTU (all links must support at least 1280 bytes)
- IPV6_
VERSION - IPv6 version number
- NDP_
OPT_ MTU - NDP_
OPT_ PREFIX_ INFO - NDP_
OPT_ SOURCE_ LINK_ ADDR - NDP option types
- NDP_
OPT_ TARGET_ LINK_ ADDR - NEXT_
HEADER_ FRAGMENT - NEXT_
HEADER_ HOP_ BY_ HOP - Next header protocol numbers
- NEXT_
HEADER_ ICMP V6 - NEXT_
HEADER_ NO_ NEXT - NEXT_
HEADER_ TCP - NEXT_
HEADER_ UDP
Functions§
- build_
ipv6 - Build an IPv6 packet with the given parameters.
- compute_
icmpv6_ checksum - Compute ICMPv6 checksum using the IPv6 pseudo-header.
- flush_
ndp_ cache - Flush the NDP cache.
- format_
ipv6 - Format an IPv6 address as a human-readable string.
- format_
ipv6_ compressed - Format an IPv6 address with zero-compression (::).
- get_
config - Get the current dual-stack configuration.
- get_
hop_ limit - Get the current hop limit.
- get_
ndp_ entries - Get NDP cache entries for display.
- get_
stats - Get IPv6 statistics.
- handle_
ndp - Handle an incoming NDP message.
- init
- Initialize the IPv6 subsystem.
- is_
global_ unicast - Check if an IPv6 address is a global unicast address (2000::/3)
- is_
ipv4_ mapped - Check if an IPv6 address is an IPv4-mapped IPv6 address (::ffff:0:0/96)
- is_
link_ local - Check if an IPv6 address is link-local (fe80::/10)
- is_
loopback - Check if an IPv6 address is the loopback address (::1)
- is_
multicast - Check if an IPv6 address is multicast (ff00::/8)
- is_
unique_ local - Check if an IPv6 address is a unique local address (fc00::/7)
- is_
unspecified - Check if an IPv6 address is the unspecified address (::)
- link_
local_ from_ mac - Generate a link-local address from a MAC address using EUI-64.
- multicast_
mac - Convert a multicast IPv6 address to its Ethernet multicast MAC address.
- ndp_
advertise - Build a Neighbor Advertisement message.
- ndp_
lookup - Look up a neighbor’s MAC address in the NDP cache.
- ndp_
router_ solicit - Build a Router Solicitation message.
- ndp_
solicit - Build a Neighbor Solicitation message.
- parse_
ipv6 - Parse an IPv6 packet from raw bytes.
- process_
packet - Process an incoming IPv6 packet (dispatched from the Ethernet layer).
- select_
source_ address - Get the source address appropriate for a given destination.
- send
- Send an IPv6 packet.
- solicited_
node_ multicast - Compute the solicited-node multicast address for a given unicast address.
- tick
- Advance the NDP tick counter (called periodically by timer)