diff options
| author | info@mode42.com <info@mode42.com> | 2026-08-08 03:54:55 +0000 |
|---|---|---|
| committer | info@mode42.com <info@mode42.com> | 2026-08-08 03:54:55 +0000 |
| commit | 20cb29c2f8c5c87bc590896854a20b1473ceb358 (patch) | |
| tree | 2857f41513a56ad41af97b57362639298aa7f033 /include/hybbx/circuit_bridge.h | |
#2
Diffstat (limited to 'include/hybbx/circuit_bridge.h')
| -rw-r--r-- | include/hybbx/circuit_bridge.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/include/hybbx/circuit_bridge.h b/include/hybbx/circuit_bridge.h new file mode 100644 index 0000000..1eb24b4 --- /dev/null +++ b/include/hybbx/circuit_bridge.h @@ -0,0 +1,46 @@ +#ifndef HYBBX_CIRCUIT_BRIDGE_H +#define HYBBX_CIRCUIT_BRIDGE_H + +/** + * Main-side bridge registry for remote Secondaries — one entry per + * [transport.packet_radioN], [transport.ardopN], or [transport.crdopN] section + * (link metadata; RF runs on the Secondary host). + * Secondaries (edge extenders/repeaters, not telnet users or local Main transports) + * authenticate with matching link_id + link_password over the HBX/TCP circuit hub. + */ + +#include "hybbx/config.h" +#include "hybbx/link.h" +#include "hybbx/limits.h" +#include "hybbx/types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct hybbx_circuit_bridge_entry { + char link_id[HYBBX_LINK_ID_MAX]; + char link_password[128]; + char link_role[HYBBX_LINK_ROLE_MAX]; + double frequency_mhz; +} hybbx_circuit_bridge_entry_t; + +typedef struct hybbx_circuit_bridge_registry { + hybbx_circuit_bridge_entry_t entries[HYBBX_CIRCUIT_MAX_LINKS]; + unsigned count; +} hybbx_circuit_bridge_registry_t; + +void hybbx_circuit_bridge_clear(hybbx_circuit_bridge_registry_t *reg); + +/** Load transport.packet_radioN, transport.ardopN, and transport.crdopN sections. */ +hybbx_result_t hybbx_circuit_bridge_load(hybbx_circuit_bridge_registry_t *reg, + const hybbx_config_t *config); + +const hybbx_circuit_bridge_entry_t *hybbx_circuit_bridge_find( + const hybbx_circuit_bridge_registry_t *reg, const char *link_id); + +#ifdef __cplusplus +} +#endif + +#endif /* HYBBX_CIRCUIT_BRIDGE_H */ |
