[ENet-discuss] Enet Header size

Yaser Zhian y at yaserzt.com
Thu Jan 8 13:53:07 PST 2009


Peter Soxberger wrote:
...
> If I calculate the real size of a packet, is this correct:
> 
> [UDP Header]+[ENet Headers]+[packet->dataLength] = Packet Size
> 

As someone already mentioned, ENET packs more than one user packet into
a single UDP packet. But I'm not exactly sure how one should handle that.
And the UDP header size is always 64 bits (8 bytes.)

Also, I think you should take into account the IP protocol header as
well. If you use IPv4, which you probably do, the header size is
somewhere between 160 bits (20 bytes) and 480 bits (60 bytes.) But the
excess header size is due to IPv4 "options" which, AFAIK, are seldom (if
ever) used any more.
If you happen to use IPv6 (does ENET even run on this?) the header size
for that is a fixed 320 bits (or 40 bytes.)

Hope this helps.
-yzt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 258 bytes
Desc: OpenPGP digital signature
URL: <http://lists.cubik.org/pipermail/enet-discuss/attachments/20090109/090158df/attachment.pgp>


More information about the ENet-discuss mailing list