How lschulz/scion-cpp works
SCION-CPP is a C++ SDK for SCION applications, with C bindings and two compatibility products: a libc interposer and the Scitra IP translator. The principal SDK workflow is an application using SCION addressing and name resolution, obtaining paths, then communicating through SCION sockets; path handling, packet formats, SCMP, and ID-INT support that workflow. The README establishes the major capabilities and product boundaries, while several implementation links below are dashed because the relevant source was not sampled.
Main entry points: scion.cpp C Bindings · interposer.cpp Libc Interposer · scitra_tun.cpp Scitra TUN · resolver.cpp Name Resolution
Components 20
SCION SDK
- Name Resolution
src/resolver.cpp - Daemon Client
src/daemon/client.cpp - SCION Sockets
include/scion/asio/udp_socket.hpp - SCMP Handling
include/scion/scmp/handler.hpp - Path MTU
include/scion/scmp/path_mtu.hpp - ID-INT Telemetry
src/extensions/idint.cpp - DRKey Support
include/scion/drkey/drkey.hpp - C Bindings
src/scion_c/scion.cpp
Application Compatibility
- Libc Interposer
interposer/src/interposer.cpp - Path Selection
interposer/src/builtin_selector.cpp - Interposer API
interposer/include/scion/path_selector.h
IP Translation
- Scitra Translator
scitra/src/translator.cpp - Scitra TUN
scitra/src/scitra-tun/scitra_tun.cpp - scion2ip Tool
scitra/tools/scion2ip/src/scion2ip.cpp - Service Notifications
scitra/src/scitra-tun/service_systemd.cpp
Shared Internals
- SCION Addresses
include/scion/addr/address.hpp - Path Handling
include/scion/path/raw.hpp - Packet Formats
include/scion/hdr/scion.hpp
Other components
- SCION Application
- Operating System
Connections 20
- SCION Application → Name Resolution: resolves names
- SCION Application → SCION Sockets: uses sockets
- SCION Application → C Bindings: uses bindings
- Name Resolution → SCION Addresses: returns addresses
- Daemon Client → Path Handling: builds paths
src/daemon/client.cpp - SCION Sockets → SCMP Handling: dispatches SCMP
include/scion/asio/udp_socket.hpp - Path Handling → Packet Formats: encodes path
include/scion/path/raw.hpp - SCMP Handling → Path MTU: chains handlers
- SCION Application → ID-INT Telemetry: uses telemetry
- SCION Application → DRKey Support: requests keys
- SCION Application → Libc Interposer: uses transparently
- Libc Interposer → Path Selection: filters paths
interposer/src/interposer.cpp - Libc Interposer → Interposer API: invokes selector
- SCION Application → Scitra TUN: uses legacy IP
- Scitra TUN → Scitra Translator: translates traffic
- SCION Application → scion2ip Tool: runs conversion
- Scitra TUN → Service Notifications: reports status
- Service Notifications → Operating System: notifies service
scitra/src/scitra-tun/service_systemd.cpp - C Bindings → SCION Sockets: wraps sockets
src/scion_c/scion.cpp - C Bindings → Name Resolution: initializes resolver
src/scion_c/scion.cpp