I would like to see it nicely documented like in this other udp library: <a href="http://airhook.ofb.net/protocol.html">http://airhook.ofb.net/protocol.html</a><br><br>They show an image in a format that you would readily see to describe the udp/tcp packet headers...<br>
<br><div class="gmail_quote">On Thu, Jan 8, 2009 at 4:53 PM, Yaser Zhian <span dir="ltr">&lt;<a href="mailto:y@yaserzt.com">y@yaserzt.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Peter Soxberger wrote:<br>
...<br>
&gt; If I calculate the real size of a packet, is this correct:<br>
&gt;<br>
&gt; [UDP Header]+[ENet Headers]+[packet-&gt;dataLength] = Packet Size<br>
&gt;<br>
<br>
As someone already mentioned, ENET packs more than one user packet into<br>
a single UDP packet. But I&#39;m not exactly sure how one should handle that.<br>
And the UDP header size is always 64 bits (8 bytes.)<br>
<br>
Also, I think you should take into account the IP protocol header as<br>
well. If you use IPv4, which you probably do, the header size is<br>
somewhere between 160 bits (20 bytes) and 480 bits (60 bytes.) But the<br>
excess header size is due to IPv4 &quot;options&quot; which, AFAIK, are seldom (if<br>
ever) used any more.<br>
If you happen to use IPv6 (does ENET even run on this?) the header size<br>
for that is a fixed 320 bits (or 40 bytes.)<br>
<br>
Hope this helps.<br>
-yzt<br>
<br>
<br>_______________________________________________<br>
ENet-discuss mailing list<br>
<a href="mailto:ENet-discuss@cubik.org">ENet-discuss@cubik.org</a><br>
<a href="http://lists.cubik.org/mailman/listinfo/enet-discuss" target="_blank">http://lists.cubik.org/mailman/listinfo/enet-discuss</a><br>
<br></blockquote></div><br>