Adding a new field to the hello msg

75 views
Skip to first unread message

Doaa

unread,
Feb 10, 2016, 11:32:20 AM2/10/16
to ns-3-users
Hi all

I would like to add a new field in the Hello message called "qos" to add a specific value in it that will be used later for the route selection. So I should modify the header of the message. I read this useful link  https://www.nsnam.org/support/faq/miscellaneous/#adding-data-to-an-existing-packet that shows how to add new header to a packet. The problem that I am facing that I dont know how to add this field in the packet since there are already fields in it (willingness,htime,...etc).  So how can I add this field without affecting the other fields? 
please share any suggestion or a useful link. 
Thanks in advance

Konstantinos

unread,
Feb 10, 2016, 11:48:41 AM2/10/16
to ns-3-users
Hi Doaa,

You would have to modify the existing header (since the HELLO message is in principle a header) and add your field.
This entitles modifying the Serialize, Deserialize and GetSerializedSize methods.

Regards,
K.

Doaa Terri

unread,
Feb 11, 2016, 1:21:57 AM2/11/16
to ns-3-users
Thanks Konstantinos for your reply and help

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
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/H-aeddkrSyg/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 https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages