aboutsummaryrefslogtreecommitdiffstats
path: root/link/link-protocol.h
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-09-29 15:02:18 +0100
committereunhhu <[email protected]>2026-09-29 15:02:18 +0100
commit0f074f2b1e26e0cdc4e17b785eda2e06ef13e5a8 (patch)
tree61e4efaf523c6c53169eba80bf7916b0728745f3 /link/link-protocol.h
parentaee9eada19eb54203d776a61958e75e296767c0e (diff)
downloadpure-0f074f2b1e26e0cdc4e17b785eda2e06ef13e5a8.tar.gz
pure-0f074f2b1e26e0cdc4e17b785eda2e06ef13e5a8.zip
Answer a link's packet from the address it came to
The listener's socket takes packets to any address of the node, and its answers went out from whichever address the system chose for the way back. A sender whose socket is connected to another of the node's addresses (a node with many, or a name that points at a second one) takes answers only from the address it sent to: it heard none, and its records went on arriving unacknowledged. Now the listener asks for the address each packet came to (IP_PKTINFO; IPv4 as ::ffff:a.b.c.d on a socket of both) and answers from it. The path a receiver keeps for a run is both addresses (48 bytes, not 28): a packet that comes to another of the node's addresses moves it, and is checked, as one from elsewhere is. Found by a receiver moved to 127.0.0.2 (the check that follows).
Diffstat (limited to 'link/link-protocol.h')
-rw-r--r--link/link-protocol.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/link/link-protocol.h b/link/link-protocol.h
index a8dd826..c6ccc23 100644
--- a/link/link-protocol.h
+++ b/link/link-protocol.h
@@ -108,9 +108,9 @@
* probe of that size acknowledged: DPLPMTUD, RFC 8899; a link probes once
* a packet of its was full, else a larger one would carry nothing more); a
* source's or an input's name is 1 to PURE_LINK_NAME bytes; a receiver
- * keeps where a packet came from (the socket's address) in
- * PURE_LINK_ADDRESS bytes. */
-enum { PURE_LINK_DATAGRAM = 1200, PURE_LINK_DATAGRAM_MOST = 1452, PURE_LINK_NAME = 64, PURE_LINK_ADDRESS = 28 };
+ * keeps a packet's path (where it came from, and the address of its own it
+ * came to: link/link.c answers from there) in PURE_LINK_ADDRESS bytes. */
+enum { PURE_LINK_DATAGRAM = 1200, PURE_LINK_DATAGRAM_MOST = 1452, PURE_LINK_NAME = 64, PURE_LINK_ADDRESS = 48 };
/* Counts for a host's report: packets and records sent, records sent again,
* packets lost and acknowledged, packets received, deliveries handed over,