socket_monitor: extract socket monitoring from etcp_connections, add per-instance context

- New files: transport_layer/socket_monitor.c/h — socket state monitoring with per-instance ctx
- etcp_api: expose get_latency/1s_pkt_count measuring, add etcp_hashrnd for tests
- utun_instance: store socket_monitor per instance, add is_socket_ok check
- topo_node: detect IPv4 addresses with port from listening sockets
- topo_group: use node_name for display in routes
- Makefile.am: add socket_monitor.c to build
This commit is contained in:
evgeny committed 2026-08-02 12:16:42 +03:00
1 parent 14d1673f06
commit f5efaa495b
10 files changed
+420

No files matched your search

+2
View File
@@ -125,6 +125,7 @@ struct UTUN_INSTANCE {
// Callback chain for new ETCP connections
struct etcp_inst_cbk_entry* new_conn_cbks;
struct etcp_status_cbk_entry* conn_status_cbks; // instance-level: NEW/UP/DOWN/DELETE
struct etcp_socket_cbk_entry* socket_cbks; // instance-level: socket ADDR/STATUS changes
void* test_user_ptr; // Generic user pointer (used by tests)
struct memory_pool* data_pool;// для входных-выходных данных пакета
@@ -135,6 +136,7 @@ struct UTUN_INSTANCE {
struct ETCP_SOCKET* etcp_sockets;// linked-list
struct TCP_SOCKET* tcp_sockets; // linked-list [TCP-only]
struct stcp_server *stcp_server; // TCP server (single for now)
void* socket_monitor; // SOCKET_MONITOR* (opaque, transport_layer/socket_monitor.c)
// Pending one-shot pings (for callback on PONG or timeout)
struct PING_CONTEXT* pending_pings;