I try to debug. For example in the HandleRead method I added some lines to print a message:
void PacketSink::HandleRead (Ptr<Socket> socket)
{
NS_LOG_FUNCTION (this << socket);
Ptr<Packet> packet;
Address from;
DelayJitterEstimation GooseDelayJitter;
//Im using this lines to debug
std::string message = "Hello"; // création de la chaîne "Hello"
message += " World !"; // concaténation de " Word !"
std::cout << message << '\n'; // affichage de "Hello World !"
while ((packet = socket->RecvFrom (from)))
{
//capture the Rx_timepstamp
GooseDelayJitter.RecordRx(packet);
if (packet->GetSize () == 0)
{ //EOF
break;
}
m_totalRx += packet->GetSize ();
////nothing is printed yet :(
std::cout << GooseDelayJitter.GetLastDelay().GetSeconds() << std::endl;
std::cout << GooseDelayJitter.GetLastJitter() << std::endl;
if (InetSocketAddress::IsMatchingType (from))
{...
The message is not printed! I think that HandleRead is not called. I found also that PacketSink application "Receive sand consumes traffic generated to an IP address and port. " (
https://www.nsnam.org/doxygen/classns3_1_1_packet_sink.html#details). Im not unsing PacketSocket and my packets are mapped directtly to layer 2. I havve not IP address so I think that this is the reason why My PacketSink doesn't work.
I need to know what do you think?
Thks :)