build: extract libutun.a from src/ + add db_sync module + etcp API, BBR improvements
- Add libutun.a (noinst) containing all src/*.c except utun.c - utun binary now links libutun.a + libuasync.a - tests/Makefile.am simplified: all tests link libutun.a instead of manual .o file lists (removed ~70 lines of boilerplate) - Add db_sync module: distributed content-addressed DB with LMDB backend, peer-to-peer sync via etcp_router (svc 0x20) - etcp API: etcp_send_in_order(), etcp_clear_inflight_queues(), verify_packet_signature(), BBR getters - BBR: adaptive threshold (1/4 of pipe-min instead of hardcoded) - route_bgp/etcp_connect: STCP transport support in NODEINFO - conn_mgr: NODEINFO_ADDRS doc for nat_type/transport/proto fields - Cleanup: removed AUDIT_FINDINGS.txt, filelist.txt, nat.txt
This commit is contained in:
1 parent
7139969acd
commit
8756f561be
23 files changed
+1508
-786
No files matched your search
@@ -12,6 +12,7 @@
|
||||
#include "etcp_connections.h"
|
||||
#include "etcp.h"
|
||||
#include "conn_mgr.h"
|
||||
#include "db_sync.h"
|
||||
#include "stcp_server.h"
|
||||
#include "control_server.h"
|
||||
#include "msg_transport.h"
|
||||
@@ -179,6 +180,9 @@ static int instance_init_common(struct UTUN_INSTANCE* instance, struct UASYNC* u
|
||||
return -1;
|
||||
}
|
||||
|
||||
// db_sync — распределённая таблица с репликацией (после etcp_router)
|
||||
db_sync_init(instance);
|
||||
|
||||
// Bind DATA handler via etcp_router (after etcp_router_init)
|
||||
if (routing_bind(instance) != 0) {
|
||||
DEBUG_ERROR(DEBUG_CATEGORY_ROUTING, "Failed to bind DATA via etcp_router");
|
||||
@@ -417,6 +421,9 @@ void utun_instance_destroy(struct UTUN_INSTANCE *instance) {
|
||||
nat_transport_destroy(instance);
|
||||
}
|
||||
|
||||
// Cleanup db_sync (before etcp_router_destroy)
|
||||
db_sync_destroy(instance);
|
||||
|
||||
// Cleanup etcp_router
|
||||
etcp_router_destroy(instance);
|
||||
|
||||
|
||||
Reference in new issue
Block a user