I mean, I don't expect this to be too difficult, likely what's needed is to interpret the bytes coming out of MacWorks and split them up into packets.
Some of that can be done with timing tricks*, but that will run into issues if multiple packets are being sent, so I'd want to know what various localtalk packets look like at the byte level, and then write some code to recognize "oh, wait, I didn't get the full packet yet, queue up more bytes" to "ok, that's a full packet, ship it to UDP port whatever in this format" and then what to do when I receive a packet - most likely add the whole packet to the serial port queue and let MacWorks read it in.
I started looking at the mini vMac code that does some of this, but there's a lot to parse.
* this is the same problem for the ImageWriter emulator - how do you know when the print job ends? Well, if you've sent only one, you can expect a flurry of activity for some time, and then quiet time. However, if you send 2 or 3 documents together to the printer in LOS, they'll get merged into a single PDF or single print job at the host/LisaEm level if you only rely on timing - so that won't work for networking protocols.
I think I have the official AppleTalk book somewhere... I guess I should go dig it up as it will likely have the header/footer packet sizing info I'd need for this and then compare it to the code in mini vMac.
There's some detail here:
https://windswept.home.blog/2019/12/10/localtalk-over-udp/ but lacks the LLAP packet details.
oh wow, and this one seems to be that whole book:
http://www.tmetz.net/os/Apple/Inside_AppleTalk.pdf Looks like LLAP packets are variable size between 255 to 600 bytes (p552) but still need slightly more details as to how to determine this size depending on packet type.
There's some more details, but not the sizing here:
https://web.archive.org/web/20190209190759/https://www.rhyshaden.com/apple.htmLikely this is what I'm after:
https://github.com/lampmerchant/tashtalk/blob/main/tashtalkd/daemon/util/receiver.py