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

Hi Roy,

OH!  I hadn't considered a raw socket without the HDRINCL then it may indeed
be worth it.  I'll tinker with this when I find some time and let you know
how it goes.  It may take some days.  

Thanks!

-peter


Home | Main Index | Thread Index | Old Index