eculocate

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 624b583816a8915b8179365b9354caa19f275354
parent c03e1814d55e85e21010928d397d7e2517068091
Author: Daniel Barlow <dan@telent.net>
Date:   Mon, 29 Dec 2025 12:28:23 +0000

todo legacy mdns

Diffstat:
Mnotes.md | 60+++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 57 insertions(+), 3 deletions(-)

diff --git a/notes.md b/notes.md @@ -190,11 +190,65 @@ status: done except that (c) probably the code is sucky; ** do we need to do NSEC? +** handle QU and legacy queries + + // 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 + if q.name().eq(&Label::from("&my_hostname")) { + // if meta.endpoint.port == 5353 { + // send_advert(&sock, q_id, MDNS_ENDPOINT, None, &my_address).await; + // } else if (q.class() & 0x8000) != 0 { + // log::info!("unicast"); + // send_advert(&sock, q_id, meta.endpoint, None, &my_address).await; + // } else { + // // legacy unicast, send questions + // send_advert(&sock, q_id, meta.endpoint, Some(q), &my_address).await; + // } + // log::info!("IT ME"); + } + + mdns is so fricking noisy already I don't know if this is worth the extra effort ** compress responses -* start a udp server, and stream the tables to anyone who sends a message to it +* write the udp server + +- on reception of a packet containing table numbers, start streaming those +tables to the peer + +- probably the request protocol should be a _bit_ cleverer + - tables + - refresh time + - interpreted numbers + +``` +u16 poll_interval (ms) +u8 subscription_type = T for table +u8 table_number +u16 poll_interval (ms) +u8 subscription_type = T for table +u8 table_number +... +u16 poll_interval = 0 +``` + +we can extend this later to other subscription_types for pre-interprteted data. + + + + +- if the peer goes away, stop + +- if we subsequently get a packet from a different address, send there instead + +* write the receiver + +- android app +- does enough mdns to choose a keihin service instance (https://github.com/mnellemann/mdns-explorer may help) -* udp is connectionless. if we get a second message from a different address, -switch to straming the tables there instead +- writes a list of tables to the advertised ip address/port +- reads udp and writes to "disk" +- updates the display to show data is incoming +- provides a "stop" button to close the socket