[ndnSIM] How to calculate size of Interest/Data packet

Anil Jangam anilj.mailing at gmail.com
Wed May 4 16:05:45 PDT 2016


Hi.

Calculating the size of Interest/Data packet wire, L3 tracer is done using
the wireEncode() API.

https://github.com/named-data-ndnSIM/ndnSIM/blob/master/utils/tracers/ndn-l3-rate-tracer.cpp#L294

if (interest.hasWire()) {
    std::get<1>(m_stats[face.shared_from_this()]).m_outInterests +=
    interest.wireEncode().size();
}


In the implementation of wireEncode() also, the same check is being done.

https://github.com/named-data-ndnSIM/ndn-cxx/blob/36ec104e23ba5395a8b4df411b776cdbef9c5cd4/src/interest.cpp#L279
const Block&
Interest::wireEncode() const
{
    if (m_wire.hasWire())
    return m_wire;
    ...
}


Perhaps this is a redundant check inside L3 tracer. But, is this the only
way to know the size of data being transferred over or received from the
face?

/anil.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20160504/99a83ec1/attachment.html>


More information about the ndnSIM mailing list