I am writing a jail orchestration system that includes a software defined network (SDN). I've written this about 4x now, the current version works but is not satisfactory (see this last post). I'm thinking of ditching config files entirely, and coding directly to the FreeBSD APIs...
Here's the outline:
Questions:
* What is the decision tree for when to write userland code vs a loadable kernel module (KLD)?
* What abstraction libraries exist? For instance, I saw a video recently where the author of PF mentioned a wrapper library that folks should use instead of the raw PF APIs...
* BTW - Has anyone tried implementing something like Caddy load balancer as a KLD?
Note: [cbsd](https://github.com/cbsd/cbsd) is close to what I want to build. But it doesn't have an SDN, and it's written in C...
Resources:
* Freebsd Device Drivers (Kong)
* https://github.com/ebrandi/FDD-book
Here's the outline:
Bash:
Orchestrator (gleam/erlang) -> [something] -> FreeBSD APIs
FreeBSD APIs:
* networking (ifconfig)
* firewall (pf)
* containers (jails | oci (podman))
* load balancer (currently Caddy(userland))
* file system (zfs)
* packages (pkg)
Questions:
* What is the decision tree for when to write userland code vs a loadable kernel module (KLD)?
* What abstraction libraries exist? For instance, I saw a video recently where the author of PF mentioned a wrapper library that folks should use instead of the raw PF APIs...
* BTW - Has anyone tried implementing something like Caddy load balancer as a KLD?
Note: [cbsd](https://github.com/cbsd/cbsd) is close to what I want to build. But it doesn't have an SDN, and it's written in C...
Resources:
* Freebsd Device Drivers (Kong)
* https://github.com/ebrandi/FDD-book