<div dir="ltr">Dear All,<div><br></div><div>I just found that I should use the Interest and ContentObject <span style="color:rgb(0,0,0);font-family:'Lucida Grande',Verdana,Geneva,Arial,sans-serif;font-size:12px;line-height:15px">Constructors to keep the header of a packet.</span></div>
<div>In addition, to check whether the considering packet is Interest or Data, I can simply check the packet's size.</div><div>However, If there is any more direct way to do so, please let me know.</div><div style>Thanks a lot,</div>
<div style><br></div><div style>Regards,</div><div style>Saran Tarnoi</div><div><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Saran Tarnoi</b> <span dir="ltr"><<a href="mailto:sarantarnoi@gmail.com">sarantarnoi@gmail.com</a>></span><br>
Date: 2013/5/30<br>Subject: How to trace the interest accessing each node?<br>To: Alex Afanasyev <<a href="mailto:alexander.afanasyev@ucla.edu">alexander.afanasyev@ucla.edu</a>>, <a href="mailto:ndnsim@lists.cs.ucla.edu">ndnsim@lists.cs.ucla.edu</a><br>
<br><br><div dir="ltr">Dear Alex and All,<div><br></div><div>I would like to record the interests and their numbers that access each node.</div><div>Specifically, I want to study the characteristic of the interest traffic at different nodes.<br>

</div><div>I tried observing the received packets at each face in ndn:Face but I could neither get the header nor type of the packet.</div><div>I followed this code (<a href="http://polythinking.wordpress.com/2012/05/30/ns-3-network-simulator-how-to-find-a-specific-header-in-packet-in-ns-3/" target="_blank">http://polythinking.wordpress.com/2012/05/30/ns-3-network-simulator-how-to-find-a-specific-header-in-packet-in-ns-3/</a>) but it didn't work.</div>

<div><br></div><div>To add header to a packet, we can do:<br>packet->AddHeader (interestHeader);<br></div><div><br></div><div>Is there any way to do:</div><div>packet->GetContentName (); </div>
<div>packet->GetType ();</div><div>and get the output like:</div><div>"/prefix/0"</div><div>"Interest or Data"</div><div>?</div><div><br></div><div>Would you kindly tell me how can I get that information?</div>

<div>Thanks in advance for your time.</div><span class=""><font color="#888888"><div><div><br></div>-- <br>Regards,<div>Saran Tarnoi</div><div>Graduate Student</div><div>Department of Informatics</div><div>The Graduate University for Advanced Studies (Sokendai)</div>


<div>Tokyo, Japan</div>
</div></font></span></div>
</div><div><br></div>
</div></div>