diff options
| author | tv <tv@krebsco.de> | 2026-10-30 17:36:23 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-30 17:36:23 +0100 |
| commit | 0bb7a35141c12a58001b481851d33291d2a6ec98 (patch) | |
| tree | efa4f97f3ffe8e26e8ff697be97b05d31f530d43 /src/transport/traffic.rs | |
| parent | 236a11a4798574b9c710dde4b97231ff4cade86d (diff) | |
add links messages
Introduce two new wire messages, LINKS and LINKS_REPLY (swarm::links).
A member answers with its links: for each peer, the transport, whether
it’s relayed, the RTT, and whether it’s dormant. It answers members
only, at most every 5 s. This bumps wire::VERSION to 7. Every build
answers, with or without the feature, so every node needs this patch
before the map shows anything beyond its own node.
Diffstat (limited to 'src/transport/traffic.rs')
| -rw-r--r-- | src/transport/traffic.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/transport/traffic.rs b/src/transport/traffic.rs index b237db2..f8ca586 100644 --- a/src/transport/traffic.rs +++ b/src/transport/traffic.rs @@ -45,6 +45,8 @@ pub(crate) struct ByKind { pub(crate) identity: Counter, /// PING and PONG (`transport::paths`), counted by the paths layer under the address. pub(crate) paths: Counter, + /// LINKS and LINKS_REPLY (`swarm::links`). + pub(crate) links: Counter, } impl ByKind { @@ -58,6 +60,7 @@ impl ByKind { MessageKind::Blob => &mut self.blob, MessageKind::Who | MessageKind::Me => &mut self.identity, MessageKind::Ping | MessageKind::Pong => &mut self.paths, + MessageKind::Links | MessageKind::LinksReply => &mut self.links, } } } |
