getorigin from rerr aodv

24 views
Skip to first unread message

Lincy Elizebeth Jim

unread,
Oct 21, 2015, 8:41:35 PM10/21/15
to ns-3-users
hi all

I am using ns-3.23
for aodv-packet.h in the class Rerr

i added  void SetOrigin (Ipv4Address a) { m_origin = a; }
Ipv4Address GetOrigin () const { return m_origin; }

and also IPv4Address m_orign as private



  m_flag (0), m_reserved (0), m_origin (origin) {
 }

In void RerrHeader::Serialize
i included WriteTo (i, m_origin); along with the other lines of code

In void RerrrHeader::Deserialize
I included ReadFrom (i, m_origin); along with the other lines of code


i am getting you have attempted to read a value smaller than buffer size

kindly guide

thanking in advance

lincy

Tommaso Pecorella

unread,
Oct 22, 2015, 3:13:10 AM10/22/15
to ns-3-users
Today you're going to make me mad.

We discussed this point countless times already. You added a field in an header and you didn't modify the serialized size accordingly.

T.

Lincy Jim

unread,
Oct 22, 2015, 5:22:09 AM10/22/15
to ns-3-users

Hi

I did modify RerrHeader::GetSerializedSize
const {
return (4+8*GetDestCount ());
}

Kindly guide

--
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/o8HUOIm6yaQ/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.

Tommaso Pecorella

unread,
Oct 22, 2015, 5:30:52 AM10/22/15
to ns-3-users
The original RERR serialized size is:
uint32_t
RerrHeader::GetSerializedSize () const
{
 
return (3 + 8 * GetDestCount ());
}

You did increase it by one byte.
Do you think that an IPv4 address is ONE BYTE long ?

Explain.

T.

Lincy Jim

unread,
Oct 22, 2015, 7:40:30 AM10/22/15
to ns-3-users

Thanks a lottt for the hint.got it.

Lincy :)

Reply all
Reply to author
Forward
0 new messages