Red Bear OS
ff66b96266
observer: packet capture facility (tcpdump-like) via netcfg
...
Adds packet observer with ring buffer (256 packets default):
- Observer::capture(packet) hooks into forwarding/output paths
- AtomicBool enable/disable toggle (no capture overhead when off)
- capture/count: live stats (total captured, buffered, enabled)
- capture/read: drain hex dump of buffered packets
- capture/enable|disable: toggle capture on/off
Usage:
echo > /scheme/netcfg/capture/enable # start capture
cat /scheme/netcfg/capture/read # dump captured packets (hex)
cat /scheme/netcfg/capture/count # stats
echo > /scheme/netcfg/capture/disable # stop
Mirrors Linux AF_PACKET + tcpdump facility.
2026-07-08 16:12:15 +03:00
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
Red Bear OS
bb3e36e4e0
restore: networking stack files from reflog (Phases 1-6)
...
Recovered from reflog commits 1c80937e and d0ecc067 after force-push data loss.
Includes: filter/, icmp_error.rs, slaac.rs, bond.rs, bridge.rs, gre.rs, ipip.rs,
qdisc.rs, tun.rs, vlan.rs, vxlan.rs, netfilter.rs, tun.rs, conntrack.rs, nat.rs,
rule.rs, table.rs, redbear-ufw/, dhcpv6d/, netdiag/ — 39 files total.
2026-07-08 13:27:49 +03:00