Dear all
I implemented a protocol in which the header gets changed in RouteOuput, increasing the overHead and therefore the packet size. For this reason I can not use FlowMonitor to check my packet Rx/Tx count, throughput,etc (I tried it...)
According to some messages in the mailing list I found out that I can use the Rx/Tx tracing source from Ipv4L3Protocol to check this.
(
https://groups.google.com/forum/#!searchin/ns-3-users/Ipv4L3Protocol$20trace/ns-3-users/1aijcX51pOk/9xM_1mOjpxcJ)
I set the connection to the trace source in my simulation file like this :
Config::Connect ("/NodeList/*/$ns3::Ipv4L3Protocol/Rx",MakeCallback (&RxTrace));
and my function called like this:
void RxTrace (Ptr<const Packet> p, Ptr<Ipv4> ipv4 , uint32_t interface)
{
RxCount = RxCount+1;
std::cout<<"Inside RxTrace \n";
}
At the end of the simulation printing the RxCount. Although everything compiles and packets are sent and received the results are still 0 , like something is wrong with my trace setting....
Any ideas... perhaps the Config::Connect is not placed in the correct place.... or something missing in my protocol ... (my protocol is a
Ipv4L3Protocol) as a reference I attached the simulation file.
Its my first time doing this kind of tracing.... (its my first time in everything in ns-3 lately....) , any ideas would be much appreciated.