Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 06 Jan 1999 20:21:10 -0500
From:      "Louis A. Mamakos" <louie@TransSys.COM>
To:        Wes Peters <wes@softweyr.com>
Cc:        Joe Abley <jabley@clear.co.nz>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: setting DF bit 
Message-ID:  <199901070121.UAA47729@whizzo.transsys.com>
In-Reply-To: Your message of "Wed, 06 Jan 1999 18:13:40 MST." <36940A44.89628F8B@softweyr.com> 
References:  <19990107135107.B12785@clear.co.nz> <36940A44.89628F8B@softweyr.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901070121.UAA47729>