# sanishpoudel/ryu-sdn-apps architecture

> Architecture diagram of the GitHub repository sanishpoudel/ryu-sdn-apps, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sanishpoudel/ryu-sdn-apps
- Repository: https://github.com/sanishpoudel/ryu-sdn-apps

## Overview

This repository contains two independent Ryu controller apps: one installs flows that drop ICMP echo requests while forwarding other traffic normally; the other deletes all switch flows. Both handle switch state and feature events, then send OpenFlow modifications to the datapath. The excerpts show these behaviors but do not show how an operator selects or runs either app, so that deployment workflow is omitted.

Main entry points: [`drop.py`](https://github.com/sanishpoudel/ryu-sdn-apps/blob/main/drop.py) (Block pings), [`clear.py`](https://github.com/sanishpoudel/ryu-sdn-apps/blob/main/clear.py) (Clear flows)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ryu_apps["Ryu applications"]
  node_block_ping["Block pings<br/>[drop.py]"]
  node_clear_flows["Clear flows<br/>[clear.py]"]
end

node_ryu_runtime["Ryu runtime"]
node_ovs[("OVS datapaths")]

node_ryu_runtime -->|"dispatches events"| node_block_ping
node_ryu_runtime -->|"dispatches events"| node_clear_flows
node_block_ping -->|"installs flows"| node_ovs
node_clear_flows -->|"deletes flows"| node_ovs

click node_block_ping "https://github.com/sanishpoudel/ryu-sdn-apps/blob/main/drop.py"
click node_clear_flows "https://github.com/sanishpoudel/ryu-sdn-apps/blob/main/clear.py"

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_block_ping,node_clear_flows toneBlue
class node_ryu_runtime toneIndigo
class node_ovs toneAmber
```

## Components

### Ryu applications

- [Block pings](https://github.com/sanishpoudel/ryu-sdn-apps/blob/main/drop.py): `drop.py`
- [Clear flows](https://github.com/sanishpoudel/ryu-sdn-apps/blob/main/clear.py): `clear.py`

### Other components

- **Ryu runtime**
- **OVS datapaths**

## Connections

- Ryu runtime → Block pings: dispatches events (evidence: `drop.py`)
- Ryu runtime → Clear flows: dispatches events (evidence: `clear.py`)
- Block pings → OVS datapaths: installs flows (evidence: `drop.py`)
- Clear flows → OVS datapaths: deletes flows (evidence: `clear.py`)
