GetDst aodv in rerr

23 views
Skip to first unread message

Lincy Elizebeth Jim

unread,
Oct 27, 2015, 9:35:45 AM10/27/15
to ns-3-users
hi all

i added Get/setOrigin to RERR of aodv and it works fine.I am able to see the source that generated RREQ in RecvError function.Next I added Get/setDst to RERR of aodv i am not able to see the final destination the rreq is intended for
void
RoutingProtocol::RecvError (Ptr<Packet> p, Ipv4Address src )//recv  route error from node with address src
{
  NS_LOG_FUNCTION (this << " from " << src);
  RerrHeader rerrHeader;
 
  p->RemoveHeader (rerrHeader);
 
    //Lincy Starts
     
    Ptr<Ipv4L3Protocol> l3K = m_ipv4->GetObject<Ipv4L3Protocol> ();
    Ipv4InterfaceAddress ifaceLocal = l3K->GetAddress(1,0);
   
  
   
std::cout <<  " RERR Packet Received TO node - " << ifaceLocal.GetLocal() << "\n";//lincy

              rerrHeader.SetOrigin (ifaceLocal.GetLocal ());
              Ipv4Address origin=rerrHeader.GetOrigin();
        
            if (IsMyOwnAddress (origin)){
               std::cout"hello";
            
            }



i created ifacelocal1 and did rerrHeader.Get/SetDst but its of no use i still get the origin of the rreq

kindly guide


thanking in advance
lincy

Tommaso Pecorella

unread,
Oct 27, 2015, 11:44:49 AM10/27/15
to ns-3-users
You're not new to the group.

You SHOULD know how to ask for something. From your message we can not understand a single thing about what is your problem. How could you possibly think we could help? Or that we could WANT to help you in the future, if you keep abusing of our patience ?

We need a simulation script showing the problem AND the changes you did to the code. Plus a brief and understandable rationale of what was the goal, what you did expect from the code and what you got instead.

T.

Lincy Jim

unread,
Oct 27, 2015, 3:32:16 PM10/27/15
to ns-3-users

Hi Tommaso,

My objective is to validate route error.Once initiator of Rreq has received the error(for this purpose I added get and set origin functionality to packet.h and packet.cc)
So in Recverror function I could get origin from RerrHeader calling the get/set origin.
I want the source to send warning packet to all nodes along this route.the nodes should acknowledge the warning. I wanted to incorporate Send warning ( packet p, route to dst ).This send warning should be executed once the source receives route error
Kindly guide
(Not able to access the virtual machine which is I why I  cannot attach the code)

Lincy

--
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/hv6LiXM4dP0/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 27, 2015, 4:26:31 PM10/27/15
to ns-3-users
The best guidance I can give you is: think before coding.

RERR is a "normal" packet, sent as unicast from one of the intermediate nodes to the packet source. It does NOT contain (usually) the original packet source (because it's the RERR destination, doh), and the IP of the node originating the RERR (it's the RERR source address in the IP header, doh).
In other words, you didn't need to add anything, you just needed to check what's in the RERR IP header.

About the second part, i.e., to send warning messages to the nodes along the RERR path, you could record them (can be done) or just trust that the routing didn't change. Again, I'm not going to die you more hints because (as we have to point out too many times) it's your research and not mine.

T.
Reply all
Reply to author
Forward
0 new messages