<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Thiago,<div class=""><br class=""></div><div class="">that might require some hacking.</div><div class=""><br class=""></div><div class="">I think that this might be the right place to start:</div><div class=""><br class=""></div><div class=""><a href="https://github.com/named-data-ndnSIM/ndnSIM/blob/master/model/ndn-net-device-transport.cpp#L119" class="">https://github.com/named-data-ndnSIM/ndnSIM/blob/master/model/ndn-net-device-transport.cpp#L119</a></div><div class=""><br class=""></div><div class="">In ndnSIM, each simulated node receives NS-3 packets from others and the NDN packets are encapsulated into NS-3 packets. The above method is called when an NS-3 packet is received by a node and extracts the NDN packet from the NS-3 packet. I would guess that the tag you are talking about might be attached to the received NS-3 packet. If my intuition is right, you should be able to extract it in this method and store it for later or pass it to the strategy.</div><div class=""><br class=""></div><div class="">Hope 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><div><blockquote type="cite" class=""><div class="">On Jul 27, 2018, at 12:21 PM, Thiago Teixeira <<a href="mailto:tteixeira@umass.edu" class="">tteixeira@umass.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="WordSection1" style="page: WordSection1; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Hi Spyros,<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Thanks for your email. In summary, we added a SINR packet tag on the node’s WiFi interface, which we want to read the value in the strategy layer. The issue is that we could not find a method to read the SINR tag in the strategy. We are able to create and use other using the NDNLP (as your commits show). The problem is that the SINR tag is a NS-3 tag (not ndnlp).<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">And yes, we are not using sockets whatsoever.<span class="Apple-converted-space"> </span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Regarding your last sentence, do you have any documentation or examples on how to make sure the NS-3 tag is preserved in the NDN packet?<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">I tried this in the strategy,<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">    std::shared_ptr<ns3::SnrTag> tag;<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">    auto sinrTag = interest. template getTag <ns3::ndn::Ns3PacketTag> ();<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">    bool hasTag = sinrTag.getPacket().PeekPacketTag(tag);<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">but I get,<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">    error: ‘class std::shared_ptr<ns3::ndn::Ns3PacketTag>’ has no member named ‘getPacket’<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Thanks for your help,<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Thiago<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><a name="_MailEndCompose" class=""><o:p class=""> </o:p></a></div><span class=""></span><div class=""><div style="border-style: solid none none; border-top-width: 1pt; border-top-color: rgb(225, 225, 225); padding: 3pt 0in 0in;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><b class="">From:</b><span class="Apple-converted-space"> </span>Spyridon (Spyros) Mastorakis [<a href="mailto:mastorakis@cs.ucla.edu" class="">mailto:mastorakis@cs.ucla.edu</a>]<span class="Apple-converted-space"> </span><br class=""><b class="">Sent:</b><span class="Apple-converted-space"> </span>Friday, July 27, 2018 2:20 PM<br class=""><b class="">To:</b><span class="Apple-converted-space"> </span>Rajvardhan Deshmukh <<a href="mailto:rdeshmukh@umass.edu" class="">rdeshmukh@umass.edu</a>><br class=""><b class="">Cc:</b><span class="Apple-converted-space"> </span>NdnSIM <<a href="mailto:ndnSIM@lists.cs.ucla.edu" class="">ndnSIM@lists.cs.ucla.edu</a>>; Thiago Teixeira <<a href="mailto:tteixeira@umass.edu" class="">tteixeira@umass.edu</a>><br class=""><b class="">Subject:</b><span class="Apple-converted-space"> </span>Re: [ndnSIM] SINR packet tag in ndnSIM 2.5<o:p class=""></o:p></div></div></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Hi,<o:p class=""></o:p></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">I am not sure I understand what you are trying to do.<o:p class=""></o:p></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">It seems to me that you are using sockets and some TCP application, but you are trying to use NDN?<o:p class=""></o:p></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">If you want to use an NS-3 tag, you will have to make sure that when you try to get the NDN packet out of the NS-3 packet, you have to preserve the tag. <o:p class=""></o:p></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Thanks,<o:p class=""></o:p></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div class=""><div class=""><div class=""><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Spyridon (Spyros) Mastorakis<br class="">Personal Website: <a href="http://cs.ucla.edu/~mastorakis/" style="color: purple; text-decoration: underline;" class="">http://cs.ucla.edu/~mastorakis/</a><br class="">Internet Research Laboratory<br class="">Computer Science Department<br class="">UCLA<o:p class=""></o:p></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div></div></div></div><div class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">On Jul 24, 2018, at 11:32 AM, Rajvardhan Deshmukh <<a href="mailto:rdeshmukh@umass.edu" style="color: purple; text-decoration: underline;" class="">rdeshmukh@umass.edu</a>> wrote:<o:p class=""></o:p></div></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div class=""><div class=""><div class=""><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10pt; font-family: 'Courier New';" class="">Hi Spyros,<br class=""><br class="">We intend to access the SINR/SNR in the forwarding strategy.<br class=""><br class="">1) As i was going through the<span class="Apple-converted-space"> </span><a href="https://github.com/named-data-ndnSIM/NFD/commit/3bebd1190b1c45f8acaa0fe1d3a3100651a062e4#diff-bcc8f3e64bcd66371436f906a83e51b5" style="color: purple; text-decoration: underline;" class="">links</a><span class="Apple-converted-space"> </span>Spyros sent, i noticed that they use an interest or data object with API setTag. But we don't have access to those objects in the PHY (wifi) layer. So i'm not sure as to which object i should use the SetTag API.<span class="Apple-converted-space"> </span><strong class=""><span style="font-family: 'Courier New';" class="">Should we pursue this line of thoughts?</span></strong><o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10pt; font-family: 'Courier New';" class=""> <o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><strong class=""><span style="font-size: 10pt; font-family: 'Courier New';" class="">We also looked at</span></strong><span style="font-size: 10pt; font-family: 'Courier New';" class=""><span class="Apple-converted-space"> </span><strong class=""><span style="font-family: 'Courier New';" class="">ns3 related posts.</span></strong><br class="">2) So, we looked at ns3 related posts, which suggest that we need to attach the SNR value to the Packet in the PHY layer.<br class="">We added a SINR packet tag in the src/wifi/model/<a href="http://wifi-phy.cc/" style="color: purple; text-decoration: underline;" class="">wifi-phy.cc</a><span class="Apple-converted-space"> </span>EndReceive() method using the following snippet:<br class=""><br class="">  SnrTag tag;<br class=""><br class="">  tag.Set(signalNoise.signal - signalNoise.noise);<br class=""><br class="">  if (! packet->PeekPacketTag (tag)){<br class=""><br class="">     packet->AddPacketTag (tag);<br class=""><br class="">  }<o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10pt; font-family: 'Courier New';" class=""><br class="">The implementation of the SINR packet tag is available at src/wifi/model/<a href="http://snr-tag.cc/" style="color: purple; text-decoration: underline;" class="">snr-tag.cc</a>.<o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10pt; font-family: 'Courier New';" class="">But we get an error during reading this Tag in the forwarding strategy:<o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10pt; font-family: 'Courier New';" class=""> <o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10pt; font-family: 'Courier New';" class=""> <o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10pt; font-family: 'Courier New';" class="">ns3::Ptr<ns3::Socket>m_socket=node->GetObject<ns3::Socket>();<span class="Apple-converted-space"> </span><strong class=""><span style="font-family: 'Courier New';" class="">//(line of concern)</span></strong>                                   <span class="Apple-converted-space"> </span><br class="">ns3::Ptr<ns3::Packet>packet=m_socket->Recv();                                                                                                                    <span class="Apple-converted-space"> </span><br class="">ns3::SnrTag tag;                                                                                     <span class="Apple-converted-space"> </span><br class="">if(packet->PeekPacketTag(tag)){                                                                      <br class="">        NS_LOG_DEBUG ("Received Packet with SRN = " << tag.Get());                                          <br class="">       <o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10pt; font-family: 'Courier New';" class="">std::cout<< "\nSNR:"<< tag.Get()<< std::endl;                                                       <br class="">                                                                                                          <span class="Apple-converted-space"> </span><br class="">}<o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><strong class=""><span style="font-size: 10pt; font-family: 'Courier New';" class="">Note: I think we get to get the right socket (check line of concern) using something similar to what they do in the application layer in ns3 (GetObject<OnOffApplication> ()->GetSocket ())</span></strong><span style="font-size: 10pt; font-family: 'Courier New';" class=""><o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10pt; font-family: 'Courier New';" class=""> <o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10pt; font-family: 'Courier New';" class="">Can you assist please? Let me know if you need more info.<o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10pt; font-family: 'Courier New';" class=""> <o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10pt; font-family: 'Courier New';" class="">Thanks,<o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10pt; font-family: 'Courier New';" class="">Raj<o:p class=""></o:p></span></div></div></div><blockquote style="border-style: none none none solid; border-left-width: 1.5pt; border-left-color: rgb(16, 16, 255); padding: 0in 0in 0in 5pt; margin-left: 0in; margin-right: 0in;" class=""><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10pt; font-family: 'Courier New';" class="">-------------------------------------------------------------------<br class="">FROM: Spyridon (Spyros) Mastorakis [mailto:<a href="mailto:mastorakis@cs.ucla.edu" style="color: purple; text-decoration: underline;" class="">mastorakis@cs.ucla.edu</a>]<span class="Apple-converted-space"> </span><br class="">SENT: Monday, July 23, 2018 9:43 PM<br class="">TO: Thiago Teixeira <<a href="mailto:tteixeira@umass.edu" style="color: purple; text-decoration: underline;" class="">tteixeira@umass.edu</a>><br class="">CC: ndnsim <<a href="mailto:ndnsim@lists.cs.ucla.edu" style="color: purple; text-decoration: underline;" class="">ndnsim@lists.cs.ucla.edu</a>><br class="">SUBJECT: Re: [ndnSIM] SINR packet tag in ndnSIM 2.5<span class="Apple-converted-space"> </span><br class=""><br class="">Hi Thiago,<br class=""><br class="">I think we have converted our NS-3 tags to NDN Link Protocol (LP) tags.<br class="">For more details, take a look at these commits (HopCount tag):<span class="Apple-converted-space"> </span><br class=""><br class=""><a href="https://github.com/named-data-ndnSIM/NFD/commit/3bebd1190b1c45f8acaa0fe1d3a3100651a062e4" target="_blank" style="color: purple; text-decoration: underline;" class="">https://github.com/named-data-ndnSIM/NFD/commit/3bebd1190b1c45f8acaa0fe1d3a3100651a062e4</a><br class=""><br class=""><br class=""><a href="https://github.com/named-data-ndnSIM/ndn-cxx/commit/e1ae096efd8ad503ce7dbd616ee174afaed6c66b" target="_blank" style="color: purple; text-decoration: underline;" class="">https://github.com/named-data-ndnSIM/ndn-cxx/commit/e1ae096efd8ad503ce7dbd616ee174afaed6c66b</a><br class=""><br class=""><br class="">Thanks,<span class="Apple-converted-space"> </span><br class=""><br class="">Spyridon (Spyros) Mastorakis<br class="">Personal Website:<span class="Apple-converted-space"> </span><a href="http://cs.ucla.edu/~mastorakis/" target="_blank" style="color: purple; text-decoration: underline;" class="">http://cs.ucla.edu/~mastorakis/</a><br class="">Internet Research Laboratory<br class="">Computer Science Department<br class="">UCLA<span class="Apple-converted-space"> </span><br class=""><br class=""><br class=""><o:p class=""></o:p></span></div><blockquote style="border-style: none none none solid; border-left-width: 1.5pt; border-left-color: rgb(16, 16, 255); padding: 0in 0in 0in 5pt; margin-left: 0in; margin-right: 0in;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10pt; font-family: 'Courier New';" class="">On Jul 23, 2018, at 2:52 PM, Thiago Teixeira <<a href="mailto:tteixeira@umass.edu" style="color: purple; text-decoration: underline;" class="">tteixeira@umass.edu</a>><br class="">wrote:<span class="Apple-converted-space"> </span><o:p class=""></o:p></span></div><div class=""><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10pt; font-family: 'Courier New';" class="">Hi Spyros,<br class=""><br class="">We intend to access the SINR/SNR in the forwarding strategy.<br class=""><br class="">1) As i was going through the<span class="Apple-converted-space"> </span><a href="https://github.com/named-data-ndnSIM/NFD/commit/3bebd1190b1c45f8acaa0fe1d3a3100651a062e4#diff-bcc8f3e64bcd66371436f906a83e51b5" style="color: purple; text-decoration: underline;" class="">links</a><span class="Apple-converted-space"> </span>Spyros sent, i noticed that they use an interest or data object with API setTag. But we don't have access to those objects in the PHY (wifi) layer. So i'm not sure as to which object i should use the SetTag API.<o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10pt; font-family: 'Courier New';" class=""> <o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10pt; font-family: 'Courier New';" class=""><br class=""><br class="">2) So, we looked at ns3 related posts, which suggest that we need to attach the SNR value to the Packet in the PHY layer.<br class="">We added a SINR packet tag in the src/wifi/model/<a href="http://wifi-phy.cc/" style="color: purple; text-decoration: underline;" class="">wifi-phy.cc</a><span class="Apple-converted-space"> </span>EndReceive() method using the following snippet:<br class=""><br class="">  SnrTag tag;<br class=""><br class="">  tag.Set(signalNoise.signal - signalNoise.noise);<br class=""><br class="">  if (! packet->PeekPacketTag (tag)){<br class=""><br class="">     packet->AddPacketTag (tag);<br class=""><br class="">  }<o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10pt; font-family: 'Courier New';" class=""><br class="">The implementation of the SINR packet tag is available at src/wifi/model/<a href="http://snr-tag.cc/" style="color: purple; text-decoration: underline;" class="">snr-tag.cc</a>.<o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10pt; font-family: 'Courier New';" class="">But we get an error during reading this Tag in the forwarding strategy:<o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10pt; font-family: 'Courier New';" class=""> <o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10pt; font-family: 'Courier New';" class=""> <o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10pt; font-family: 'Courier New';" class="">ns3::Ptr<ns3::Socket>m_socket=node->GetObject<ns3::Socket>();                                     <br class="">ns3::Ptr<ns3::Packet>packet=m_socket->Recv();                                                                                                                    <span class="Apple-converted-space"> </span><br class="">ns3::SnrTag tag;                                                                                     <span class="Apple-converted-space"> </span><br class="">if(packet->PeekPacketTag(tag)){                                                                      <br class="">        NS_LOG_DEBUG ("Received Packet with SRN = " << tag.Get());                                          <br class="">       <o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10pt; font-family: 'Courier New';" class="">std::cout<< "\nSNR:"<< tag.Get()<< std::endl;                                                       <br class="">                                                                                                          <span class="Apple-converted-space"> </span><br class="">}<o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><strong class=""><span style="font-size: 10pt; font-family: 'Courier New';" class="">Note: I think we get to get the right socket using something similar to what they do in the application layer in ns3 (GetObject<OnOffApplication> ()->GetSocket ())</span></strong><span style="font-size: 10pt; font-family: 'Courier New';" class=""><o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10pt; font-family: 'Courier New';" class=""> <o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10pt; font-family: 'Courier New';" class="">Can you assist please?<o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10pt; font-family: 'Courier New';" class=""> <o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10pt; font-family: 'Courier New';" class="">Thanks,<o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10pt; font-family: 'Courier New';" class="">Raj<o:p class=""></o:p></span></div></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10pt; font-family: 'Courier New';" class="">-------------------------------------------------------------------<br class="">FROM: Spyridon (Spyros) Mastorakis [mailto:<a href="mailto:mastorakis@cs.ucla.edu" style="color: purple; text-decoration: underline;" class="">mastorakis@cs.ucla.edu</a>]<span class="Apple-converted-space"> </span><br class="">SENT: Monday, July 23, 2018 9:43 PM<br class="">TO: Thiago Teixeira <<a href="mailto:tteixeira@umass.edu" style="color: purple; text-decoration: underline;" class="">tteixeira@umass.edu</a>><br class="">CC: ndnsim <<a href="mailto:ndnsim@lists.cs.ucla.edu" style="color: purple; text-decoration: underline;" class="">ndnsim@lists.cs.ucla.edu</a>><br class="">SUBJECT: Re: [ndnSIM] SINR packet tag in ndnSIM 2.5<span class="Apple-converted-space"> </span><br class=""><br class="">Hi Thiago,<br class=""><br class="">I think we have converted our NS-3 tags to NDN Link Protocol (LP) tags.<br class="">For more details, take a look at these commits (HopCount tag):<span class="Apple-converted-space"> </span><br class=""><br class=""><a href="https://github.com/named-data-ndnSIM/NFD/commit/3bebd1190b1c45f8acaa0fe1d3a3100651a062e4" target="_blank" style="color: purple; text-decoration: underline;" class="">https://github.com/named-data-ndnSIM/NFD/commit/3bebd1190b1c45f8acaa0fe1d3a3100651a062e4</a><br class=""><br class=""><br class=""><a href="https://github.com/named-data-ndnSIM/ndn-cxx/commit/e1ae096efd8ad503ce7dbd616ee174afaed6c66b" target="_blank" style="color: purple; text-decoration: underline;" class="">https://github.com/named-data-ndnSIM/ndn-cxx/commit/e1ae096efd8ad503ce7dbd616ee174afaed6c66b</a><br class=""><br class=""><br class="">Thanks,<span class="Apple-converted-space"> </span><br class=""><br class="">Spyridon (Spyros) Mastorakis<br class="">Personal Website:<span class="Apple-converted-space"> </span><a href="http://cs.ucla.edu/~mastorakis/" target="_blank" style="color: purple; text-decoration: underline;" class="">http://cs.ucla.edu/~mastorakis/</a><br class="">Internet Research Laboratory<br class="">Computer Science Department<br class="">UCLA<span class="Apple-converted-space"> </span><br class=""><br class=""><br class=""><o:p class=""></o:p></span></div><blockquote style="border-style: none none none solid; border-left-width: 1.5pt; border-left-color: rgb(16, 16, 255); padding: 0in 0in 0in 5pt; margin-left: 0in; margin-right: 0in;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10pt; font-family: 'Courier New';" class="">On Jul 23, 2018, at 2:52 PM, Thiago Teixeira <<a href="mailto:tteixeira@umass.edu" style="color: purple; text-decoration: underline;" class="">tteixeira@umass.edu</a>><br class="">wrote:<span class="Apple-converted-space"> </span><br class=""><br class="">Hi all,<span class="Apple-converted-space"> </span><br class=""><br class="">We added a SINR packet tag in the src/wifi/model/<a href="http://wifi-phy.cc/" style="color: purple; text-decoration: underline;" class="">wifi-phy.cc</a><span class="Apple-converted-space"> </span>[<a href="https://github.com/named-data-ndnSIM/ns-3-dev/blob/ndnSIM-v2.5/src/wifi/model/wifi-phy.cc#L2541" target="_blank" style="color: purple; text-decoration: underline;" class="">1</a>]<br class="">EndReceive() method using the following snippet:<span class="Apple-converted-space"> </span><br class=""><br class="">SnrTag tag;<span class="Apple-converted-space"> </span><br class=""><br class="">tag.Set(signalNoise.signal - signalNoise.noise);<span class="Apple-converted-space"> </span><br class=""><br class="">if (! packet->PeekPacketTag (tag)){<span class="Apple-converted-space"> </span><br class=""><br class="">packet->AddPacketTag (tag);<span class="Apple-converted-space"> </span><br class=""><br class="">}<span class="Apple-converted-space"> </span><br class=""><br class="">The implementation of the SINR packet tag is available at<br class="">src/wifi/model/<a href="http://snr-tag.cc/" style="color: purple; text-decoration: underline;" class="">snr-tag.cc</a><span class="Apple-converted-space"> </span>[<a href="https://github.com/named-data-ndnSIM/ns-3-dev/blob/ndnSIM-v2.5/src/wifi/model/snr-tag.cc" target="_blank" style="color: purple; text-decoration: underline;" class="">2</a>].<span class="Apple-converted-space"> </span><br class=""><br class="">We would like to get the value of the tag in the forwarding strategy.<br class="">Before ndnSIM 2.3, we could just use something like this:<span class="Apple-converted-space"> </span><br class=""><br class="">SnrTag tag;<span class="Apple-converted-space"> </span><br class=""><br class="">Ptr<Packet> payload = ConstCast<Packet>(interest->GetPayload());<span class="Apple-converted-space"> </span><br class=""><br class="">payload->PeekPacketTag (tag);<span class="Apple-converted-space"> </span><br class=""><br class="">but in ndnSIM 2.5 we could not find an equivalent method. I think we<br class="">need to convert the SINR tag to type ns3::ndn::ns3PacketTag, is that<br class="">correct?<span class="Apple-converted-space"> </span><br class=""><br class="">Can you assist please?<span class="Apple-converted-space"> </span><br class=""><br class="">Thanks,<span class="Apple-converted-space"> </span><br class=""><br class="">Thiago<span class="Apple-converted-space"> </span><br class=""><br class="">_______________________________________________<br class="">ndnSIM mailing list<br class=""><a href="mailto:ndnSIM@lists.cs.ucla.edu" style="color: purple; text-decoration: underline;" class="">ndnSIM@lists.cs.ucla.edu</a><br class=""><a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" target="_blank" style="color: purple; text-decoration: underline;" class="">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a><span class="Apple-converted-space"> </span>[<a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" target="_blank" style="color: purple; text-decoration: underline;" class="">3</a>]<o:p class=""></o:p></span></div></blockquote><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10pt; font-family: 'Courier New';" class=""><br class="">  <br class=""><br class="">Links:<br class="">------<br class="">[1]<span class="Apple-converted-space"> </span><a href="https://github.com/named-data-ndnSIM/ns-3-dev/blob/ndnSIM-v2.5/src/wifi/model/wifi-phy.cc#L2541" target="_blank" style="color: purple; text-decoration: underline;" class="">https://github.com/named-data-ndnSIM/ns-3-dev/blob/ndnSIM-v2.5/src/wifi/model/wifi-phy.cc#L2541</a><br class="">[2]<span class="Apple-converted-space"> </span><a href="https://github.com/named-data-ndnSIM/ns-3-dev/blob/ndnSIM-v2.5/src/wifi/model/snr-tag.cc" target="_blank" style="color: purple; text-decoration: underline;" class="">https://github.com/named-data-ndnSIM/ns-3-dev/blob/ndnSIM-v2.5/src/wifi/model/snr-tag.cc</a><br class="">[3]<span class="Apple-converted-space"> </span><a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" target="_blank" style="color: purple; text-decoration: underline;" class="">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a><o:p class=""></o:p></span></div></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10pt; font-family: 'Courier New';" class=""><br class=""><br class="">Hi all,<span class="Apple-converted-space"> </span><br class=""><br class="">We added a SINR packet tag in the src/wifi/model/<a href="http://wifi-phy.cc/" style="color: purple; text-decoration: underline;" class="">wifi-phy.cc</a><span class="Apple-converted-space"> </span>[<a href="https://github.com/named-data-ndnSIM/ns-3-dev/blob/ndnSIM-v2.5/src/wifi/model/wifi-phy.cc#L2541" target="_blank" style="color: purple; text-decoration: underline;" class="">1</a>]<br class="">EndReceive() method using the following snippet:<span class="Apple-converted-space"> </span><br class=""><br class="">SnrTag tag;<span class="Apple-converted-space"> </span><br class=""><br class="">tag.Set(signalNoise.signal - signalNoise.noise);<span class="Apple-converted-space"> </span><br class=""><br class="">if (! packet->PeekPacketTag (tag)){<span class="Apple-converted-space"> </span><br class=""><br class="">packet->AddPacketTag (tag);<span class="Apple-converted-space"> </span><br class=""><br class="">}<span class="Apple-converted-space"> </span><br class=""><br class="">The implementation of the SINR packet tag is available at<br class="">src/wifi/model/<a href="http://snr-tag.cc/" style="color: purple; text-decoration: underline;" class="">snr-tag.cc</a><span class="Apple-converted-space"> </span>[<a href="https://github.com/named-data-ndnSIM/ns-3-dev/blob/ndnSIM-v2.5/src/wifi/model/snr-tag.cc" target="_blank" style="color: purple; text-decoration: underline;" class="">2</a>].<span class="Apple-converted-space"> </span><br class=""><br class="">We would like to get the value of the tag in the forwarding strategy.<br class="">Before ndnSIM 2.3, we could just use something like this:<span class="Apple-converted-space"> </span><br class=""><br class="">SnrTag tag;<span class="Apple-converted-space"> </span><br class=""><br class="">Ptr<Packet> payload = ConstCast<Packet>(interest->GetPayload());<span class="Apple-converted-space"> </span><br class=""><br class="">payload->PeekPacketTag (tag);<span class="Apple-converted-space"> </span><br class=""><br class="">but in ndnSIM 2.5 we could not find an equivalent method. I think we<br class="">need to convert the SINR tag to type ns3::ndn::ns3PacketTag, is that<br class="">correct?<span class="Apple-converted-space"> </span><br class=""><br class="">Can you assist please?<span class="Apple-converted-space"> </span><br class=""><br class="">Thanks,<span class="Apple-converted-space"> </span><br class=""><br class="">Thiago<span class="Apple-converted-space"> </span><br class=""><br class="">_______________________________________________<br class="">ndnSIM mailing list<br class=""><a href="mailto:ndnSIM@lists.cs.ucla.edu" style="color: purple; text-decoration: underline;" class="">ndnSIM@lists.cs.ucla.edu</a><br class=""><a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" target="_blank" style="color: purple; text-decoration: underline;" class="">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a><span class="Apple-converted-space"> </span>[<a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" target="_blank" style="color: purple; text-decoration: underline;" class="">3</a>]<o:p class=""></o:p></span></div></blockquote><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10pt; font-family: 'Courier New';" class=""><br class="">  <br class=""><br class="">Links:<br class="">------<br class="">[1]<span class="Apple-converted-space"> </span><a href="https://github.com/named-data-ndnSIM/ns-3-dev/blob/ndnSIM-v2.5/src/wifi/model/wifi-phy.cc#L2541" target="_blank" style="color: purple; text-decoration: underline;" class="">https://github.com/named-data-ndnSIM/ns-3-dev/blob/ndnSIM-v2.5/src/wifi/model/wifi-phy.cc#L2541</a><br class="">[2]<span class="Apple-converted-space"> </span><a href="https://github.com/named-data-ndnSIM/ns-3-dev/blob/ndnSIM-v2.5/src/wifi/model/snr-tag.cc" target="_blank" style="color: purple; text-decoration: underline;" class="">https://github.com/named-data-ndnSIM/ns-3-dev/blob/ndnSIM-v2.5/src/wifi/model/snr-tag.cc</a><br class="">[3]<span class="Apple-converted-space"> </span><a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" target="_blank" style="color: purple; text-decoration: underline;" class="">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a></span></div></div></blockquote></div></div></blockquote></div></div></div></div></blockquote></div><br class=""></div></body></html>