On 2024-11-08, k...@aspodata.se <k...@aspodata.se> wrote: > Grant Edwards: >> I need to generate a broadcast UDP TFTP read request, and the usual >> TFTP client tools I use (atftp, tftpy) can't do that. Does anybody >> have a suggestion for an easy wat to generate such a request? > ... > > Tftp is specified by: > https://www.rfc-editor.org/rfc/rfc1350.txt > > To send datagrams to the broadcast address, you need to > set SO_BROADCAST in setsockopt(), so unpatched the traditional > clients won't work. For details see: > man 7 socket > man setsockopt
I hacked up a version of tftpy so that it checked the destination address and set the SO_BROADCAST flag when sending the request. That did what I needed. -- Grant