Add options field to IPV4 header in ns3.10

156 views
Skip to first unread message

Peng Wang

unread,
May 22, 2014, 10:55:50 AM5/22/14
to ns-3-...@googlegroups.com
Hi, all,

I found that options field of IPV4 header is not available in ns3.10. However, I need to do some experiments about Loose/Strict Source Routing, which need options field to store information. Does anyone have any hints about adding options to IP header? Thank you very much!

Best, 
Peng

Peng Wang

unread,
May 22, 2014, 11:31:57 AM5/22/14
to ns-3-...@googlegroups.com
The current solution I find is to add options field in src/node/ipv4-header.h, just as m_tos, m_ttl and so on, and modify the relative things in ipv4-header.cc. Would that be enough?  

Konstantinos

unread,
May 22, 2014, 11:51:51 AM5/22/14
to ns-3-...@googlegroups.com
The other solution is to move to ns-3.19 or even ns-3-dev!
Sorry to say, but 3.10 is a very old release (3yr) and has a completely different structure.

Ammar Alhosainy

unread,
Nov 1, 2015, 4:18:56 PM11/1/15
to ns-3-users
Hi Peng,

Did you find a solution for this problem ?

Tommaso Pecorella

unread,
Nov 1, 2015, 5:22:53 PM11/1/15
to ns-3-users
To the problem of upgrading to the latest ns-3 ?
I sincerely hope so.

Seriously, working with a ns-3 version that old is something to avoid. The work needed to make it work, add the major things we added, and fix what has bee fixed in the meantime are practically equivalent to forward-port (or rewrite from scratch) anything that was based on that particular version.

T.

Ammar Alhosainy

unread,
Nov 1, 2015, 5:29:10 PM11/1/15
to ns-3-...@googlegroups.com
Even the latest version 3.24 does have a fixed IPv4 header length (5), no options field !

You can find it in Ipv4Header::Serialize function in Ipv4-header.cc

--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/m8OrlXyui_g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.



--
Ammar Alhosainy, M.Sc.

Ph.D. Candidate
Systems and Computer Engineering 
Carleton University
Ottawa, Ontario, Canada 



Tommaso Pecorella

unread,
Nov 1, 2015, 5:38:42 PM11/1/15
to ns-3-users
You're right. You can add them tho, and it's definitely easier to add them in 3.24 than in 3.10 :)
It would be also a very welcome addition. However, take care that in many part of the code the IP header length is considered to be 20 bytes (fixed). As a consequence, some bugs could arise. Nothing we can't fix tho.
If you're interested in working on this, drop a mail in ns-dev mailing list.

Cheers,

T.
Reply all
Reply to author
Forward
0 new messages