tech-net archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: shutdown(2)'ing a bound UDP socket
On Mon, Jul 20, 2020 at 09:49:04PM +0100, Roy Marples wrote:
> On 20/07/2020 19:56, Peter J. Philipp wrote:
> > Other choices I considered were writing to a raw socket but it would be a lot
> > of overhead and hard work when it comes to fragmentation.
>
> Why are you concerned about fragmentation?
> Provided you don't set INP_HDRINCL then the kernel will include relevant IP
> headers and handle fragmentation for you (at least that's my understanding
> looking at NetBSD's code).
>
> The only extra overhead you should have is writing the UDP header which is
> pretty straight forward.
>
> Roy
OK I've done the changes, and it works awesome! Thank you! I spent most of
the day fine-tuning the udp checksumming, it was developed on OpenBSD, and
then when I ported it to Linux it almost worked out of the box, except Linux
does a weird thing with the protocol set on a sin6.sin6_port. But I figured
it out. Next I tested NetBSD and it worked perfectly. Last I tested FreeBSD.
No regressions. This is awesome! I wasn't sure if you wanted your name on
credits so I credited the NetBSD organization in my CVS. I'm gonna see if I
can get someone to donate for NetBSD as well.
Best Regards,
-peter
Home |
Main Index |
Thread Index |
Old Index