How scionproto/scion works
SCION is an implementation of a next-generation network architecture for controlled, failure-isolated communication with explicit trust. The user-facing flow is an application using the SCION client/network APIs to send traffic; the daemon supplies path and service information, while routers forward packets and control services distribute routing information. The repository also includes a gateway for IP connectivity and scion-pki tools for certificate/TRC operations. The sampled source shows daemon assembly and engine responsibilities, plus gateway engine replacement; several cross-service links are architectural rather than verified calls.
Main entry points: control/main.go Control service · server.go Daemon gRPC API · engine.go Daemon engine · router/main.go SCION router
Components 21
Host connectivity
- SCION CLI
scion/cmd/scion/main.go - SCION networking
pkg/snet/snet.go - Daemon service
daemon/cmd/daemon/main.go - Daemon gRPC API
daemon/grpc/server.go - Daemon engine
pkg/daemon/private/engine/engine.go
Control plane
- Control service
control/cmd/control/main.go - Beaconing
control/beaconing/handler.go - Segment handling
private/segment/seghandler/seghandler.go - Segment storage
private/segment/seghandler/storage.go - DRKey service
control/drkey/service_engine.go
Packet forwarding
- SCION router
router/cmd/router/main.go - Router dataplane
router/dataplane.go - Packet dispatcher
dispatcher/cmd/dispatcher/main.go
IP gateway
- Gateway service
gateway/cmd/gateway/main.go - Session controller
gateway/control/enginecontroller.go - Forwarding engine
gateway/control/engine.go - Gateway dataplane
gateway/dataplane/worker.go
Trust and storage
- Persistent storage
private/storage/storage.go - Trust engine
private/trust/engine.go - PKI tools
scion-pki/cmd/scion-pki/main.go
Other components
- Application
Connections 15
- Application → SCION networking: sends traffic
README.md - SCION CLI → Application: provides commands
scion/cmd/scion/main.go - Daemon service → Daemon gRPC API: registers API
daemon/cmd/daemon/main.go - Daemon gRPC API → Daemon engine: delegates requests
daemon/grpc/server.go - Daemon engine → Control service: fetches paths
- Control service → Beaconing: runs beaconing
control/cmd/control/main.go - Control service → DRKey service: configures DRKey
control/cmd/control/main.go - Segment handling → Segment storage: stores segments
private/segment/seghandler/storage.go - Control service → Persistent storage: configures stores
- SCION router → Router dataplane: runs forwarding
- Packet dispatcher → SCION router: delivers packets
- Gateway service → Session controller: configures sessions
- Session controller → Forwarding engine: replaces engine
gateway/control/enginecontroller.go - Forwarding engine → Gateway dataplane: runs workers
- PKI tools → Trust engine: manages trust material