Appending an option in TCP header

33 views
Skip to first unread message

Shashwat Kumar

unread,
Dec 9, 2016, 5:16:27 AM12/9/16
to ns-3-users
I am trying to append an option in TCP header.
By using TcpHeader->appendOption(), option is appended after TcpOption::END option that is not desirable. Ant help how can I append option before TcpOption::END.

Natale Patriciello

unread,
Dec 9, 2016, 5:54:36 AM12/9/16
to 'Shashwat Kumar' via ns-3-users
It depends when you're trying to append the option, in what point of the
code. TcpOptionEnd is added slightly before the segment has to be passed down the
stack, if I remember correctly.

Nat

Shashwat Kumar

unread,
Dec 9, 2016, 6:27:31 AM12/9/16
to ns-3-users
I am capturing the packet at an intermediate node and try to make the change.
(What things I should take care while adding a option in the header.)

Natale Patriciello

unread,
Dec 9, 2016, 9:00:47 AM12/9/16
to 'Shashwat Kumar' via ns-3-users
On 09/12/16 at 03:27am, 'Shashwat Kumar' via ns-3-users wrote:
> I am capturing the packet at an intermediate node and try to make the
> change.
> (What things I should take care while adding a option in the header.)
>

TCP is an end-to-end protocol, so what you're doing violate the layer
rule. So, you should re-do the options placement in the intermediate node.

Nat

Shashwat Kumar

unread,
Dec 10, 2016, 1:25:10 AM12/10/16
to ns-3-users
I am trying to add one option for some experiments. While I am trying to append the option, I am getting memory leak problem but I not able to find the cause.
Can you guide me which step I should follow to append a option in the header, may be I am missing some step.
Thank You.
Reply all
Reply to author
Forward
0 new messages