From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 84CF6158042 for ; Fri, 8 Nov 2024 08:55:06 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 605B5E0940; Fri, 8 Nov 2024 08:54:59 +0000 (UTC) Received: from turkos.aspodata.se (turkos.aspodata.se [185.140.117.226]) by pigeon.gentoo.org (Postfix) with ESMTP id F177CE0933 for ; Fri, 8 Nov 2024 08:54:58 +0000 (UTC) Received: from turkos.aspodata.se (localhost.aspodata.se [127.0.0.1]) by turkos.aspodata.se (Postfix) with ESMTP id E0DBD85CA0F0 for ; Fri, 8 Nov 2024 09:54:42 +0100 (CET) Received: by turkos.aspodata.se (Postfix, from userid 1000) id C48E785CA0F1; Fri, 8 Nov 2024 09:54:42 +0100 (CET) X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7+dev X-Exmh-Isig-CompType: repl X-Exmh-Isig-Folder: inbox From: karl@aspodata.se To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] How to generate broadcast TFTP read request? In-reply-to: References: Comments: In-reply-to Grant Edwards message dated "Thu, 07 Nov 2024 18:06:21 +0000." Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply Mime-Version: 1.0 Content-Type: text/plain Message-Id: <20241108085442.C48E785CA0F1@turkos.aspodata.se> Date: Fri, 8 Nov 2024 09:54:42 +0100 (CET) X-Virus-Scanned: ClamAV using ClamSMTP X-Archives-Salt: 7033fab2-f221-401c-baff-9dc309daa3ff X-Archives-Hash: f9f3357b99fc329f0cbdfce2363a0e30 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 Theese might help: https://www.abc.se/~m6695/udp.html https://people.cs.rutgers.edu/~pxk/417/notes/sockets/udp.html https://users.cs.jmu.edu/bernstdh/web/common/lectures/summary_unix_udp.php Regards, /Karl Hammar