Per NETWORKING-AND-DRIVERS-CODE-ASSESSMENT-2026-07-27.md §15
Tier A + Tier B quick wins (Q3/Q4/Q5/Q6/Q2):
- arpa_inet::inet_ntop: add IPv6 branch (RFC 5952). Real
longest-run '::' compression with tie-break; rejects
AFs other than INET/INET6; proper ENOSPC on size<46.
9 unit tests cover unspecified, loopback, routable,
link-local, no-compression, tie-break, trailing-run,
size-too-small, and unsupported-family cases.
- netinet_ip: populate the 3-line skeleton with the
glibc netinet/ip.h constant set (IP_OPTIONS, IP_TTL,
IP_HDRINCL, IP_RECVOPTS, IP_RECVDSTADDR, IP_PKTINFO,
IP_RECVPKTINFO, IP_MINTTL, IP_RECVERR, IP_DONTFRAG,
IP_PMTUDISC_*, IP_BOUND_IF, IP_ORIGDSTADDR, etc.) plus
struct ip (BSD) and struct iphdr (Linux) and four
accessors. 5 unit tests cover roundtrip / alignment /
constant values / PMTUDISC distinctness.
- netdb::lookup: add lookup_host_v6 (AAAA DNS query type
0x001c, 16-byte answer parse) and parse_ipv6_string
delegating to inet_pton(AF_INET6, ...). Shared
lookup_host_query helper for A + AAAA. lookup_host
refactored to share the query path.
- netdb::getaddrinfo: full POSIX hints implementation.
Honors ai_family (AF_UNSPEC / AF_INET / AF_INET6),
ai_socktype, ai_protocol. Validates flag combinations
(EAI_BADFLAGS for unknown bits, AI_NUMERICSERV with
no service, AI_CANONNAME with no node). Implements
AI_NUMERICHOST (v4 and v6), AI_NUMERICSERV (with
numeric and getservbyname fallback), AI_PASSIVE
(0.0.0.0 vs 127.0.0.1 default), AI_CANONNAME (sets
canonname on first emitted entry), AI_V4MAPPED
(synthesize ::ffff:a.b.c.d from A results when no
AAAA and AF_INET6 requested). Emits IPv6 entries with
proper sockaddr_in6 (16 bytes) when v6 results exist.
9 unit tests cover numeric-v4, socktype/protocol
filter, unknown-flag rejection, canonname-without-node
rejection, numerichost+unparseable, numericserv
rejection, numericserv+numeric success, IPv6 parse
roundtrip, garbage rejection, and IPv4-mapped-IPv6
construction.
- sys_ioctl::ioctl_inner: add FIONREAD handler that
attempts dup_read(fd, 'fionread', &count). Returns
ENOTTY if the scheme does not advertise a fionread
path (consistent with Linux's TIOCNOTTY behavior for
unsupported ioctls).
- PalSocket::accept4: new trait method. Linux impl uses
__NR_accept4 (288 on x86_64, 242 on aarch64) via
sc::syscall5 with EINVAL on unknown flag bits. Redox
impl falls back to accept() + fcntl() for SOCK_CLOEXEC
/ SOCK_NONBLOCK (mirrors the Linux 2.6.27 pre-syscall
situation; the race is documented). Public C-callable
accept4 added in header/sys_socket/mod.rs. Closes
the #1 gap for Qt / glib compatibility.
Three pre-existing errors in ld_so/dso.rs and ld_so/linker.rs
remain in the working tree but are unrelated to this commit.