# mgp25/openlte architecture

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

- Interactive diagram: https://gitdiagram.com/mgp25/openlte
- Repository: https://github.com/mgp25/openlte

## Overview

OpenLTE implements LTE protocol libraries and several radio-facing applications. The principal documented workflow is to run the eNodeB, configure it through its control port, and serve LTE users; its code separates control, subscriber/session handling, protocol layers, and radio access. Separate tools generate downlink samples, scan recorded samples, scan live downlink channels, and record radio samples. Edges follow the README or source-index references; unsampled implementation details are left unconnected where their runtime relationships are unclear.

Main entry points: [`liblte/src/liblte_mac.cc`](https://github.com/mgp25/openlte/blob/master/liblte/src/liblte_mac.cc) (LTE PHY), [`LTE_fdd_enodeb/src/LTE_fdd_enb_mme.cc`](https://github.com/mgp25/openlte/blob/master/LTE_fdd_enodeb/src/LTE_fdd_enb_mme.cc) (Mobility management), [`LTE_fdd_enodeb/src/LTE_fdd_enb_interface.cc`](https://github.com/mgp25/openlte/blob/master/LTE_fdd_enodeb/src/LTE_fdd_enb_interface.cc) (eNodeB control), [`LTE_fdd_enodeb/src/LTE_fdd_enb_mac.cc`](https://github.com/mgp25/openlte/blob/master/LTE_fdd_enodeb/src/LTE_fdd_enb_mac.cc) (MAC scheduling)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_enb["LTE eNodeB"]
  node_enb_control["eNodeB control"]
  node_config[("Configuration")]
  node_mme["Mobility management<br/>[LTE_fdd_enb_mme.cc]"]
  node_hss[("Subscriber database<br/>[LTE_fdd_enb_hss.cc]")]
  node_users["User sessions"]
  node_rrc["Radio resource control<br/>[LTE_fdd_enb_rrc.cc]"]
  node_mac["MAC scheduling<br/>[LTE_fdd_enb_mac.cc]"]
  node_rlc["RLC transport<br/>[LTE_fdd_enb_rlc.cc]"]
  node_pdcp["PDCP transport"]
  node_radio["Radio interface"]
  node_gateway["Packet gateway<br/>[LTE_fdd_enb_gw.cc]"]
end

subgraph group_protocol["LTE Protocols"]
  node_liblte["LTE protocol codecs<br/>[liblte_common.cc]"]
  node_phy["LTE PHY<br/>[liblte_mac.cc]"]
  node_security["LTE security<br/>[liblte_security.cc]"]
end

subgraph group_radio_tools["Radio Tools"]
  node_dl_gen["Downlink generator"]
  node_dl_scan["Downlink scanner"]
  node_scan_control["Scanner control"]
  node_file_scan["Sample-file scanner"]
  node_recorder["Sample recorder"]
  node_rec_control["Recorder control"]
end

subgraph group_support["Shared Support"]
  node_tools["Socket and IPC tools"]
end

node_operator(("Operator"))
node_ue(("LTE user equipment"))

node_operator -->|"configures"| node_enb_control
node_enb_control -.->|"reads and writes"| node_config
node_enb_control -->|"uses control socket"| node_tools
node_mme -->|"queries subscribers"| node_hss
node_mme -->|"manages sessions"| node_users
node_mme -->|"uses NAS codecs"| node_liblte
node_mme -->|"uses security"| node_security
node_mac -->|"accesses sessions"| node_users
node_mac -->|"uses PHY"| node_phy
node_ue -.->|"exchanges radio data"| node_radio
node_rrc -.->|"uses bearer layer"| node_rlc
node_rlc -.->|"uses packet layer"| node_pdcp
node_radio -.->|"carries radio frames"| node_mac
node_gateway -.->|"serves user traffic"| node_users
node_dl_gen -->|"uses LTE PHY"| node_phy
node_dl_scan -->|"uses LTE PHY"| node_phy
node_scan_control -->|"controls scan"| node_dl_scan
node_scan_control -->|"uses control socket"| node_tools
node_file_scan -->|"uses LTE PHY"| node_phy
node_rec_control -->|"controls recording"| node_recorder
node_rec_control -->|"uses control socket"| node_tools
node_liblte -.->|"provides protocol support"| node_phy

click node_enb_control "https://github.com/mgp25/openlte/blob/master/LTE_fdd_enodeb/src/LTE_fdd_enb_interface.cc"
click node_config "https://github.com/mgp25/openlte/blob/master/LTE_fdd_enodeb/src/LTE_fdd_enb_cnfg_db.cc"
click node_mme "https://github.com/mgp25/openlte/blob/master/LTE_fdd_enodeb/src/LTE_fdd_enb_mme.cc"
click node_hss "https://github.com/mgp25/openlte/blob/master/LTE_fdd_enodeb/src/LTE_fdd_enb_hss.cc"
click node_users "https://github.com/mgp25/openlte/blob/master/LTE_fdd_enodeb/src/LTE_fdd_enb_user_mgr.cc"
click node_rrc "https://github.com/mgp25/openlte/blob/master/LTE_fdd_enodeb/src/LTE_fdd_enb_rrc.cc"
click node_mac "https://github.com/mgp25/openlte/blob/master/LTE_fdd_enodeb/src/LTE_fdd_enb_mac.cc"
click node_rlc "https://github.com/mgp25/openlte/blob/master/LTE_fdd_enodeb/src/LTE_fdd_enb_rlc.cc"
click node_pdcp "https://github.com/mgp25/openlte/blob/master/LTE_fdd_enodeb/src/LTE_fdd_enb_pdcp.cc"
click node_radio "https://github.com/mgp25/openlte/blob/master/LTE_fdd_enodeb/src/LTE_fdd_enb_radio.cc"
click node_gateway "https://github.com/mgp25/openlte/blob/master/LTE_fdd_enodeb/src/LTE_fdd_enb_gw.cc"
click node_liblte "https://github.com/mgp25/openlte/blob/master/liblte/src/liblte_common.cc"
click node_phy "https://github.com/mgp25/openlte/blob/master/liblte/src/liblte_mac.cc"
click node_security "https://github.com/mgp25/openlte/blob/master/liblte/src/liblte_security.cc"
click node_dl_gen "https://github.com/mgp25/openlte/blob/master/LTE_fdd_dl_file_gen/src/LTE_fdd_dl_fg_samp_buf.cc"
click node_dl_scan "https://github.com/mgp25/openlte/blob/master/LTE_fdd_dl_scan/src/LTE_fdd_dl_scan_state_machine.cc"
click node_scan_control "https://github.com/mgp25/openlte/blob/master/LTE_fdd_dl_scan/src/LTE_fdd_dl_scan_interface.cc"
click node_file_scan "https://github.com/mgp25/openlte/blob/master/LTE_fdd_dl_file_scan/src/LTE_fdd_dl_fs_samp_buf.cc"
click node_recorder "https://github.com/mgp25/openlte/blob/master/LTE_file_recorder/src/LTE_file_recorder_flowgraph.cc"
click node_rec_control "https://github.com/mgp25/openlte/blob/master/LTE_file_recorder/src/LTE_file_recorder_interface.cc"
click node_tools "https://github.com/mgp25/openlte/blob/master/libtools/src/libtools_socket_wrap.cc"

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_enb_control,node_config,node_mme,node_hss,node_users,node_rrc,node_mac,node_rlc,node_pdcp,node_radio,node_gateway,node_ue toneBlue
class node_liblte,node_phy,node_security toneAmber
class node_dl_gen,node_dl_scan,node_scan_control,node_file_scan,node_recorder,node_rec_control toneMint
class node_tools toneRose
class node_operator toneIndigo
```

## Components

### LTE eNodeB

- [eNodeB control](https://github.com/mgp25/openlte/blob/master/LTE_fdd_enodeb/src/LTE_fdd_enb_interface.cc): `LTE_fdd_enodeb/src/LTE_fdd_enb_interface.cc`
- [Configuration](https://github.com/mgp25/openlte/blob/master/LTE_fdd_enodeb/src/LTE_fdd_enb_cnfg_db.cc): `LTE_fdd_enodeb/src/LTE_fdd_enb_cnfg_db.cc`
- [Mobility management](https://github.com/mgp25/openlte/blob/master/LTE_fdd_enodeb/src/LTE_fdd_enb_mme.cc): `LTE_fdd_enodeb/src/LTE_fdd_enb_mme.cc`
- [Subscriber database](https://github.com/mgp25/openlte/blob/master/LTE_fdd_enodeb/src/LTE_fdd_enb_hss.cc): `LTE_fdd_enodeb/src/LTE_fdd_enb_hss.cc`
- [User sessions](https://github.com/mgp25/openlte/blob/master/LTE_fdd_enodeb/src/LTE_fdd_enb_user_mgr.cc): `LTE_fdd_enodeb/src/LTE_fdd_enb_user_mgr.cc`
- [Radio resource control](https://github.com/mgp25/openlte/blob/master/LTE_fdd_enodeb/src/LTE_fdd_enb_rrc.cc): `LTE_fdd_enodeb/src/LTE_fdd_enb_rrc.cc`
- [MAC scheduling](https://github.com/mgp25/openlte/blob/master/LTE_fdd_enodeb/src/LTE_fdd_enb_mac.cc): `LTE_fdd_enodeb/src/LTE_fdd_enb_mac.cc`
- [RLC transport](https://github.com/mgp25/openlte/blob/master/LTE_fdd_enodeb/src/LTE_fdd_enb_rlc.cc): `LTE_fdd_enodeb/src/LTE_fdd_enb_rlc.cc`
- [PDCP transport](https://github.com/mgp25/openlte/blob/master/LTE_fdd_enodeb/src/LTE_fdd_enb_pdcp.cc): `LTE_fdd_enodeb/src/LTE_fdd_enb_pdcp.cc`
- [Radio interface](https://github.com/mgp25/openlte/blob/master/LTE_fdd_enodeb/src/LTE_fdd_enb_radio.cc): `LTE_fdd_enodeb/src/LTE_fdd_enb_radio.cc`
- [Packet gateway](https://github.com/mgp25/openlte/blob/master/LTE_fdd_enodeb/src/LTE_fdd_enb_gw.cc): `LTE_fdd_enodeb/src/LTE_fdd_enb_gw.cc`

### LTE Protocols

- [LTE protocol codecs](https://github.com/mgp25/openlte/blob/master/liblte/src/liblte_common.cc): `liblte/src/liblte_common.cc`
- [LTE PHY](https://github.com/mgp25/openlte/blob/master/liblte/src/liblte_mac.cc): `liblte/src/liblte_mac.cc`
- [LTE security](https://github.com/mgp25/openlte/blob/master/liblte/src/liblte_security.cc): `liblte/src/liblte_security.cc`

### Radio Tools

- [Downlink generator](https://github.com/mgp25/openlte/blob/master/LTE_fdd_dl_file_gen/src/LTE_fdd_dl_fg_samp_buf.cc): `LTE_fdd_dl_file_gen/src/LTE_fdd_dl_fg_samp_buf.cc`
- [Downlink scanner](https://github.com/mgp25/openlte/blob/master/LTE_fdd_dl_scan/src/LTE_fdd_dl_scan_state_machine.cc): `LTE_fdd_dl_scan/src/LTE_fdd_dl_scan_state_machine.cc`
- [Scanner control](https://github.com/mgp25/openlte/blob/master/LTE_fdd_dl_scan/src/LTE_fdd_dl_scan_interface.cc): `LTE_fdd_dl_scan/src/LTE_fdd_dl_scan_interface.cc`
- [Sample-file scanner](https://github.com/mgp25/openlte/blob/master/LTE_fdd_dl_file_scan/src/LTE_fdd_dl_fs_samp_buf.cc): `LTE_fdd_dl_file_scan/src/LTE_fdd_dl_fs_samp_buf.cc`
- [Sample recorder](https://github.com/mgp25/openlte/blob/master/LTE_file_recorder/src/LTE_file_recorder_flowgraph.cc): `LTE_file_recorder/src/LTE_file_recorder_flowgraph.cc`
- [Recorder control](https://github.com/mgp25/openlte/blob/master/LTE_file_recorder/src/LTE_file_recorder_interface.cc): `LTE_file_recorder/src/LTE_file_recorder_interface.cc`

### Shared Support

- [Socket and IPC tools](https://github.com/mgp25/openlte/blob/master/libtools/src/libtools_socket_wrap.cc): `libtools/src/libtools_socket_wrap.cc`

### Other components

- **Operator**
- **LTE user equipment**

## Connections

- Operator → eNodeB control: configures (evidence: `README.md`)
- eNodeB control → Configuration: reads and writes
- eNodeB control → Socket and IPC tools: uses control socket
- Mobility management → Subscriber database: queries subscribers (evidence: `LTE_fdd_enodeb/src/LTE_fdd_enb_mme.cc`)
- Mobility management → User sessions: manages sessions (evidence: `LTE_fdd_enodeb/src/LTE_fdd_enb_mme.cc`)
- Mobility management → LTE protocol codecs: uses NAS codecs (evidence: `LTE_fdd_enodeb/src/LTE_fdd_enb_mme.cc`)
- Mobility management → LTE security: uses security (evidence: `LTE_fdd_enodeb/src/LTE_fdd_enb_mme.cc`)
- MAC scheduling → User sessions: accesses sessions (evidence: `LTE_fdd_enodeb/src/LTE_fdd_enb_mac.cc`)
- MAC scheduling → LTE PHY: uses PHY (evidence: `LTE_fdd_enodeb/src/LTE_fdd_enb_mac.cc`)
- LTE user equipment → Radio interface: exchanges radio data
- Radio resource control → RLC transport: uses bearer layer
- RLC transport → PDCP transport: uses packet layer
- Radio interface → MAC scheduling: carries radio frames
- Packet gateway → User sessions: serves user traffic
- Downlink generator → LTE PHY: uses LTE PHY
- Downlink scanner → LTE PHY: uses LTE PHY
- Scanner control → Downlink scanner: controls scan
- Scanner control → Socket and IPC tools: uses control socket
- Sample-file scanner → LTE PHY: uses LTE PHY
- Recorder control → Sample recorder: controls recording (evidence: `LTE_file_recorder/src/LTE_file_recorder_interface.cc`)
- Recorder control → Socket and IPC tools: uses control socket
- LTE protocol codecs → LTE PHY: provides protocol support
