Files
RedBear-OS/netstack
Red Bear OS 2b278390ee tun: wire TUN scheme into event loop + SLAAC RS/RA protocol
TUN integration:
- Smolnetd gains tun_scheme: TunScheme field and tun_file parameter
- on_tun_scheme_event() handler added (scheme event → poll)
- main.rs: EventSource::TunScheme, subscription, dispatch
- TUN devices can now receive and transmit packets through the netstack

SLAAC (RFC 4862):
- build_router_solicitation(): ICMPv6 Type 133 with source LL address option
- parse_router_advertisement(): ICMPv6 Type 134 with Prefix Information
  option extraction (on-link, autonomous, lifetimes)
- Slacd state machine: Idle → Solicited → Configured
  tick() drives RS retransmit (3 retries, 5s timeout)
  process_ra() extracts autonomous /64 prefixes
- ParsedRa, RaPrefix public structs for integration with IPv6 stack

Reference: Linux 7.1 ndisc_send_rs() / ndisc_router_discovery() /
addrconf_prefix_rcv()
2026-07-08 13:47:04 +03:00
..