rerrHeader was not declared in this scope

why do I get rerrHeader was not declared in this scope

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  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); original code
  p->PeekHeader (rerrHeader);
  rerrHeader.GetOrigin();//LINCY 
}

and void
RoutingProtocol::RecvHis (Ptr<Socket> socket)
{
   case HISTYPE_RERR:
      {     
        RecvError (packet, sender);
    Ptr<Ipv4L3Protocol> l3K = m_ipv4->GetObject<Ipv4L3Protocol> ();
    Ipv4InterfaceAddress ifaceLocal = l3K->GetAddress(1,0);
     std::cout << ifaceLocal.GetLocal() << "###" << sender<< ":recv rerr from this node "<<"\n";//lincy
       if (IsMyOwnAddress (rerrHeader.GetOrigin()))//lincy
          {std::cout<<"hiiiiii";}//lincy
      
        break;
      }


kindly guide as to why i am getting rerrHeader was not declared in this scope
Last edited on
Because there is no variable named rerrHeader in scope on line 20.
Topic archived. No new replies allowed.