[Ns-bugs] [Bug 52] New: Cannot deserialize headers from packets built from raw data

bugzilla-daemon@nsnam-www.ece.gatech.edu bugzilla-daemon at nsnam-www.ece.gatech.edu
Sun Jul 15 16:48:45 PDT 2007


http://www.nsnam.org/bugzilla/show_bug.cgi?id=52

           Summary: Cannot deserialize headers from packets built from raw
                    data
           Product: ns-3
           Version: pre-release
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: blocker
          Priority: P1
         Component: simulation core
        AssignedTo: ns-bugs at isi.edu
        ReportedBy: gjcarneiro at gmail.com


This code:

    Packet packet;
    {
      OlsrPacketHeader hdr;
      // Build an OLSR packet header
      hdr.m_packetLength = (hdr.GetSize () + 0);
      hdr.m_packetSequenceNumber = 123;

      packet.AddHeader (hdr);
    }    
    {
      Packet packet1 (packet.PeekData (), packet.GetSize ());
      OlsrPacketHeader hdr;
      packet1.RemoveHeader (hdr);
    }

Gives me a "Removing unexpected header." assertion error.  Changing
"packet1.RemoveHeader (hdr);" to "packet.RemoveHeader (hdr);" makes it work,
which indicates that the problem is that creating a packet from data/size and
then deserializing headers from it does not work.  This is a serious
limitation, because it means we can't create a packet from the headers
infrastructure, send it through a socket (code below) and read it back with
header deserialization routines.

  m_sendSocket->Send (packet.PeekData (), packet.GetSize ());


-- 
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


More information about the Ns-bugs mailing list