From owner-freebsd-hackers Wed Jan 6 17:22:00 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA07218 for freebsd-hackers-outgoing; Wed, 6 Jan 1999 17:22:00 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from whizzo.transsys.com (whizzo.TransSys.COM [144.202.42.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA07211 for ; Wed, 6 Jan 1999 17:21:54 -0800 (PST) (envelope-from louie@whizzo.transsys.com) Received: from whizzo.transsys.com (localhost.transsys.com [127.0.0.1]) by whizzo.transsys.com (8.9.1/8.9.1) with ESMTP id UAA47729; Wed, 6 Jan 1999 20:21:11 -0500 (EST) (envelope-from louie@whizzo.transsys.com) Message-Id: <199901070121.UAA47729@whizzo.transsys.com> X-Mailer: exmh version 2.0.2 2/24/98 To: Wes Peters cc: Joe Abley , freebsd-hackers@FreeBSD.ORG From: "Louis A. Mamakos" Subject: Re: setting DF bit References: <19990107135107.B12785@clear.co.nz> <36940A44.89628F8B@softweyr.com> In-reply-to: Your message of "Wed, 06 Jan 1999 18:13:40 MST." <36940A44.89628F8B@softweyr.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 06 Jan 1999 20:21:10 -0500 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Joe Abley wrote: > > > > Hi, > > > > How do arrange for the DF bit in the IP header to be set for a given > > connected socket? > > > > I was expecting to find a sockopt, but I can't find one... > > And won't. "sysctl -w net.inet.ip.sourceroute 1" will turn on DF > system-wide, setting it to zero (the default) will turn it back off. > This doesn't seem right. I think the only place the kernel networking code generates packets with "DON'T FRAGMENT set in the header is when doing path MTU discovery in the TCP code. I suppose you could generate packets using a SOCK_RAW kinda socket, but that's probably not what was had in mind. If you had a socket option to enable this on e.g., UDP sockets, then you'd have to have a socket that was connect()'ed so you might get notified of MTU exceeded ICMP messages. The problem is that I don't think there's a good way of returning any of the useful data up to the application, other than listening in with an ICMP raw socket. louie To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message