How modapothularajasekhar/mini-xr works
Mini-XR is a small modular network OS whose daemons publish configuration, interface, and routing state through Redis. The clearest implemented workflow is OSPF neighbor formation, topology installation, SPF/ECMP calculation, route-event publication, and RIB selection/programming. The README also describes protocol-manager and interface-manager roles; sampled code shows their Redis writes and protocol event, but does not show a complete integration between them and the RIB. OSPF subsystem paths are supported by the tree; unsampled daemon behavior is not expanded beyond documented roles.
Main entry points: redis_client.cpp Redis client · pubsub.cpp Pub/Sub client · main.cpp OSPF daemon · neighbor.cpp Neighbor FSM
Components 12
Management
- Config manager
cfgmgrd/main.cpp - Interface manager
ifmgrd/main.cpp
Routing Protocols
- Protocol manager
protod/main.cpp - OSPF daemon
ospfd/main.cpp - Neighbor FSM
ospfd/neighbor.cpp - Link-state DB
ospfd/lsdb.cpp - SPF engine
ospfd/spf.cpp
Route Management
- RIB daemon
ribd/main.cpp
Shared Infrastructure
- Redis client
common/redis_client.cpp - Pub/Sub client
common/pubsub.cpp - Logging
common/logger.cpp
Other components
- Redis service
Connections 15
- Config manager → Redis client: writes config
- Interface manager → Redis client: writes interface state
- Protocol manager → Redis client: writes route data
- Protocol manager → Pub/Sub client: publishes event
- OSPF daemon → Neighbor FSM: drives timers
- OSPF daemon → Link-state DB: installs topology
- OSPF daemon → SPF engine: runs SPF
- SPF engine → Link-state DB: reads LSAs
- OSPF daemon → Pub/Sub client: publishes routes
- Neighbor FSM → Link-state DB: updates topology
- Neighbor FSM → Pub/Sub client: withdraws routes
- RIB daemon → Pub/Sub client: subscribes events
- RIB daemon → Redis client: programs routes
- Redis client → Redis service: reads/writes keys
- Pub/Sub client → Redis service: publishes/subscribes