[Ns-bugs] [Bug 139] New: Thank you for wasting my time (Packet::RemoveTag)

bugzilla-daemon@nsnam-www.ece.gatech.edu bugzilla-daemon at nsnam-www.ece.gatech.edu
Thu Feb 14 04:56:47 PST 2008


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

           Summary: Thank you for wasting my time (Packet::RemoveTag)
           Product: ns-3
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P3
         Component: node module
        AssignedTo: ns-bugs at isi.edu
        ReportedBy: gjcarneiro at gmail.com


Yes, I am frustrated because Packet::RemoveTag has deceived me and made me
waste a lot of time.

I had some code that used to do pkt->PeekTag (tag).  It turns out I discovered
a case where a packet was being re-routed and the same tag was being re-added. 
So I logically decided to switch to pkt->RemoveTag (tag).

After an hour wasted (it was not obvious) in debugging it turned out this was a
bad move. Packet::RemoveTag (tag) does not actually copy the tag!

1. Why does Packet::RemoveHeader (header) remove and return the header, but
Packet::RemoveTag (tag) only removes the tag; this is very inconsistent...

2. If Packet::RemoveTag only removes the tag, and not return it, why does it
take the 'tag' parameter at all?  This is highly misleading... It should
instead be Packet::RemoveTag<TAG_TYPE> ().


-- 
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