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:
Evgeny committed 2026-07-06 11:42:13 +03:00
1 parent 7139969acd
commit 8756f561be
23 files changed
+1508 -786

No files matched your search

+5 -3
View File
@@ -35,6 +35,7 @@ struct msg_transport;
struct PING_CONTEXT;
struct CONN_MGR;
struct ETCP_CONNECT;
struct DB_SYNC;
struct NETWORK_ENTRY {
uint64_t id; // 56-bit (offset 0 = index key)
@@ -77,9 +78,9 @@ struct UTUN_INSTANCE {
struct ETCP_CONN* connections;// linked-list
int connections_count; // Number of connections
// Callback for new ETCP connections
etcp_new_conn_fn etcp_new_conn_cbk;
void* etcp_new_conn_arg;
// Callback chain for new ETCP connections
struct etcp_cbk_entry* new_conn_cbks;
void* test_user_ptr; // Generic user pointer (used by tests)
struct memory_pool* data_pool;// для входных-выходных данных пакета
struct memory_pool* pkt_pool;
@@ -122,6 +123,7 @@ struct UTUN_INSTANCE {
struct ETCP_ROUTER_BINDINGS router_bindings;
struct ll_queue* router_conns;
struct CONN_MGR* conn_mgr; // Connection Manager (может быть NULL)
struct DB_SYNC* db_sync; // Distributed DB sync (может быть NULL)
// TCP proxy server (exit node)
struct tcp_proxy_server tcp_proxy_server;