Files
RedBear-OS/local/docs/evidence/round-17-network-stack-tier-a-b.md
T
vasilito 2fc6b9f952 libredox: bump submodule pointer + add round 17 evidence file
libredox: pulls in d6b223d (revert O_CLOEXEC to literal in protocol
module — fixes standalone build). Per upstream
isn't accessible in standalone contexts; restoring the literal constant
restores cross-compile parity with the cookbook's prefix environment.

The relibc fork already imports  etc. via the full
syscall crate path, so this reversion does not affect the relibc-side
accept4 changes in commit 1fb16386.

local/docs/evidence/round-17-network-stack-tier-a-b.md:
Evidence log for Round 17 network stack work (commits 1fb16386 +
5b470b98a8). Records:
  - 10-file relibc fork diff (+1117/-160)
  - doc updates that landed concurrently in aa12991053
  - pre-existing P0 defects confirmed resolved in prior sessions
  - pre-existing errors and stale files left as-is per session contract
  - verification status (cargo check passes modulo ld_so errors)
2026-07-27 23:17:12 +09:00

3.8 KiB

Round 17 — Network Stack Tier A + B Implementation

Status: COMPLETE — pushed to gitea.redbearos.org

Commits

Repo Commit Note
submodule/relibc 1fb16386 (pushed to origin/submodule/relibc) 10 files, +1117/-160 — IPv6 inet_ntop, netinet/ip.h, getaddrinfo hints, FIONREAD, accept4
0.3.1 5b470b98a8 (pushed to origin/0.3.1) Submodule pointer bump

Code Changes (relibc fork)

File Change Tests
src/header/arpa_inet/mod.rs inet_ntop IPv6 with RFC 5952 longest-run :: compression + tie-break 9 tests
src/header/netinet_ip/mod.rs Populated 3-line stub with full IP_OPTIONS/IP_PKTINFO/IP_RECVERR/IP_PMTUDISC_* + struct ip (BSD) + struct iphdr (Linux) 5 tests
src/header/netinet_ip/cbindgen.toml Export configuration for ip + iphdr
src/header/netdb/lookup.rs AAAA DNS query type (0x001c), shared lookup_host_query, lookup_host_v6, parse_ipv6_string delegating to inet_pton (tested via getaddrinfo)
src/header/netdb/mod.rs Full POSIX getaddrinfo hints: family/socktype/protocol filtering, AI_NUMERICHOST (v4+v6), AI_NUMERICSERV (numeric + getservbyname fallback), AI_PASSIVE, AI_CANONNAME, AI_V4MAPPED with IPv4-mapped-IPv6 synthesis, AF_INET6 with sockaddr_in6 entries 9 tests
src/header/sys_ioctl/redox/mod.rs FIONREAD wired via dup_read + ENOTTY on unsupported schemes
src/header/sys_socket/mod.rs Public accept4 C wrapper
src/platform/pal/socket.rs accept4 in PalSocket trait
src/platform/linux/socket.rs Native __NR_accept4 (288 on x86_64, 242 on aarch64) via sc::syscall5 + EINVAL on unknown flags
src/platform/redox/socket.rs accept4 = accept() + fcntl() (race documented)

Doc Updates (parent repo)

These were already committed by a concurrent process in aa12991053 (docs: extend legacy-obsolete reference repair):

  • local/docs/SUPERSEDED-DOC-LOG.md — Round 17 entries (8 fixes + 8 audit findings)
  • local/docs/NETWORKING-AND-DRIVERS-SYSTEMATIC-ASSESSMENT-2026-07-27.md — §6.1 status column updated for all 12 P0 defects; §1.4 Top P0 Recommendations updated with Round 17 entries P0-11..P0-15

Pre-existing errors not in scope

Three ld_so errors remain in working tree:

  • src/ld_so/dso.rs:1130,1205Err(format!(...)) type mismatch (used to be valid, now Error::from_str needs newtype wrapping)
  • src/ld_so/linker.rs:446Some(id) => return Ok(*id) where id: usize should be Arc<DSO>

These were broken before this round and are unrelated to the network stack.

Stale / unmerged files (not my work)

Working tree has unmerged files from prior sessions:

  • local/recipes/kde/kf6-kcmutils/recipe.toml (UU)
  • prefix/x86_64-unknown-redox/{clang,gcc,rust}-install.tar.gz (UU)

Left as-is per session contract (do not touch others' work).

What was achieved (no stubs, all real code)

  • 6 NEW real implementations added to the Red Bear relibc fork
  • 5 of 12 P0 defects identified by the systematic assessment confirmed already resolved in prior sessions (DEF-P0-3, DEF-P0-6, DEF-P0-7, DEF-P0-8, DEF-P0-10, DEF-P0-11)
  • 5 NEW P0 recommendations addressed (P0-11..P0-15)
  • 23 unit tests added across the affected modules
  • Code passes cargo check --lib --tests modulo pre-existing ld_so errors

Known limitations

  • cbindgen output can't be verified directly (cbindgen crashes on unrelated GnuHashHeader issue in relibc's other modules)
  • Build system verification via ./local/scripts/build-redbear.sh redbear-mini was NOT executed — per AGENTS.md "DO NOT run repo cook/make live directly" + the canonical build was deferred to the operator
  • Hardware validation deferred per HARDWARE-NETWORKING-INVENTORY.md Tier D (LG Gram USB-C dongle, Threadripper NIC inventory)