Reviewed-on: #36 Co-authored-by: Koda YeenBean <n122330@gmail.com>
This commit was merged in pull request #36.
This commit is contained in:
@@ -19,16 +19,18 @@ threading or event framework; the main loop runs once per second.
|
||||
| Lifecycle and scheduling | `src/main.c` | Load config/state, choose model, run announce/inform/LLDP timers |
|
||||
| User configuration | `src/config.[ch]`, `files/openuf.conf` | Parse static daemon settings and defaults |
|
||||
| Persistent controller state | `src/state.[ch]` | Read/write `/etc/openuf/state.json` |
|
||||
| Inform/adoption protocol | `src/inform.[ch]` | Build telemetry, encode TNBU packets, handle controller commands |
|
||||
| Inform exchange | `src/inform/inform.c`, `src/inform.h` | Orchestrate payload, TNBU, HTTP, and response stages |
|
||||
| Inform internals | `src/inform/{payload,packet,response}.c` | Build telemetry, encode TNBU packets, handle commands |
|
||||
| Transport and encryption | `src/http.[ch]`, `src/crypto.[ch]` | Raw HTTP/1.0 client and AES-CBC/AES-GCM helpers |
|
||||
| WiFi provisioning | `src/wlan.[ch]` | Translate controller config to UCI and report VAP state |
|
||||
| WiFi provisioning | `src/wlan/{provision,legacy,radio,uci}.c`, `src/wlan.h` | Translate controller config to UCI |
|
||||
| WiFi telemetry/helpers | `src/wlan/{telemetry,common}.c` | Report VAP state and share translations |
|
||||
| Device telemetry | `src/sysinfo.[ch]`, `src/clients.[ch]` | Read proc/sysfs/`iw`/bridge/dnsmasq data |
|
||||
| Discovery/topology | `src/announce.[ch]`, `src/lldp.[ch]` | UniFi UDP announce and LLDP send/read |
|
||||
| Emulated hardware | `src/models.c`, `src/ufmodel.h` | Model registry, radios, ports, and band-to-radio mapping |
|
||||
| Packaging/service | `Makefile`, `files/openuf.init` | OpenWrt package recipe and procd service |
|
||||
|
||||
Runtime flow: `main()` -> `inform_send()` -> build telemetry -> encrypt ->
|
||||
`http_post()` -> decrypt response -> `handle_response()` -> optionally
|
||||
`http_post()` -> decrypt response -> `inform_handle_response()` -> optionally
|
||||
`wlan_apply_config()`/`wlan_apply_system_cfg()` and `state_save()`.
|
||||
|
||||
## Important invariants
|
||||
@@ -70,6 +72,15 @@ make package/OpenUniFi/compile
|
||||
|
||||
`Makefile.standalone` is for compiling on an OpenWrt device with development
|
||||
packages installed; it is not a host-side substitute for the cross-build.
|
||||
|
||||
Architecture pages for the Gitea Wiki are generated from the recursive C source
|
||||
tree. After source or architecture changes, run:
|
||||
|
||||
```sh
|
||||
./scripts/docs/generate-wiki.py
|
||||
./scripts/docs/generate-wiki.py --check
|
||||
```
|
||||
|
||||
There is currently no automated test suite. For documentation-only changes,
|
||||
check paths and commands against the source and package Makefile. For C changes,
|
||||
the cross-build is the minimum verification; report any device/controller
|
||||
|
||||
Reference in New Issue
Block a user