commit 182ea81d2c19c17cb24849045fe1a6e13ae8ae96
parent 6ec2545507ab09e7a413c97eafef9a415a23459e
Author: Daniel Barlow <dan@telent.net>
Date: Sat, 20 Dec 2025 20:35:52 +0000
const for flush cache
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/wifi.rs b/src/wifi.rs
@@ -55,6 +55,9 @@ const MDNS_IP: IpAddress = IpAddress::v4(224, 0, 0, 251);
const MDNS_PORT: u16 = 5353;
const MDNS_ENDPOINT: IpEndpoint = IpEndpoint::new(MDNS_IP, MDNS_PORT);
+const CACHE_FLUSH : u16 = 1<<15;
+
+
// RFC: "Multicast DNS responses MUST NOT contain any questions in the
// Question Section. ". However, responses to "legacy" queries (port != 5353)
// should have a question section just like traditional DNS
@@ -76,7 +79,7 @@ async fn send_advert(sock: &UdpSocket<'_>,
ResourceRecord::new(
"eculogical.local",
ResourceType::A,
- 1 | (1<<15), // class = IN, flush cache
+ 1 | CACHE_FLUSH,
120, // ttl
&my_address
)