[ndnSIM] [ndnSIM2.0]: Data packet isn't receiving on the other nodes

Hitesh Wadekar wadekahn at clarkson.edu
Mon Feb 9 13:37:27 PST 2015


Hello Guys,

I started to porting my code to ndnSIM2.0, however, I am facing a weired
issue, It would be really helpful for me if you guys pointed out some
suggestion and the steps/tips to debug or identify the reason why it so.

I have my code working on old version of ndnSIM, we thought that since
recently we launched ndnSIM2.0, we have started to port the code on it. The
issue is I am not able to receive the data packet on the other node.
However, I am able to send interest packet on the all node. The code logic
and everything is same as sample example given for Consume and Producer
App. Also, I have verified the route as well along with signature/
wireEncode.

Since I am receiving 'Interest Packet"  hence looks like FIB entries
(routes) could not be a problem.

Here is sample code that I am using,

void ConsumerApp::SendDataPacket(shared_ptr<const Interest> interest) {
    if (!m_active)
        return;
    NS_LOG_FUNCTION(this << interest);
    std::cout<< "ConsumerApp: Sending a Data Packet -> "<<
interest->getName() << std::endl;

    Name dataName(interest->getName());
    auto dPacket = make_shared<Data>();
    dPacket->setName(dataName);
    dPacket->setFreshnessPeriod(ndn::time::milliseconds(3000));
    dPacket->setContent(make_shared< ::ndn::Buffer>(m_virtualPayloadSize));

    Signature signature;

    SignatureInfo signatureInfo(static_cast<
::ndn::tlv::SignatureTypeValue>(255));

    if (m_keyLocator.size() > 0) {
        signatureInfo.setKeyLocator(m_keyLocator);
    }

    signature.setInfo(signatureInfo);
    signature.setValue(Block(&m_signature, sizeof(m_signature)));

    dPacket->setSignature(signature);
    dPacket->wireEncode();
    std::cout << "\n ConsumerApp: Data packet- > " << dPacket->getName ()
<< " is sending from face -> " << m_face << std::endl;

    m_transmittedDatas(dPacket, this, m_face);
    m_face->onReceiveData(*dPacket);
    std::cout << "\n";
}

I am looking forward to hear from you back.

Thank you.

Regards,
Hitesh Wadekar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20150209/7b617e3d/attachment.html>


More information about the ndnSIM mailing list