# dzaleskis/ripv1-routing-simulation architecture

> Architecture diagram of the GitHub repository dzaleskis/ripv1-routing-simulation, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dzaleskis/ripv1-routing-simulation
- Repository: https://github.com/dzaleskis/ripv1-routing-simulation

## Overview

RIP is a small RIPv1 routing simulator: the console program creates routers, configures neighbors, starts their routing loops, and accepts commands to start, stop, or print a router’s table. Each router exchanges routing packets over loopback UDP and maintains expiring route entries. The excerpts show the startup, request-generation, and storage relationships; omitted Router.cs sections limit confidence about the receive-to-route-update dispatch.

Main entry points: [`Router.cs`](https://github.com/dzaleskis/ripv1-routing-simulation/blob/master/Router.cs) (Router lifecycle), [`Program.cs`](https://github.com/dzaleskis/ripv1-routing-simulation/blob/master/Program.cs) (Simulation controller), [`ExpirableList.cs`](https://github.com/dzaleskis/ripv1-routing-simulation/blob/master/ExpirableList.cs) (Expiring list)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Simulator runtime"]
  node_program["Simulation controller<br/>[Program.cs]"]
end

subgraph group_routing["Routing"]
  node_router["Router lifecycle<br/>[Router.cs]"]
  node_protocol["UDP packet exchange<br/>[Router.cs]"]
end

subgraph group_state["Route state"]
  node_route_table["Route table<br/>[Router.cs]"]
  node_expirable_list["Expiring list<br/>[ExpirableList.cs]"]
end

node_operator(("Console operator"))
node_peer_routers["Neighbor routers"]

node_operator -->|"enters commands"| node_program
node_program -->|"creates and controls"| node_router
node_router -->|"starts exchange"| node_protocol
node_protocol -->|"sends UDP packets"| node_peer_routers
node_peer_routers -->|"sends UDP packets"| node_protocol
node_router -->|"maintains routes"| node_route_table
node_router -->|"constructs table storage"| node_expirable_list
node_route_table -->|"stores entries"| node_expirable_list

click node_program "https://github.com/dzaleskis/ripv1-routing-simulation/blob/master/Program.cs"
click node_router "https://github.com/dzaleskis/ripv1-routing-simulation/blob/master/Router.cs"
click node_protocol "https://github.com/dzaleskis/ripv1-routing-simulation/blob/master/Router.cs"
click node_route_table "https://github.com/dzaleskis/ripv1-routing-simulation/blob/master/Router.cs"
click node_expirable_list "https://github.com/dzaleskis/ripv1-routing-simulation/blob/master/ExpirableList.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_program toneBlue
class node_router,node_protocol toneAmber
class node_route_table,node_expirable_list,node_peer_routers toneMint
class node_operator toneIndigo
```

## Components

### Simulator runtime

- [Simulation controller](https://github.com/dzaleskis/ripv1-routing-simulation/blob/master/Program.cs): `Program.cs`

### Routing

- [Router lifecycle](https://github.com/dzaleskis/ripv1-routing-simulation/blob/master/Router.cs): `Router.cs`
- [UDP packet exchange](https://github.com/dzaleskis/ripv1-routing-simulation/blob/master/Router.cs): `Router.cs`

### Route state

- [Route table](https://github.com/dzaleskis/ripv1-routing-simulation/blob/master/Router.cs): `Router.cs`
- [Expiring list](https://github.com/dzaleskis/ripv1-routing-simulation/blob/master/ExpirableList.cs): `ExpirableList.cs`

### Other components

- **Console operator**
- **Neighbor routers**

## Connections

- Console operator → Simulation controller: enters commands (evidence: `Program.cs`)
- Simulation controller → Router lifecycle: creates and controls (evidence: `Program.cs`)
- Router lifecycle → UDP packet exchange: starts exchange (evidence: `Router.cs`)
- UDP packet exchange → Neighbor routers: sends UDP packets (evidence: `Router.cs`)
- Neighbor routers → UDP packet exchange: sends UDP packets (evidence: `Router.cs`)
- Router lifecycle → Route table: maintains routes (evidence: `Router.cs`)
- Router lifecycle → Expiring list: constructs table storage (evidence: `Router.cs`)
- Route table → Expiring list: stores entries (evidence: `Router.cs`)
