blob: 1eb24b48ad05291ed52146a2016730492f801caf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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 */
|