[usocket-devel] [ANN] USOCKET-UDP 2.6

Chun Tian (binghe) binghe.lisp at gmail.com
Fri Sep 24 11:49:59 UTC 2010


Hi, Stelian

The IPv4 UDP packets have a 16-bit length constraint, and IP+UDP header has 28-byte.

IP_MAXPACKET = 65535,       /* netinet/ip.h */
sizeof(struct ip) = 20,     /* netinet/ip.h */
size_of(struct udphdr) = 8, /* netinet/udp.h */

65535 - 20 - 8 = 65507

That's the theoretical maximum amount of data in a UDP datagram.

(But for UDP broadcast, the maximum message size is limited by the MTU size of the underlying link)

Search "UDP 65507" by Google, you can find more explanation about this.

Let me know if I understand this wrong.

--binghe

在 2010-9-24,19:02, Stelian Ionescu 写道:

> On Fri, 2010-09-24 at 18:59 +0800, Chun Tian wrote:
>> USOCKET-UDP 2.6
>> 	* improvement: Change constant value +max-datagram-packet-size+ from 65536 to 65507.
>> 	* improvement: Fixed working with USOCKET trunk (0.5).
>> 	* bugfix: Handle Null HOST argument in SOCKET-CONNECT for Clozure CL.
> 
> Interesting, what's so special about the value 65507 ?
> 
> -- 
> Stelian Ionescu a.k.a. fe[nl]ix
> Quidquid latine dictum sit, altum videtur.
> http://common-lisp.net/project/iolib
> _______________________________________________
> usocket-devel mailing list
> usocket-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/usocket-devel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2603 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/usocket-devel/attachments/20100924/63554058/attachment.bin>


More information about the usocket-devel mailing list