diff --git a/src/routing_layer/etcp_router.c b/src/routing_layer/etcp_router.c index e2c8e81d4..75489e84e 100644 --- a/src/routing_layer/etcp_router.c +++ b/src/routing_layer/etcp_router.c @@ -337,7 +337,11 @@ struct ETCP_ROUTER_PATH etcp_router_get_path(struct UTUN_INSTANCE* inst, uint64_ if (!inst) { DEBUG_ERROR(DEBUG_CATEGORY_ETCPROUTE, "path snapshot without instance"); return path; } struct ETCP_CONN* conn = router_route_conn(inst, group_id, dst_node_id, svc_id); path.type = conn_mgr_connection_type(conn, dst_node_id); - if (path.type != CONN_TYPE_NONE) path.next_hop_node_id = conn->peer_node_id; + if (path.type != CONN_TYPE_NONE) { + path.next_hop_node_id = conn->peer_node_id; + path.tx_epoch = conn->reset_id; + path.wire_tx_bytes = conn->diagnostic_wire_tx_bytes; + } return path; } diff --git a/src/routing_layer/etcp_router.h b/src/routing_layer/etcp_router.h index c1d911fd8..c3d57d6d2 100644 --- a/src/routing_layer/etcp_router.h +++ b/src/routing_layer/etcp_router.h @@ -315,7 +315,11 @@ int etcp_router_has_route(struct UTUN_INSTANCE* inst, uint64_t group_id, uint64_ // Снимок текущего пути отправки сервиса, только uasync-поток; без создания канала/изменения очередей. // type — CONN_TYPE_*; отсутствие живого пути: NONE и next_hop_node_id=0. -struct ETCP_ROUTER_PATH { uint8_t type; uint64_t next_hop_node_id; }; +struct ETCP_ROUTER_PATH { + uint8_t type; + uint64_t next_hop_node_id; + uint64_t tx_epoch, wire_tx_bytes; // Эпоха и lifetime TX выбранного ETCP_CONN; для графика, не оценка доставки ACK. +}; struct ETCP_ROUTER_PATH etcp_router_get_path(struct UTUN_INSTANCE* inst, uint64_t group_id, uint64_t dst_node_id, uint8_t svc_id);