Subject: [manet] TCP packet size, sent != received

From: Gabriel Lau <[email-masked]>
Date: Mon, 26 Apr 2004 11:01:06 -0400 (EDT)

Hi all,

I am currently working on a project using NS2 to simulate TCP over 802.11.
However, I have encountered a problem where the received packet is always
20 bytes larger than the sent packet.  I can access the TCP header and
data without any problem.  It's just that the common header size,
th->size(), always returns 20 bytes more than the sent packet.  I was told
that this 20 bytes was added in the MAC layer and didn't get removed.  So
I simply subtracted that 20 bytes from th->size() and continue on with my
simulation, and everything seems to work fine so far.  My question is, is
there a better solution to this?  If you know the root of this problem,
can you please let me know?  Thanks in advance.

Regards,
Gabriel

_______________________________________________
manet mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/manet

---

From: "Tao Lin" <[email-masked]>
Date: Mon, 26 Apr 2004 18:05:15 -0400

This is because of a bug in ns2.  The 20 bytes header is added to the user
packet when the routing agent, not MAC layer agent, process it.  However,
there is no agent to take care of this, for example, remove it, when the
packet reach the destination node.  This has nothing to do with TCP or UDP.
In other words, if you use UDP, you will also see this.   To my knowledge,
the current best way to handle it is what you just did.

 Tao Lin