public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Grant Edwards <grant.b.edwards@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: [gentoo-user] Re: How to generate broadcast TFTP read request?
Date: Fri, 8 Nov 2024 13:59:36 -0000 (UTC)	[thread overview]
Message-ID: <vgl5g8$1562$1@ciao.gmane.io> (raw)
In-Reply-To: 20241108085442.C48E785CA0F1@turkos.aspodata.se

On 2024-11-08, karl@aspodata.se <karl@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





      reply	other threads:[~2024-11-08 13:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-07 18:06 [gentoo-user] How to generate broadcast TFTP read request? Grant Edwards
2024-11-08  3:44 ` Alexis
2024-11-08  8:54 ` karl
2024-11-08 13:59   ` Grant Edwards [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='vgl5g8$1562$1@ciao.gmane.io' \
    --to=grant.b.edwards@gmail.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox