Arash, wireless and more
You can scan through headers like this:
In above code I tried to find Ipv4Header
And it is possible to access it like:
if (m_isIpv4HeaderFound)
{
NS_LOG_DEBUG("Header Found");
Callback
NS_ASSERT(!constructor.IsNull());
ObjectBase *instance = constructor();
NS_ASSERT(instance != 0);
Ipv4Header *ipv4Header = dynamic_cast
NS_ASSERT(ipv4Header != 0);
ipv4Header->Deserialize(item.current);
delete ipv4Header;
}
In addition to a daily blog I will try to add our works in wireless network and data communication projects for our courses here
1 Response to How to find a specific header in packet in NS-3
Linus
November 25th, 2015 at 10:11 am
It says ‘constructor’ was not declared in this scope. What #includes is necessary for this code?