|
ProtoCore v0.0.2
Deterministic, zero-heap network stack for embedded targets
|
Dual-stack destination selection + Happy Eyeballs fallback (PC_ENABLE_HAPPY_EYEBALLS). More...
#include "network_drivers/network/ip.h"#include "protocore_config.h"#include <stddef.h>#include <stdint.h>Go to the source code of this file.
Dual-stack destination selection + Happy Eyeballs fallback (PC_ENABLE_HAPPY_EYEBALLS).
On a dual-stack device (PC_ENABLE_IPV6), an outbound connection often has both IPv6 and IPv4 candidate addresses for the same host. RFC 8305 (Happy Eyeballs v2) says: sort them by RFC 6724 preference, interleave the families so you do not try every IPv6 before any IPv4, then start connection attempts staggered by a short "Connection Attempt Delay" and take whichever connects first. That gives fast IPv6 when it works and a quick fallback to IPv4 when it does not.
This is the pure decision layer on top of the shipped pc_ip: a preference score, the ordering + family interleave over a candidate list, and the attempt-delay gate. The app owns the sockets and the DNS; this owns which address to try next, and when. No heap, no stdlib, host-testable.
Definition in file happy_eyeballs.h.