# souhailbourhim/openairinterface5g architecture

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

- Interactive diagram: https://gitdiagram.com/souhailbourhim/openairinterface5g
- Repository: https://github.com/souhailbourhim/openairinterface5g

## Overview

Duranta OpenAirInterface is a 4G/5G RAN software stack for simulation, prototyping, and COTS deployments. The principal runtime path starts at a gNB/eNB or UE executable, configures a radio node, and processes radio traffic through PHY and cellular control/user-plane layers toward peer network functions. Separate branches provide radio/fronthaul and MAC-PHY interfaces, simulation, and operational utilities. The tree and README establish these major subsystems, while sampled source shows selected interfaces and handlers; many runtime links are therefore marked unverified rather than asserted as direct calls.

Main entry points: [`executables/nr-gnb.c`](https://github.com/souhailbourhim/openairinterface5g/blob/develop/executables/nr-gnb.c) (RAN executables), [`openair1/PHY`](https://github.com/souhailbourhim/openairinterface5g/tree/develop/openair1/PHY) (LTE/NR PHY), [`openair2/LAYER2/NR_MAC_gNB`](https://github.com/souhailbourhim/openairinterface5g/tree/develop/openair2/LAYER2/NR_MAC_gNB) (MAC and scheduling), [`openair2/LAYER2/nr_rlc/nr_rlc_ue_manager.c`](https://github.com/souhailbourhim/openairinterface5g/blob/develop/openair2/LAYER2/nr_rlc/nr_rlc_ue_manager.c) (RLC)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["RAN entry points"]
  node_executables["RAN executables<br/>[nr-gnb.c]"]
  node_config["Configuration<br/>[config_userapi.c]"]
end

subgraph group_radio["Radio and PHY"]
  node_phy["LTE/NR PHY"]
  node_channel["Channel pipeline<br/>[channel_pipeline.c]"]
  node_radio_drivers["Radio drivers"]
  node_fronthaul["7.2x fronthaul<br/>[oru_fh.c]"]
end

subgraph group_protocols["Cellular protocols"]
  node_mac["MAC and scheduling"]
  node_rlc["RLC"]
  node_pdcp["PDCP"]
  node_rrc["RRC"]
  node_nas["NAS"]
end

subgraph group_interfaces["Network interfaces"]
  node_ngap["NGAP"]
  node_s1ap["S1AP"]
  node_x2ap["X2AP<br/>[x2ap_eNB_handler.c]"]
  node_f1ap["F1AP<br/>[f1ap_handlers.c]"]
  node_nfapi["FAPI / nFAPI<br/>[nfapi.c]"]
end

subgraph group_utilities["Runtime utilities"]
  node_itti["Intertask messaging"]
  node_tracer["Tracing and logs"]
  node_websrv["Web control<br/>[websrv.c]"]
  node_otg["Traffic generator<br/>[main.c]"]
  node_sim["Simulation"]
end

node_operator(("Operator"))
node_n2_peer(("AMF / core"))

node_operator -.->|"starts"| node_executables
node_operator -.->|"configures"| node_config
node_executables -.->|"loads settings"| node_config
node_executables -.->|"initializes"| node_phy
node_executables -.->|"initializes"| node_mac
node_phy -.->|"exchanges radio data"| node_mac
node_phy -.->|"uses radio"| node_radio_drivers
node_phy -.->|"uses fronthaul"| node_fronthaul
node_phy -.->|"processes channel"| node_channel
node_mac -.->|"passes traffic"| node_rlc
node_rlc -.->|"passes traffic"| node_pdcp
node_pdcp -.->|"serves control plane"| node_rrc
node_rrc -.->|"supports registration"| node_nas
node_executables -.->|"hosts interface"| node_ngap
node_ngap -.->|"signals"| node_n2_peer
node_executables -.->|"hosts interface"| node_s1ap
node_executables -.->|"hosts interface"| node_x2ap
node_executables -.->|"hosts interface"| node_f1ap
node_mac -.->|"uses MAC-PHY interface"| node_nfapi
node_executables -.->|"coordinates tasks"| node_itti
node_executables -.->|"emits traces"| node_tracer
node_operator -.->|"controls"| node_websrv
node_operator -.->|"generates traffic"| node_otg
node_operator -.->|"runs simulation"| node_sim

click node_executables "https://github.com/souhailbourhim/openairinterface5g/blob/develop/executables/nr-gnb.c"
click node_config "https://github.com/souhailbourhim/openairinterface5g/blob/develop/common/config/config_userapi.c"
click node_phy "https://github.com/souhailbourhim/openairinterface5g/tree/develop/openair1/PHY"
click node_channel "https://github.com/souhailbourhim/openairinterface5g/blob/develop/openair1/SIMULATION/TOOLS/channel_pipeline.c"
click node_radio_drivers "https://github.com/souhailbourhim/openairinterface5g/tree/develop/radio"
click node_fronthaul "https://github.com/souhailbourhim/openairinterface5g/blob/develop/fronthaul/oru/oru_fh.c"
click node_mac "https://github.com/souhailbourhim/openairinterface5g/tree/develop/openair2/LAYER2/NR_MAC_gNB"
click node_rlc "https://github.com/souhailbourhim/openairinterface5g/blob/develop/openair2/LAYER2/nr_rlc/nr_rlc_ue_manager.c"
click node_pdcp "https://github.com/souhailbourhim/openairinterface5g/blob/develop/openair2/LAYER2/nr_pdcp/nr_pdcp_ue_manager.c"
click node_rrc "https://github.com/souhailbourhim/openairinterface5g/tree/develop/openair2/RRC/NR"
click node_nas "https://github.com/souhailbourhim/openairinterface5g/tree/develop/openair3/NAS"
click node_ngap "https://github.com/souhailbourhim/openairinterface5g/blob/develop/openair3/NGAP/ngap_gNB_handlers.c"
click node_s1ap "https://github.com/souhailbourhim/openairinterface5g/blob/develop/openair3/S1AP/s1ap_eNB_handlers.c"
click node_x2ap "https://github.com/souhailbourhim/openairinterface5g/blob/develop/openair2/X2AP/x2ap_eNB_handler.c"
click node_f1ap "https://github.com/souhailbourhim/openairinterface5g/blob/develop/openair2/F1AP/f1ap_handlers.c"
click node_nfapi "https://github.com/souhailbourhim/openairinterface5g/blob/develop/nfapi/oai_integration/nfapi.c"
click node_itti "https://github.com/souhailbourhim/openairinterface5g/blob/develop/common/utils/ocp_itti/intertask_interface.cpp"
click node_tracer "https://github.com/souhailbourhim/openairinterface5g/tree/develop/common/utils/T/tracer"
click node_websrv "https://github.com/souhailbourhim/openairinterface5g/blob/develop/common/utils/websrv/websrv.c"
click node_otg "https://github.com/souhailbourhim/openairinterface5g/blob/develop/openair2/UTIL/OTG/main.c"
click node_sim "https://github.com/souhailbourhim/openairinterface5g/tree/develop/openair1/SIMULATION/TOOLS"

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_executables,node_config toneBlue
class node_phy,node_channel,node_radio_drivers,node_fronthaul toneAmber
class node_mac,node_rlc,node_pdcp,node_rrc,node_nas toneMint
class node_ngap,node_s1ap,node_x2ap,node_f1ap,node_nfapi toneRose
class node_itti,node_tracer,node_websrv,node_otg,node_sim,node_operator,node_n2_peer toneIndigo
```

## Components

### RAN entry points

- [RAN executables](https://github.com/souhailbourhim/openairinterface5g/blob/develop/executables/nr-gnb.c): `executables/nr-gnb.c`
- [Configuration](https://github.com/souhailbourhim/openairinterface5g/blob/develop/common/config/config_userapi.c): `common/config/config_userapi.c`

### Radio and PHY

- [LTE/NR PHY](https://github.com/souhailbourhim/openairinterface5g/tree/develop/openair1/PHY): `openair1/PHY`
- [Channel pipeline](https://github.com/souhailbourhim/openairinterface5g/blob/develop/openair1/SIMULATION/TOOLS/channel_pipeline.c): `openair1/SIMULATION/TOOLS/channel_pipeline.c`
- [Radio drivers](https://github.com/souhailbourhim/openairinterface5g/tree/develop/radio): `radio`
- [7.2x fronthaul](https://github.com/souhailbourhim/openairinterface5g/blob/develop/fronthaul/oru/oru_fh.c): `fronthaul/oru/oru_fh.c`

### Cellular protocols

- [MAC and scheduling](https://github.com/souhailbourhim/openairinterface5g/tree/develop/openair2/LAYER2/NR_MAC_gNB): `openair2/LAYER2/NR_MAC_gNB`
- [RLC](https://github.com/souhailbourhim/openairinterface5g/blob/develop/openair2/LAYER2/nr_rlc/nr_rlc_ue_manager.c): `openair2/LAYER2/nr_rlc/nr_rlc_ue_manager.c`
- [PDCP](https://github.com/souhailbourhim/openairinterface5g/blob/develop/openair2/LAYER2/nr_pdcp/nr_pdcp_ue_manager.c): `openair2/LAYER2/nr_pdcp/nr_pdcp_ue_manager.c`
- [RRC](https://github.com/souhailbourhim/openairinterface5g/tree/develop/openair2/RRC/NR): `openair2/RRC/NR`
- [NAS](https://github.com/souhailbourhim/openairinterface5g/tree/develop/openair3/NAS): `openair3/NAS`

### Network interfaces

- [NGAP](https://github.com/souhailbourhim/openairinterface5g/blob/develop/openair3/NGAP/ngap_gNB_handlers.c): `openair3/NGAP/ngap_gNB_handlers.c`
- [S1AP](https://github.com/souhailbourhim/openairinterface5g/blob/develop/openair3/S1AP/s1ap_eNB_handlers.c): `openair3/S1AP/s1ap_eNB_handlers.c`
- [X2AP](https://github.com/souhailbourhim/openairinterface5g/blob/develop/openair2/X2AP/x2ap_eNB_handler.c): `openair2/X2AP/x2ap_eNB_handler.c`
- [F1AP](https://github.com/souhailbourhim/openairinterface5g/blob/develop/openair2/F1AP/f1ap_handlers.c): `openair2/F1AP/f1ap_handlers.c`
- [FAPI / nFAPI](https://github.com/souhailbourhim/openairinterface5g/blob/develop/nfapi/oai_integration/nfapi.c): `nfapi/oai_integration/nfapi.c`

### Runtime utilities

- [Intertask messaging](https://github.com/souhailbourhim/openairinterface5g/blob/develop/common/utils/ocp_itti/intertask_interface.cpp): `common/utils/ocp_itti/intertask_interface.cpp`
- [Tracing and logs](https://github.com/souhailbourhim/openairinterface5g/tree/develop/common/utils/T/tracer): `common/utils/T/tracer`
- [Web control](https://github.com/souhailbourhim/openairinterface5g/blob/develop/common/utils/websrv/websrv.c): `common/utils/websrv/websrv.c`
- [Traffic generator](https://github.com/souhailbourhim/openairinterface5g/blob/develop/openair2/UTIL/OTG/main.c): `openair2/UTIL/OTG/main.c`
- [Simulation](https://github.com/souhailbourhim/openairinterface5g/tree/develop/openair1/SIMULATION/TOOLS): `openair1/SIMULATION/TOOLS`

### Other components

- **Operator**
- **AMF / core**

## Connections

- Operator → RAN executables: starts
- Operator → Configuration: configures
- RAN executables → Configuration: loads settings
- RAN executables → LTE/NR PHY: initializes
- RAN executables → MAC and scheduling: initializes
- LTE/NR PHY → MAC and scheduling: exchanges radio data
- LTE/NR PHY → Radio drivers: uses radio
- LTE/NR PHY → 7.2x fronthaul: uses fronthaul
- LTE/NR PHY → Channel pipeline: processes channel (evidence: `openair1/SIMULATION/TOOLS/channel_pipeline.c`)
- MAC and scheduling → RLC: passes traffic
- RLC → PDCP: passes traffic
- PDCP → RRC: serves control plane
- RRC → NAS: supports registration
- RAN executables → NGAP: hosts interface
- NGAP → AMF / core: signals
- RAN executables → S1AP: hosts interface
- RAN executables → X2AP: hosts interface
- RAN executables → F1AP: hosts interface
- MAC and scheduling → FAPI / nFAPI: uses MAC-PHY interface
- RAN executables → Intertask messaging: coordinates tasks
- RAN executables → Tracing and logs: emits traces
- Operator → Web control: controls
- Operator → Traffic generator: generates traffic (evidence: `openair2/UTIL/OTG/main.c`)
- Operator → Simulation: runs simulation
