Turnipseed, the lab Linux box, now being back on the air, I can proceed with what I'd set out to do earlier: implement UDPv4 on AGROS, in support of some future business.
I haven't quite nailed down the API yet; obviously, the boring uniform stream-oriented API that works for serial ports and TCP connections isn't it. Probably something event-based for incoming packets, and a special-purpose function for transmitting; whether that'll use a socket or just a network device remains to be decided.
Anyway, just to get a handle on the incoming side of things, I tossed in some debug code for the UDP case in the IPv4 socket dispatcher. Then refined it a bit, and decided that those mDNS messages going past occasionally are the most interesting thing at the moment, so I started dumping portions of them.
And... it's interesting. I'm seeing obvious names like magrat and turnipseed, but also vetinari [5c:d9:98:0b:e7:d5] (vetinari being the household server, and, yes, that's the MAC address of its inside Ethernet port) and Canon iP2700 series @ magrat (a printer that's connected to magrat, the workstation, when it's connected, which it isn't at the moment).
This is leading off the intended track, and into an exploration of mDNS, but that was pretty high on the "after this" list anyway.
Heck, implementing UDP should be just about trivial, once I settle down to it. It's the protocols that use it that get challenging.
Comments