# nasa-jpl/ion-dtn architecture

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

- Interactive diagram: https://gitdiagram.com/nasa-jpl/ion-dtn
- Repository: https://github.com/nasa-jpl/ion-dtn

## Overview

ION is NASA/JPL’s Delay/Disruption Tolerant Networking implementation. Its principal workflow is to accept application data, form and persist bundles, route and forward them across available links, and deliver them despite delay or disruption. Bundle Protocol (BP) and convergence-layer adaptors are central; LTP, CFDP, DTPC, AMS, and network management add distinct protocol and operations capabilities. The graph combines README statements with relationships visible in the supplied source index; unsampled module internals and some runtime dispatch paths are not asserted.

Main entry points: [`bpv7/include/bp.h`](https://github.com/nasa-jpl/ion-dtn/blob/integration/bpv7/include/bp.h) (BP API), [`bpv7/library/libbpP.c`](https://github.com/nasa-jpl/ion-dtn/blob/integration/bpv7/library/libbpP.c) (Bundle engine), [`ici/include/sdr.h`](https://github.com/nasa-jpl/ion-dtn/blob/integration/ici/include/sdr.h) (Persistent SDR), [`ici/include/ion.h`](https://github.com/nasa-jpl/ion-dtn/blob/integration/ici/include/ion.h) (ION services)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_bp["Bundle transport"]
  node_bp_api["BP API<br/>[bp.h]"]
  node_bp_engine["Bundle engine<br/>[libbpP.c]"]
  node_routing["Contact routing<br/>[libcgr.c]"]
  node_security["Bundle security"]
  node_cla["Convergence links"]
end

subgraph group_protocols["Protocol services"]
  node_ltp["LTP transport"]
  node_dtpc["DTPC service<br/>[libdtpcP.c]"]
  node_cfdp["CFDP transfer"]
  node_ams["AMS messaging"]
end

subgraph group_ops["Operations and management"]
  node_nm_agent["NM agent<br/>[ingest.c]"]
  node_nm_manager["NM manager<br/>[nm_mgr_sql.c]"]
  node_bp_admin["BP administration<br/>[bpadmin.c]"]
end

subgraph group_foundation["Shared foundation"]
  node_ion_core["ION services<br/>[ion.h]"]
  node_sdr[("Persistent SDR<br/>[sdr.h]")]
  node_platform["Platform services<br/>[platform.h]"]
  node_sdr_transactions["SDR transactions<br/>[sdrxn.h]"]
  node_atomic["Atomic operations<br/>[ion_atomic.h]"]
end

node_application(("DTN applications"))

node_application -.->|"submits data"| node_bp_api
node_bp_api -.->|"provides API"| node_bp_engine
node_bp_engine -->|"persists bundles"| node_sdr
node_bp_engine -.->|"uses routing"| node_routing
node_bp_engine -->|"uses security"| node_security
node_bp_engine -.->|"forwards via"| node_cla
node_ltp -.->|"supports transport"| node_bp_api
node_dtpc -->|"uses BP"| node_bp_api
node_dtpc -->|"stores state"| node_sdr
node_cfdp -->|"uses BP"| node_bp_api
node_ams -->|"uses services"| node_ion_core
node_nm_agent -.->|"exchanges messages"| node_nm_manager
node_nm_manager -->|"uses SDR"| node_sdr
node_bp_admin -.->|"administers BP"| node_bp_api
node_ion_core -->|"shares data store"| node_sdr
node_ion_core -->|"uses platform"| node_platform
node_sdr_transactions -->|"manages transactions"| node_sdr
node_atomic -->|"depends on"| node_platform

click node_bp_api "https://github.com/nasa-jpl/ion-dtn/blob/integration/bpv7/include/bp.h"
click node_bp_engine "https://github.com/nasa-jpl/ion-dtn/blob/integration/bpv7/library/libbpP.c"
click node_routing "https://github.com/nasa-jpl/ion-dtn/blob/integration/bpv7/cgr/libcgr.c"
click node_security "https://github.com/nasa-jpl/ion-dtn/tree/integration/bpv7/bpsec"
click node_cla "https://github.com/nasa-jpl/ion-dtn/tree/integration/bpv7"
click node_ltp "https://github.com/nasa-jpl/ion-dtn/tree/integration/ltp/library"
click node_dtpc "https://github.com/nasa-jpl/ion-dtn/blob/integration/dtpc/library/libdtpcP.c"
click node_cfdp "https://github.com/nasa-jpl/ion-dtn/tree/integration/cfdp/library"
click node_ams "https://github.com/nasa-jpl/ion-dtn/tree/integration/ams/library"
click node_nm_agent "https://github.com/nasa-jpl/ion-dtn/blob/integration/nm/agent/ingest.c"
click node_nm_manager "https://github.com/nasa-jpl/ion-dtn/blob/integration/nm/mgr/nm_mgr_sql.c"
click node_bp_admin "https://github.com/nasa-jpl/ion-dtn/blob/integration/bpv7/utils/bpadmin.c"
click node_ion_core "https://github.com/nasa-jpl/ion-dtn/blob/integration/ici/include/ion.h"
click node_sdr "https://github.com/nasa-jpl/ion-dtn/blob/integration/ici/include/sdr.h"
click node_platform "https://github.com/nasa-jpl/ion-dtn/blob/integration/ici/include/platform.h"
click node_sdr_transactions "https://github.com/nasa-jpl/ion-dtn/blob/integration/ici/include/sdrxn.h"
click node_atomic "https://github.com/nasa-jpl/ion-dtn/blob/integration/ici/include/ion_atomic.h"

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_bp_api,node_bp_engine,node_routing,node_security,node_cla toneBlue
class node_ltp,node_dtpc,node_cfdp,node_ams toneAmber
class node_nm_agent,node_nm_manager,node_bp_admin toneMint
class node_ion_core,node_sdr,node_platform,node_sdr_transactions,node_atomic toneRose
class node_application toneIndigo
```

## Components

### Bundle transport

- [BP API](https://github.com/nasa-jpl/ion-dtn/blob/integration/bpv7/include/bp.h): `bpv7/include/bp.h`
- [Bundle engine](https://github.com/nasa-jpl/ion-dtn/blob/integration/bpv7/library/libbpP.c): `bpv7/library/libbpP.c`
- [Contact routing](https://github.com/nasa-jpl/ion-dtn/blob/integration/bpv7/cgr/libcgr.c): `bpv7/cgr/libcgr.c`
- [Bundle security](https://github.com/nasa-jpl/ion-dtn/tree/integration/bpv7/bpsec): `bpv7/bpsec`
- [Convergence links](https://github.com/nasa-jpl/ion-dtn/tree/integration/bpv7): `bpv7`

### Protocol services

- [LTP transport](https://github.com/nasa-jpl/ion-dtn/tree/integration/ltp/library): `ltp/library`
- [DTPC service](https://github.com/nasa-jpl/ion-dtn/blob/integration/dtpc/library/libdtpcP.c): `dtpc/library/libdtpcP.c`
- [CFDP transfer](https://github.com/nasa-jpl/ion-dtn/tree/integration/cfdp/library): `cfdp/library`
- [AMS messaging](https://github.com/nasa-jpl/ion-dtn/tree/integration/ams/library): `ams/library`

### Operations and management

- [NM agent](https://github.com/nasa-jpl/ion-dtn/blob/integration/nm/agent/ingest.c): `nm/agent/ingest.c`
- [NM manager](https://github.com/nasa-jpl/ion-dtn/blob/integration/nm/mgr/nm_mgr_sql.c): `nm/mgr/nm_mgr_sql.c`
- [BP administration](https://github.com/nasa-jpl/ion-dtn/blob/integration/bpv7/utils/bpadmin.c): `bpv7/utils/bpadmin.c`

### Shared foundation

- [ION services](https://github.com/nasa-jpl/ion-dtn/blob/integration/ici/include/ion.h): `ici/include/ion.h`
- [Persistent SDR](https://github.com/nasa-jpl/ion-dtn/blob/integration/ici/include/sdr.h): `ici/include/sdr.h`
- [Platform services](https://github.com/nasa-jpl/ion-dtn/blob/integration/ici/include/platform.h): `ici/include/platform.h`
- [SDR transactions](https://github.com/nasa-jpl/ion-dtn/blob/integration/ici/include/sdrxn.h): `ici/include/sdrxn.h`
- [Atomic operations](https://github.com/nasa-jpl/ion-dtn/blob/integration/ici/include/ion_atomic.h): `ici/include/ion_atomic.h`

### Other components

- **DTN applications**

## Connections

- DTN applications → BP API: submits data
- BP API → Bundle engine: provides API
- Bundle engine → Persistent SDR: persists bundles (evidence: `bpv7/library/libbpP.c`)
- Bundle engine → Contact routing: uses routing
- Bundle engine → Bundle security: uses security (evidence: `bpv7/library/libbpP.c`)
- Bundle engine → Convergence links: forwards via (evidence: `bpv7/library/libbpP.c`)
- LTP transport → BP API: supports transport
- DTPC service → BP API: uses BP (evidence: `dtpc/library/libdtpcP.c`)
- DTPC service → Persistent SDR: stores state (evidence: `dtpc/library/libdtpcP.c`)
- CFDP transfer → BP API: uses BP
- AMS messaging → ION services: uses services (evidence: `ams/library/libams.c`)
- NM agent → NM manager: exchanges messages
- NM manager → Persistent SDR: uses SDR (evidence: `nm/mgr/nm_mgr_sql.c`)
- BP administration → BP API: administers BP
- ION services → Persistent SDR: shares data store (evidence: `ici/include/ion.h`)
- ION services → Platform services: uses platform (evidence: `ici/include/ion.h`)
- SDR transactions → Persistent SDR: manages transactions (evidence: `ici/include/sdrxn.h`)
- Atomic operations → Platform services: depends on (evidence: `ici/include/ion_atomic.h`)
