Provide Linux interface enumeration without getifaddrs libc bindings
- Dominant language
- Rust
- Stars
- 53
- Forks
- 16
- Avg merge
- 4h 22m
- Merged PRs (30d)
- 46
Description
The Linux interfaces provider directly calls getifaddrs, freeifaddrs, if_nametoindex and __errno_location. The public net_interfaces API therefore retains a libc link dependency and a libc-owned linked-list representation behind its accessors. Linux already exposes native interface information through kernel APIs, so this provider can be implemented within the intended libc-free sys layer.
This is separate from the page-size and vectored I/O dependencies: enumeration has its own message parsing, interface identity and resource ownership requirements.
Code evidence:
- [std/sys/linux/interfaces.wave:13](https://github.com/wavefnd/Wave/blob/ea74c2dafc31da876e5561f2d176ba719f5a0458/std/sys/linux/interfaces.wave#L13)
- [std/sys/linux/interfaces.wave:18](https://github.com/wavefnd/Wave/blob/ea74c2dafc31da876e5561f2d176ba719f5a0458/std/sys/linux/interfaces.wave#L18)
- [std/net/interface.wave:40](https://github.com/wavefnd/Wave/blob/ea74c2dafc31da876e5561f2d176ba719f5a0458/std/net/interface.wave#L40)
Acceptance:
- [ ] Use native Linux interface queries, such as a correctly handled rtnetlink dump, without getifaddrs/freeifaddrs/if_nametoindex/__errno_location references.
- [ ] Preserve interface index, name, flags, IPv4/IPv6 addresses and IPv6 scope information exposed by the current API.
- [ ] Handle multipart replies, truncation, interrupted dumps and malformed lengths without returning a successful incomplete snapshot.
- [ ] Exercise zero/small output capacities and repeated enumeration with bounded allocation and fd cleanup.
- [ ] Add a no-libc link/execution fixture for the public enumeration path on supported Linux targets.
Reference: [getifaddrs library ownership and implementation context](https://man7.org/linux/man-pages/man3/getifaddrs.3.html). Related #515 and #551 cover different native providers; #378 tracks capabilities.
Audit status: static source inspection against canonical master `ea74c2dafc31da876e5561f2d176ba719f5a0458` on 2026-09-10. No compiler build, test execution, implementation change or local reproduction was performed for this report. The examples describe the source-derived behavior to verify when implementing the fix.
Contributor guide
Research direction
Read std/sys/linux/interfaces.wave and std/net/interface.wave first, then inspect the existing provider's ownership and public API behavior. Verify a native Linux query path against the acceptance cases: multipart, truncated and malformed replies, preserved interface fields, bounded repeated enumeration, descriptor cleanup, and no-libc execution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux
- Domain
- networking, operating-systems
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100