# fastos/tcpdive architecture

> Architecture diagram of the GitHub repository fastos/tcpdive, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/fastos/tcpdive
- Repository: https://github.com/fastos/tcpdive

## Overview

tcpdive profiles live Linux TCP traffic with SystemTap, producing per-connection indicators across transmission, loss and retransmission, congestion control, and HTTP processing. Users can run the service or invoke the flexible script with selected modules and filters. The README documents these capabilities, but no source excerpts were provided, so internal calls and dispatch among the scripts are not asserted; auxiliary probes are shown as components without inferred connections.

Main entry points: [`tcpdive.sh`](https://github.com/fastos/tcpdive/blob/master/tcpdive.sh) (Profiling Runner), [`script/tcpdive`](https://github.com/fastos/tcpdive/blob/master/script/tcpdive) (Service Control), [`src/send.stp`](https://github.com/fastos/tcpdive/blob/master/src/send.stp) (Transmission), [`src/retrans.stp`](https://github.com/fastos/tcpdive/blob/master/src/retrans.stp) (Loss and Retransmission)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_operation["Operation"]
  node_service["Service Control"]
  node_runner["Profiling Runner<br/>[tcpdive.sh]"]
end

subgraph group_transport["TCP Profiling"]
  node_transmission["Transmission<br/>[send.stp]"]
  node_receive["Receive<br/>[recv.stp]"]
end

subgraph group_analysis["Analysis Dimensions"]
  node_retransmission["Loss and Retransmission<br/>[retrans.stp]"]
  node_congestion["Congestion Control<br/>[congestion.stp]"]
  node_http["HTTP Processing<br/>[http.stp]"]
end

subgraph group_support["Supporting Probes"]
  node_connection["Connection State<br/>[estab.stp]"]
  node_close["Connection Close<br/>[close.stp]"]
  node_reset["Reset Events<br/>[reset.stp]"]
  node_rtt["RTT Probes<br/>[rtt.stp]"]
  node_options["TCP Options<br/>[options.stp]"]
  node_memory["Memory Probes<br/>[memory.stp]"]
  node_shared["Shared Probes<br/>[share.stp]"]
  node_structures["TCP Structures<br/>[structs.stp]"]
end

node_user(("Operator"))
node_systemtap["SystemTap Runtime"]

node_user -->|"controls"| node_service
node_user -->|"invokes"| node_runner
node_runner -.->|"runs with"| node_systemtap
node_runner -.->|"selects modules"| node_transmission
node_runner -.->|"selects modules"| node_retransmission
node_runner -.->|"selects modules"| node_congestion
node_runner -.->|"selects modules"| node_http

click node_service "https://github.com/fastos/tcpdive/blob/master/script/tcpdive"
click node_runner "https://github.com/fastos/tcpdive/blob/master/tcpdive.sh"
click node_transmission "https://github.com/fastos/tcpdive/blob/master/src/send.stp"
click node_receive "https://github.com/fastos/tcpdive/blob/master/src/recv.stp"
click node_retransmission "https://github.com/fastos/tcpdive/blob/master/src/retrans.stp"
click node_congestion "https://github.com/fastos/tcpdive/blob/master/src/congestion.stp"
click node_http "https://github.com/fastos/tcpdive/blob/master/src/http.stp"
click node_connection "https://github.com/fastos/tcpdive/blob/master/src/estab.stp"
click node_close "https://github.com/fastos/tcpdive/blob/master/src/close.stp"
click node_reset "https://github.com/fastos/tcpdive/blob/master/src/reset.stp"
click node_rtt "https://github.com/fastos/tcpdive/blob/master/src/rtt.stp"
click node_options "https://github.com/fastos/tcpdive/blob/master/src/options.stp"
click node_memory "https://github.com/fastos/tcpdive/blob/master/src/memory.stp"
click node_shared "https://github.com/fastos/tcpdive/blob/master/src/share.stp"
click node_structures "https://github.com/fastos/tcpdive/blob/master/src/structs.stp"

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_service,node_runner toneBlue
class node_transmission,node_receive toneAmber
class node_retransmission,node_congestion,node_http toneMint
class node_connection,node_close,node_reset,node_rtt,node_options,node_memory,node_shared,node_structures toneRose
class node_user,node_systemtap toneIndigo
```

## Components

### Operation

- [Service Control](https://github.com/fastos/tcpdive/blob/master/script/tcpdive): `script/tcpdive`
- [Profiling Runner](https://github.com/fastos/tcpdive/blob/master/tcpdive.sh): `tcpdive.sh`

### TCP Profiling

- [Transmission](https://github.com/fastos/tcpdive/blob/master/src/send.stp): `src/send.stp`
- [Receive](https://github.com/fastos/tcpdive/blob/master/src/recv.stp): `src/recv.stp`

### Analysis Dimensions

- [Loss and Retransmission](https://github.com/fastos/tcpdive/blob/master/src/retrans.stp): `src/retrans.stp`
- [Congestion Control](https://github.com/fastos/tcpdive/blob/master/src/congestion.stp): `src/congestion.stp`
- [HTTP Processing](https://github.com/fastos/tcpdive/blob/master/src/http.stp): `src/http.stp`

### Supporting Probes

- [Connection State](https://github.com/fastos/tcpdive/blob/master/src/estab.stp): `src/estab.stp`
- [Connection Close](https://github.com/fastos/tcpdive/blob/master/src/close.stp): `src/close.stp`
- [Reset Events](https://github.com/fastos/tcpdive/blob/master/src/reset.stp): `src/reset.stp`
- [RTT Probes](https://github.com/fastos/tcpdive/blob/master/src/rtt.stp): `src/rtt.stp`
- [TCP Options](https://github.com/fastos/tcpdive/blob/master/src/options.stp): `src/options.stp`
- [Memory Probes](https://github.com/fastos/tcpdive/blob/master/src/memory.stp): `src/memory.stp`
- [Shared Probes](https://github.com/fastos/tcpdive/blob/master/src/share.stp): `src/share.stp`
- [TCP Structures](https://github.com/fastos/tcpdive/blob/master/src/structs.stp): `src/structs.stp`

### Other components

- **Operator**
- **SystemTap Runtime**

## Connections

- Operator → Service Control: controls (evidence: `README.md`)
- Operator → Profiling Runner: invokes (evidence: `README.md`)
- Profiling Runner → SystemTap Runtime: runs with
- Profiling Runner → Transmission: selects modules
- Profiling Runner → Loss and Retransmission: selects modules
- Profiling Runner → Congestion Control: selects modules
- Profiling Runner → HTTP Processing: selects modules
