projects/miragesdk/roadmap.md
|=================| |================|
| priv | | calf |
|=================| |================|
| | | |
<-- eth0 ---> | BPF rules | <--- network IO ---> | type-safe |
| | (data path) | network stack |
| | | |
|-----------------| |----------------|
| | | |
<-- logs ----- | | <------- logs ------ | type-safe |
| | | protocol logic |
<-- metrics -- | | <----- metrics ----- | |
| | | |
|-----------------| |----------------|
| | | |
<-- audit --- | config store | <----- KV store ---> | config store |
diagnostic | daemon | (control path) | client |
| | | |
|_________________| |________________|
| |
<-- sycalls -- | |
| |
| system handlers |
<-- config --- | |
files | |
|_________________|
The privileged system service forwards DHCP traffic in both directions and block all other traffic. This is ensured by setting up BPF filters on the network interface.
The privileged system service initialize the calf by opening the file
descriptors for the control and data paths and calling runc.
The privileged system service exposes a simple KV store to the calf, using the following keys:
# read-only, set on startup by the priv
/mac
# write-only, set by the calf when it gots a lease
/ip
/gateway
/mtu
/domain
/search
/nameserver/001
...
/nameserver/xxx
The the KV store API is defined in term of cap-n-proto prototype:
@0x9e83562906de8259;
struct Request {
id @0 :Int32;
path @1 :List(Text);
union {
write @2 :Data;
read @3 :Void;
delete @4 :Void;
}
}
struct Response {
id @0: Int32;
union {
ok @1 :Data;
error @2 :Data;
}
}
The privileged system service installs the following system handlers:
The privileged system service updates configuration files:
What the SDK should enable:
See ./src/sdk for the current state of the SDK.
TODO