[ndnSIM] Reading and Removing Tag in Data Packet
Tun Tun Oo
htunhtunu at gmail.com
Wed Apr 30 01:14:24 PDT 2014
Dear Alex,
In my customize forwarding, I want to send local information of every hop
by tagging data packet.
When router received data, it read tag and then remove it and add it again
router information.
But I found a problem when I remove the tag. Actually I think I cannot
remove the tag.
MyTag tag;
bool isTag = data->GetPayload()->PeekPacketTag(tag);
if (isQueueTag)
{
read = tag.GetTag();
NS_LOG_INFO ("Infomation "<< read << " : received from data >
"<< data->GetName());
//to remove tag
ConstCast<Packet>(data->GetPayload())->RemovePacketTag (tag);
if (tag.GetTag != 0)
std::cout << "Cannot Remove the tag in data > "<<
data->GetName()<<std::endl;
}
Could you give me an advice how should I do it?
regards
TUN
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20140430/ca3ad9a3/attachment.html>
More information about the ndnSIM
mailing list