<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Anil,<div class=""><br class=""></div><div class="">potentially you could do something like the following examples:</div><div class=""><br class=""></div><div class=""><a href="https://github.com/named-data-ndnSIM/ndnSIM/blob/master/tests/unit-tests/helper/ndn-link-control-helper.t.cpp#L62-L65" class="">https://github.com/named-data-ndnSIM/ndnSIM/blob/master/tests/unit-tests/helper/ndn-link-control-helper.t.cpp#L62-L65</a></div><div class=""><a href="https://github.com/named-data-ndnSIM/NFD/blob/NFD-0.3.4-ndnSIM/daemon/face/face-counters.hpp#L188-L212" class="">https://github.com/named-data-ndnSIM/NFD/blob/NFD-0.3.4-ndnSIM/daemon/face/face-counters.hpp#L188-L212</a></div><div class=""><br class=""></div><div class="">Hope that this helps.</div><div class=""><br class=""><div class="">
<div class=""><div class=""><div class=""><span class="" style="float: none; display: inline !important;">Spyridon (Spyros) Mastorakis</span><br class=""><span class="" style="float: none; display: inline !important;">Personal Website: </span><a href="http://cs.ucla.edu/~mastorakis/" class="">http://cs.ucla.edu/~mastorakis/</a><br class=""><span class="" style="float: none; display: inline !important;">Internet Research Laboratory</span><br class=""><span class="" style="float: none; display: inline !important;">Computer Science Department</span><br class=""><span class="" style="float: none; display: inline !important;">UCLA</span></div><div class=""><br class=""></div></div></div>
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On May 4, 2016, at 4:05 PM, Anil Jangam <<a href="mailto:anilj.mailing@gmail.com" class="">anilj.mailing@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi.<div class=""><br class=""></div><div class="">Calculating the size of Interest/Data packet wire, L3 tracer is done using the wireEncode() API. </div><div class=""><br class=""></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px" class=""><div class=""><a href="https://github.com/named-data-ndnSIM/ndnSIM/blob/master/utils/tracers/ndn-l3-rate-tracer.cpp#L294" class="">https://github.com/named-data-ndnSIM/ndnSIM/blob/master/utils/tracers/ndn-l3-rate-tracer.cpp#L294</a></div><div class=""><br class=""></div>if (interest.hasWire()) {<br class="">    std::get<1>(m_stats[face.shared_from_this()]).m_outInterests +=<br class="">    interest.wireEncode().size();<br class="">}</blockquote><div class=""></div><div class=""><br class=""></div><div class="">In the implementation of wireEncode() also, the same check is being done. </div><div class=""><br class=""></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px" class=""><div class=""><a href="https://github.com/named-data-ndnSIM/ndn-cxx/blob/36ec104e23ba5395a8b4df411b776cdbef9c5cd4/src/interest.cpp#L279" class="">https://github.com/named-data-ndnSIM/ndn-cxx/blob/36ec104e23ba5395a8b4df411b776cdbef9c5cd4/src/interest.cpp#L279</a></div>const Block&<br class="">Interest::wireEncode() const<br class="">{<br class="">    if (m_wire.hasWire())<br class="">    return m_wire;<div class="">    ...</div><div class="">}</div></blockquote><div class=""></div><div class=""><br class=""></div><div class="">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?</div><div class=""><br class=""></div><div class="">/anil.</div><div class=""><br class=""></div></div></div></blockquote></div><br class=""></div></body></html>