From owner-freebsd-net@FreeBSD.ORG Wed Sep 21 11:50:48 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6BB1016A41F for ; Wed, 21 Sep 2005 11:50:48 +0000 (GMT) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 68AF243D46 for ; Wed, 21 Sep 2005 11:50:47 +0000 (GMT) (envelope-from andre@freebsd.org) Received: (qmail 16047 invoked from network); 21 Sep 2005 11:24:45 -0000 Received: from unknown (HELO freebsd.org) ([62.48.0.53]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 21 Sep 2005 11:24:45 -0000 Message-ID: <43314916.2451ED6A@freebsd.org> Date: Wed, 21 Sep 2005 13:50:46 +0200 From: Andre Oppermann X-Mailer: Mozilla 4.8 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Robert Watson References: <20050918212110.61962.qmail@web54501.mail.yahoo.com> <20050920134408.Y34322@fledge.watson.org> <43313924.9050009@wm-access.no> <20050921114511.D34322@fledge.watson.org> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: freebsd-net@freebsd.org, Sten Daniel =?iso-8859-1?Q?S=F8rsdal?= , Milscvaer Subject: Re: UDP dont fragment bit X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2005 11:50:48 -0000 Robert Watson wrote: > > On Wed, 21 Sep 2005, Sten Daniel Sørsdal wrote: > > >> For whatever reason, it turns out that you and only you have requested > >> this feature. For typicaly network debugging applications, a raw > >> socket is used, which allows the direct frobbing the the IP DF bit. > >> For example, in traceroute(8). > >> > >> Could you tell us a bit more about the application and proposed use? > >> Presumably forcing the DF bit isn't much use unless you can also > >> retrieve useful reporting on the ICMP errors associated with needing > >> the fragment? > > > > I have been looking for such a feature too. My Application; Bandwidth > > tester (also as a support app for an UDP file transfer utility) The > > reason i want DF bit removed? I want to be able to generate my own > > fragments or let the routers generate the fragments. I also want to be > > able to receive bad UDP packets to gather statistics. This would be > > userland applications. > > By default, we don't generate UDP with the IP DF bit set. If you want to > receive the detailed ICMP responses, you currently need to to use a raw > socket, which is what most network exploration tools (such as traceroute) > do. If we want to be able to manage more detailed state information using > unprivileged UDP sockets, then we need to have more complex state > management on UDP sockets when ICMPs are received. Hence my asking for > requirements: what is it that is really being looked for here? Just being > able to set the DF bit isn't very much use for a casual application, as > there's no real reporting of the resulting ICMP MTU messages to UDP > sockets. So presumably, what's being looked for is more than just a > socket option to say "Set or don't set the DF bit", but a way to query > recent ICMP received state on the socket. I can think of a couple of uses to say IP DF on a UDP socket. Will cook up a patch to add such a sysctl in a few hours. -- Andre > So if someone could generate some application pseudo-code that suggests > what specifically is necessary from the socket layer in order for the > application to function, we can talk about socket service extensions that > might support the application. For example, a way to query detailed error > information rather than just the SO_ERROR socket option. Or a longer haul > PMTU data gathering mechanism for UDP sockets. Or ways for UDP > applications to more usefully query the kernel for the TCP PMTU data > already being recorded. > > It sounds like for the bandwidth tester, IP raw sockets already provide > what you need, since you want to be able to do fairly irregular UDP things > (i.e., receive UDP packets with bad checksums, and see fragments). > > Robert N M Watson > > -------------------------------------------------------------------------------- > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"