Skip to content

Add freebsd userland platform#715

Draft
CvvT wants to merge 38 commits intomainfrom
weiteng/freebsd
Draft

Add freebsd userland platform#715
CvvT wants to merge 38 commits intomainfrom
weiteng/freebsd

Conversation

@CvvT
Copy link
Copy Markdown
Contributor

@CvvT CvvT commented Mar 11, 2026

We used to have freebsd userland platform but was removed while undergoing drastic changes of platform interfaces. Now that we have more stable interfaces and with the help of agents, we should be able to maintain one more platform. This PR is drafted by agent based on our previous implementation.

@CvvT CvvT added the must-not-merge:prototype An experimental/proof-of-concept PR that must not be merged. label Mar 11, 2026
@CvvT CvvT closed this Mar 11, 2026
weiteng chen and others added 4 commits March 11, 2026 22:01
This is a purely-userland platform implementation (like Linux and Windows
userland) that requires std, so it should be excluded from the no_std
confirmation check.
@CvvT CvvT reopened this Mar 11, 2026
CvvT added 11 commits March 30, 2026 11:43
On FreeBSD, opening /dev/tunN resets the interface configuration. This
adds programmatic IP configuration via socket ioctls (SIOCSIFADDR,
SIOCSIFDSTADDR, SIOCSIFNETMASK, SIOCSIFFLAGS) after opening the TUN
device, so tests get a properly configured interface.

- Add Socket syscall number to FreeBSD syscall table
- Add ioctl constants and structs (SockaddrIn, IfReq) for interface config
- Add configure_tun_interface() that applies IP config via ioctls
- Change FreeBSDUserland::new() to accept TunConfig instead of bare name
- Re-export TunConfig from litebox_platform_multiplex
- Update test code to construct TunConfig on FreeBSD
@github-actions
Copy link
Copy Markdown

🤖 SemverChecks 🤖 No breaking API changes detected

Note: this does not mean API is unchanged, or even that there are no breaking changes; simply, none of the detections triggered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

must-not-merge:prototype An experimental/proof-of-concept PR that must not be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant