How kilop206/kns works
KNS is a deterministic discrete-event network simulator with GUI and headless entry points. Users load or edit a topology, configure a run, and execute simulated packet and TCP traffic; the engine applies routing, links, queues, services, and events, then exposes statistics or CSV output. The desktop app also provides topology discovery/editing, route and packet inspection, analysis, and optional conversational analysis and translation. Some UI subsystems are represented by their source directories because their implementation excerpts were not provided; edges rely on README statements or indexed references.
Main entry points: SimulationEngine.cpp Simulation engine · src GUI panels · main.cpp Application runner · Topology.cpp Topology model
Components 21
Application entry
- Application runner
app/main.cpp - Device CLI
app/cli/DeviceConsole.cpp
Topology and discovery
- Topology loader
core/src/network/TopologyLoader.cpp - Topology model
core/src/network/Topology.cpp - Live discovery
core/src/network/LiveTopologyWatcher.cpp - Topology Hub
app/hub/TopologyHubClient.cpp
Simulation runtime
- Simulation engine
core/src/engine/core/SimulationEngine.cpp - Route selection
core/src/network/Routing.cpp - Link behavior
core/src/network/Link.cpp - Event processing
core/src/engine/core/EventQueue.cpp - TCP transport
core/src/network/transport/tcp/TCPSession.cpp - Simulated services
core/src/network/services/ServiceRuntime.cpp
Analysis and services
- Network analysis
core/src/analysis/NetworkAnalyzer.cpp - Topology intelligence
app/intelligence/IntelligenceService.cpp
Desktop experience
- GUI panels
app/gui/src - Packet visualization
app/gui/src/VisualPacketManager.cpp - GUI translation
app/gui/src/TranslationService.cpp
Other components
- Operator
- KiWi service
- Translation API
- CSV results
Connections 26
- Operator → Application runner: runs
README.md - Application runner → Topology loader: loads topology
README.md - Application runner → Topology Hub: fetches or saves
app/main.cpp - Application runner → Simulation engine: configures and runs
app/main.cpp - Application runner → GUI panels: opens interface
README.md - Application runner → CSV results: exports statistics
README.md - Device CLI → Simulation engine: operates devices
- Topology loader → Topology model: creates topology
- Topology Hub → Topology loader: parses topology
app/hub/TopologyHubClient.cpp - GUI panels → Topology model: edits topology
README.md - GUI panels → Live discovery: shows discovery
README.md - Simulation engine → Topology model: uses topology
- Simulation engine → Route selection: builds routes
- Route selection → Topology model: reads links
core/src/network/Routing.cpp - Simulation engine → Link behavior: sends packets
- Simulation engine → Event processing: processes events
- Simulation engine → TCP transport: manages sessions
- Simulation engine → Simulated services: hosts runtime
- GUI panels → Simulation engine: configures simulation
README.md - GUI panels → Packet visualization: observes packets
- GUI panels → Network analysis: requests analysis
- Network analysis → Topology intelligence: provides context
- Topology intelligence → KiWi service: sends chat
README.md - GUI panels → GUI translation: requests translations
- GUI translation → Translation API: translates asynchronously
README.md - GUI panels → Device CLI: offers device CLI
README.md