Date: Tue, 21 Mar 2006 17:36:07 +0000 From: Bruce M Simpson <bms@spc.org> To: Sten Daniel =?iso-8859-1?Q?S=F8rsdal?= <lists@wm-access.no> Cc: freebsd-net@freebsd.org Subject: Re: How can i detect if a received UDP got fragmented from userland? Message-ID: <20060321173607.GS37590@spc.org> In-Reply-To: <441F6FE0.80108@wm-access.no> References: <441F6FE0.80108@wm-access.no>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Mar 21, 2006 at 04:15:44AM +0100, Sten Daniel Sørsdal wrote: > Our first assumption was that adding DF to UDP would solve it, and it > does in our small tests, but it has a noticable negative effect on the > network. Sounds like you need to implement Path MTU Discovery in userland for your application. In FreeBSD, PMTU-D only happens in the kernel for TCP traffic. So you would need to implement it yourself to avoid fragmentation along the path. > Are there any way i can read whether a message's packet was fragmented > into smaller pieces and preferably how large the largest fragment was? I think the MSG_TRUNC flag can tell you about this (data discarded before delivery). You'd have to experiment to see if UDP will set this flag, I'm not sure if it will. > Are there any feasible way to do this? I don't think it would be feasible to report this per datagram. Take a look at Ping Pan's paper on PF_IPOPTION if you wish to explore further. Regards, BMS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060321173607.GS37590>
