⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

Module ipv6

Module ipv6 

Source
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§

DualStackConfig
Dual-stack network configuration
Ipv6Header
IPv6 packet header (40 bytes fixed)
Ipv6InterfaceAddr
IPv6 interface address with prefix length and scope
Ipv6State
Complete IPv6 subsystem state
Ipv6Stats
IPv6 statistics
NdpCache
NDP neighbor cache
NdpEntry
NDP neighbor cache entry

Enums§

Ipv6Scope
IPv6 address scope
NdpState
NDP neighbor cache entry state (RFC 4861 Section 7.3.2)

Constants§

DEFAULT_HOP_LIMIT
Default hop limit (equivalent to IPv4 TTL)
ETHERTYPE_IPV6
EtherType for IPv6
ICMPV6_NEIGHBOR_ADVERT
ICMPV6_NEIGHBOR_SOLICIT
ICMPV6_REDIRECT
ICMPV6_ROUTER_ADVERT
ICMPV6_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_ICMPV6
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)