Expose selected Router path traffic counters without borrowing live connections
This commit is contained in:
1 parent
43f754bf91
commit
1a0bed05b6
2 files changed
+10
-2
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in new issue
Block a user