packet->RemoveHeader (ipHeader);
COUNTER_ROUTERS = ipHeader.GetTos() ;
uint32_t identification= ipHeader.GetIdentification();
uint32_t offset_fragment= ipHeader.GetFragmentOffset()/8;
std::cout << "ip address=" << address << std::endl;
std::cout << "----------- counter router =" << COUNTER_ROUTERS << std::endl;
std::cout << "---------- identification =" << identification << std::endl;
std::cout << "---------- fragment_offset =" << offset_fragment << std::endl;
ipHeader.SetTos(COUNTER_ROUTERS++);
ipHeader.SetIdentification(identification++);
ipHeader.SetFragmentOffset((offset_fragment++ )*8);
packet->AddHeader(ipHeader);
std::cout << "----------- counter router =" << ipHeader.GetTos() << std::endl;
std::cout << "---------- identification =" << identification << std::endl;
std::cout << "---------- fragment_offset =" << offset_fragment << std::endl;
the call of method Ipv4L3Protocol::BuildHeader(......) in Ipv4L3Protocol::send() permits to update the header , so what i have to do for transmitting packet with modified ip header from node to other? it's possible to add header as argument in send() method or a whole packet??