<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,<div class=""><br class=""></div><div class="">I am not sure I understand what you are trying to do.</div><div class=""><br class=""></div><div class="">It seems to me that you are using sockets and some TCP application, but you are trying to use NDN?</div><div class=""><br class=""></div><div 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. </div><div class=""><br class=""></div><div class="">Thanks,</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 24, 2018, at 11:32 AM, Rajvardhan Deshmukh <<a href="mailto:rdeshmukh@umass.edu" class="">rdeshmukh@umass.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" class=""><div style="font-size: 10pt; font-family: Verdana,Geneva,sans-serif" class="">
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">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 <a href="https://github.com/named-data-ndnSIM/NFD/commit/3bebd1190b1c45f8acaa0fe1d3a3100651a062e4#diff-bcc8f3e64bcd66371436f906a83e51b5" class="">links</a> 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. <strong class="">Should we pursue this line of thoughts?</strong></div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"><strong class="">We also looked at</strong> <strong class="">ns3 related posts.</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" class="">wifi-phy.cc</a> 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="">   }</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"><br class=""> The implementation of the SINR packet tag is available at src/wifi/model/<a href="http://snr-tag.cc" class="">snr-tag.cc</a>.</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">But we get an error during reading this Tag in the forwarding strategy:</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">ns3::Ptr<ns3::Socket>m_socket=node->GetObject<ns3::Socket>(); <strong class="">//(line of concern)</strong>                                     <br class="">ns3::Ptr<ns3::Packet>packet=m_socket->Recv();                                                                                                                     <br class="">ns3::SnrTag tag;                                                                                      <br class="">if(packet->PeekPacketTag(tag)){                                                                      <br class="">        NS_LOG_DEBUG ("Received Packet with SRN = " << tag.Get());                                          <br class="">       </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">std::cout<< "\nSNR:"<< tag.Get()<< std::endl;                                                       <br class="">                                                                                                           <br class="">}</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"><strong 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 ())</strong></div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">Can you assist please? Let me know if you need more info.</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">Thanks,</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">Raj</div>
</div>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0" class="">
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">-------------------------------------------------------------------<br class=""> FROM: Spyridon (Spyros) Mastorakis [mailto:<a href="mailto:mastorakis@cs.ucla.edu" class="">mastorakis@cs.ucla.edu</a>] <br class=""> SENT: Monday, July 23, 2018 9:43 PM<br class=""> TO: Thiago Teixeira <<a href="mailto:tteixeira@umass.edu" class="">tteixeira@umass.edu</a>><br class=""> CC: ndnsim <<a href="mailto:ndnsim@lists.cs.ucla.edu" class="">ndnsim@lists.cs.ucla.edu</a>><br class=""> SUBJECT: Re: [ndnSIM] SINR packet tag in ndnSIM 2.5 <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): <br class=""> <br class=""> <a href="https://github.com/named-data-ndnSIM/NFD/commit/3bebd1190b1c45f8acaa0fe1d3a3100651a062e4" target="_blank" rel="noreferrer" 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" rel="noreferrer" class="">https://github.com/named-data-ndnSIM/ndn-cxx/commit/e1ae096efd8ad503ce7dbd616ee174afaed6c66b</a><br class=""> <br class=""> <br class=""> Thanks, <br class=""> <br class=""> Spyridon (Spyros) Mastorakis<br class=""> Personal Website: <a href="http://cs.ucla.edu/~mastorakis/" target="_blank" rel="noreferrer" class="">http://cs.ucla.edu/~mastorakis/</a><br class=""> Internet Research Laboratory<br class=""> Computer Science Department<br class=""> UCLA <br class=""> <br class="">
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0" class="">On Jul 23, 2018, at 2:52 PM, Thiago Teixeira <<a href="mailto:tteixeira@umass.edu" class="">tteixeira@umass.edu</a>><br class=""> wrote:
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">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 <a href="https://github.com/named-data-ndnSIM/NFD/commit/3bebd1190b1c45f8acaa0fe1d3a3100651a062e4#diff-bcc8f3e64bcd66371436f906a83e51b5" class="">links</a> 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.</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"><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" class="">wifi-phy.cc</a> 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="">   }</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"><br class=""> The implementation of the SINR packet tag is available at src/wifi/model/<a href="http://snr-tag.cc" class="">snr-tag.cc</a>.</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">But we get an error during reading this Tag in the forwarding strategy:</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">ns3::Ptr<ns3::Socket>m_socket=node->GetObject<ns3::Socket>();                                     <br class="">ns3::Ptr<ns3::Packet>packet=m_socket->Recv();                                                                                                                     <br class="">ns3::SnrTag tag;                                                                                      <br class="">if(packet->PeekPacketTag(tag)){                                                                      <br class="">        NS_LOG_DEBUG ("Received Packet with SRN = " << tag.Get());                                          <br class="">       </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">std::cout<< "\nSNR:"<< tag.Get()<< std::endl;                                                       <br class="">                                                                                                           <br class="">}</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"><strong 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 ())</strong></div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">Can you assist please?</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">Thanks,</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">Raj</div>
</div>
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">-------------------------------------------------------------------<br class=""> FROM: Spyridon (Spyros) Mastorakis [mailto:<a href="mailto:mastorakis@cs.ucla.edu" class="">mastorakis@cs.ucla.edu</a>] <br class=""> SENT: Monday, July 23, 2018 9:43 PM<br class=""> TO: Thiago Teixeira <<a href="mailto:tteixeira@umass.edu" class="">tteixeira@umass.edu</a>><br class=""> CC: ndnsim <<a href="mailto:ndnsim@lists.cs.ucla.edu" class="">ndnsim@lists.cs.ucla.edu</a>><br class=""> SUBJECT: Re: [ndnSIM] SINR packet tag in ndnSIM 2.5 <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): <br class=""> <br class=""> <a href="https://github.com/named-data-ndnSIM/NFD/commit/3bebd1190b1c45f8acaa0fe1d3a3100651a062e4" target="_blank" rel="noreferrer" 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" rel="noreferrer" class="">https://github.com/named-data-ndnSIM/ndn-cxx/commit/e1ae096efd8ad503ce7dbd616ee174afaed6c66b</a><br class=""> <br class=""> <br class=""> Thanks, <br class=""> <br class=""> Spyridon (Spyros) Mastorakis<br class=""> Personal Website: <a href="http://cs.ucla.edu/~mastorakis/" target="_blank" rel="noreferrer" class="">http://cs.ucla.edu/~mastorakis/</a><br class=""> Internet Research Laboratory<br class=""> Computer Science Department<br class=""> UCLA <br class=""> <br class="">
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0" class="">On Jul 23, 2018, at 2:52 PM, Thiago Teixeira <<a href="mailto:tteixeira@umass.edu" class="">tteixeira@umass.edu</a>><br class=""> wrote: <br class=""> <br class=""> Hi all, <br class=""> <br class=""> We added a SINR packet tag in the src/wifi/model/<a href="http://wifi-phy.cc" class="">wifi-phy.cc</a> [<a href="https://github.com/named-data-ndnSIM/ns-3-dev/blob/ndnSIM-v2.5/src/wifi/model/wifi-phy.cc#L2541" target="_blank" rel="noreferrer" class="">1</a>]<br class=""> 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=""> } <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" class="">snr-tag.cc</a> [<a href="https://github.com/named-data-ndnSIM/ns-3-dev/blob/ndnSIM-v2.5/src/wifi/model/snr-tag.cc" target="_blank" rel="noreferrer" class="">2</a>]. <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: <br class=""> <br class=""> SnrTag tag; <br class=""> <br class=""> Ptr<Packet> payload = ConstCast<Packet>(interest->GetPayload()); <br class=""> <br class=""> payload->PeekPacketTag (tag); <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? <br class=""> <br class=""> Can you assist please? <br class=""> <br class=""> Thanks, <br class=""> <br class=""> Thiago <br class=""> <br class=""> _______________________________________________<br class=""> ndnSIM mailing list<br class=""> <a href="mailto:ndnSIM@lists.cs.ucla.edu" class="">ndnSIM@lists.cs.ucla.edu</a><br class=""> <a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" target="_blank" rel="noreferrer" class="">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a> [<a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" target="_blank" rel="noreferrer" class="">3</a>]</blockquote>
<br class="">   <br class=""> <br class=""> Links:<br class=""> ------<br class=""> [1] <a href="https://github.com/named-data-ndnSIM/ns-3-dev/blob/ndnSIM-v2.5/src/wifi/model/wifi-phy.cc#L2541" target="_blank" rel="noreferrer" 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] <a href="https://github.com/named-data-ndnSIM/ns-3-dev/blob/ndnSIM-v2.5/src/wifi/model/snr-tag.cc" target="_blank" rel="noreferrer" class="">https://github.com/named-data-ndnSIM/ns-3-dev/blob/ndnSIM-v2.5/src/wifi/model/snr-tag.cc</a><br class=""> [3] <a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" target="_blank" rel="noreferrer" class="">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a></div>
<br class=""> <br class=""> Hi all, <br class=""> <br class=""> We added a SINR packet tag in the src/wifi/model/<a href="http://wifi-phy.cc" class="">wifi-phy.cc</a> [<a href="https://github.com/named-data-ndnSIM/ns-3-dev/blob/ndnSIM-v2.5/src/wifi/model/wifi-phy.cc#L2541" target="_blank" rel="noreferrer" class="">1</a>]<br class=""> 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=""> } <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" class="">snr-tag.cc</a> [<a href="https://github.com/named-data-ndnSIM/ns-3-dev/blob/ndnSIM-v2.5/src/wifi/model/snr-tag.cc" target="_blank" rel="noreferrer" class="">2</a>]. <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: <br class=""> <br class=""> SnrTag tag; <br class=""> <br class=""> Ptr<Packet> payload = ConstCast<Packet>(interest->GetPayload()); <br class=""> <br class=""> payload->PeekPacketTag (tag); <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? <br class=""> <br class=""> Can you assist please? <br class=""> <br class=""> Thanks, <br class=""> <br class=""> Thiago <br class=""> <br class=""> _______________________________________________<br class=""> ndnSIM mailing list<br class=""> <a href="mailto:ndnSIM@lists.cs.ucla.edu" class="">ndnSIM@lists.cs.ucla.edu</a><br class=""> <a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" target="_blank" rel="noreferrer" class="">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a> [<a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" target="_blank" rel="noreferrer" class="">3</a>]</blockquote>
<br class="">   <br class=""> <br class=""> Links:<br class=""> ------<br class=""> [1] <a href="https://github.com/named-data-ndnSIM/ns-3-dev/blob/ndnSIM-v2.5/src/wifi/model/wifi-phy.cc#L2541" target="_blank" rel="noreferrer" 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] <a href="https://github.com/named-data-ndnSIM/ns-3-dev/blob/ndnSIM-v2.5/src/wifi/model/snr-tag.cc" target="_blank" rel="noreferrer" class="">https://github.com/named-data-ndnSIM/ns-3-dev/blob/ndnSIM-v2.5/src/wifi/model/snr-tag.cc</a><br class=""> [3] <a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" target="_blank" rel="noreferrer" class="">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a></div>
</blockquote>
</div>
</div></blockquote></div><br class=""></div></body></html>