Refresh both AGENTS guides and clarify module purpose, usage, ownership, threading, return values and wire formats in headers. Remove the unused timeout_heap freed_count field and unimplemented getter.
38 lines
1.7 KiB
C
38 lines
1.7 KiB
C
/* route_connectivity — прямые UDP/TCP-пробы адресов узла для оценки достижимости и RTT.
|
|
* probe_node запускает серии из подходящих локальных сокетов и обновляет nq->connectivity;
|
|
* результат используется топологией, сама проба не создаёт READY-сессию группы.
|
|
* Состояние привязано к TOPO_GROUP_NODE: отменить пробы до удаления узла/группы. Все операции — uasync. */
|
|
#ifndef ROUTE_CONNECTIVITY_H
|
|
#define ROUTE_CONNECTIVITY_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
|
|
#include <stdint.h>
|
|
#include "topo_node.h"
|
|
|
|
struct UTUN_INSTANCE;
|
|
struct TOPO_GROUP;
|
|
|
|
// Запускает зондирование связности ко всем адресам удалённого узла
|
|
void route_connectivity_probe_node(struct UTUN_INSTANCE* instance, struct TOPO_GROUP* group,
|
|
struct TOPO_GROUP_NODE* nq);
|
|
|
|
// Отменяет все pending пробы для узла (при удалении / withdraw)
|
|
void route_connectivity_cancel_node(struct TOPO_GROUP_NODE* nq);
|
|
|
|
// Отменяет все pending пробы для всех узлов (при destroy)
|
|
void route_connectivity_cancel_all(struct UTUN_INSTANCE* instance);
|
|
|
|
// Устанавливает таймаут одного probe-пинга (по умолчанию CONN_PROBE_TIMEOUT_MS).
|
|
// Используется тестами для ускорения probe-циклов.
|
|
void route_connectivity_set_probe_timeout_ms(uint16_t ms);
|
|
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
#endif // ROUTE_CONNECTIVITY_H
|