[ndnSIM] access stored content in cache from forward.cpp

Zeinab Rezaiefar zeinab.rezaiefar at gmail.com
Mon Dec 2 00:02:24 PST 2019


Thanks you so much Prof. Spyros for your help. It works. I have just needed
to put these lines:
Name n="/localhost";
if (!n.isPrefixOf(csentry->GetName())){
}
to filter a name that starts with " /localhost" prefix.
best regards
Zeinab

On Mon, Dec 2, 2019 at 1:19 PM Spyridon Mastorakis <smastorakis at unomaha.edu>
wrote:

> Include an if statement and filter packets based on their prefix. If you
> find a packet with a name that starts with “/localhost”, you can safely
> ignore it.
>
> This method might be useful:
> https://github.com/named-data/ndn-cxx/blob/master/ndn-cxx/name.hpp#L553
>
> Thanks,
>
> Spyridon (Spyros) Mastorakis
> Assistant Professor
> Computer Science Department
> University of Nebraska, Omaha
> Peter Kiewit Institute Room 175A
> https://sites.google.com/site/spyridonmastorakis
>
> On Dec 1, 2019, at 6:49 PM, Zeinab Rezaiefar <zeinab.rezaiefar at gmail.com>
> wrote:
>
> Thank you so much Prof. Spyros for your email. However, I need to
> calculate some metrics for just data messages which are requested by users
> and saved in the cache ( I do not want to consider to consider data packet
> generated by NFD) . How I can access it? is there any field that can
> distinguish these data from each other?
> Thanks
> Best regards
> Zeinab
>
> On Sat, Nov 30, 2019 at 10:56 AM Spyridon Mastorakis <
> smastorakis at unomaha.edu> wrote:
>
>> Off the top of my head, I do not see anything (much) wrong with what you
>> did. What you got is indeed the name of a data packet generated by NFD for
>> management purposes.
>>
>> Thanks,
>>
>> Spyridon (Spyros) Mastorakis
>> Assistant Professor
>> Computer Science Department
>> University of Nebraska, Omaha
>> Peter Kiewit Institute Room 175A
>> https://sites.google.com/site/spyridonmastorakis
>> <https://urldefense.proofpoint.com/v2/url?u=https-3A__sites.google.com_site_spyridonmastorakis&d=DwMFaQ&c=Cu5g146wZdoqVuKpTNsYHeFX_rg6kWhlkLF8Eft-wwo&r=eI5Bh74ovG-uIXQ5ksQETSPgRFzmJXjIZXneCqw580E&m=ZVqHtcX5V2jleLUOVSCWpnr7bRu6AHAcDS4pY2pek2Q&s=YbLI2mhQk1ub0Lqq7ySNqy2FZKVz03oU7e_zfVeJqx8&e=>
>>
>> On Nov 28, 2019, at 11:57 PM, Zeinab Rezaiefar via ndnSIM <
>> ndnsim at lists.cs.ucla.edu> wrote:
>>
>> Dear Junxiao,
>> Thanks for your reply. However, may I know how to just get the name of
>> data that the is requested by consumers.
>> Thanks
>> Best regards
>>
>> On Thu, Nov 28, 2019 at 8:18 PM Junxiao Shi <shijunxiao at email.arizona.edu>
>> wrote:
>>
>>> Hi Zeinab
>>>
>>> /localhost/nfd/faces/events/%FE%02 is indeed a Data packet stored in
>>> the CS.
>>> It’s created by face management
>>>
>>> https://redmine.named-data.net/projects/nfd/wiki/FaceMgmt#Face-Status-Change-Notification
>>> <https://urldefense.proofpoint.com/v2/url?u=https-3A__redmine.named-2Ddata.net_projects_nfd_wiki_FaceMgmt-23Face-2DStatus-2DChange-2DNotification&d=DwMFaQ&c=Cu5g146wZdoqVuKpTNsYHeFX_rg6kWhlkLF8Eft-wwo&r=eI5Bh74ovG-uIXQ5ksQETSPgRFzmJXjIZXneCqw580E&m=iVeUKIYBbctEMozc-bO8JiTPCteuxVPGB1pQR1kWfWA&s=FXy50ke1ii8ZcC6hK-NevVaWQWkfHCJ1ShlECPtFes4&e=>
>>>
>>> Yours, Junxiao
>>>
>>> On Thu, Nov 28, 2019 at 00:39 Zeinab Rezaiefar via ndnSIM <
>>> ndnsim at lists.cs.ucla.edu> wrote:
>>>
>>>> Hello,
>>>> I would like to get name of content that are stored in the cache in
>>>> forward.cpp so I wrote the below lines:
>>>> for(ns3::Ptr<ns3::ndn::cs::Entry> csentry= m_csFromNdnSim->Begin();
>>>> csentry!= m_csFromNdnSim->End(); csentry=m_csFromNdnSim->Next(csentry))
>>>> {
>>>> std::cout<<"the name"<<csentry->GetName()<<"is stored in  node with
>>>> id"<<node->GetId()<<"\n";
>>>>
>>>> }
>>>>
>>>> However, I notice this not only gives prefix that stored but also gives
>>>> some event such as :
>>>> the name/localhost/nfd/faces/events/%FE%02is stored in node with id3
>>>>
>>>> what is the reason. how I can just access just the name of contents
>>>> that are stored.
>>>> I will appreciate any help
>>>> best regards
>>>> Zeinab
>>>> _______________________________________________
>>>> ndnSIM mailing list
>>>> ndnSIM at lists.cs.ucla.edu
>>>> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim
>>>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.lists.cs.ucla.edu_mailman_listinfo_ndnsim&d=DwMFaQ&c=Cu5g146wZdoqVuKpTNsYHeFX_rg6kWhlkLF8Eft-wwo&r=eI5Bh74ovG-uIXQ5ksQETSPgRFzmJXjIZXneCqw580E&m=iVeUKIYBbctEMozc-bO8JiTPCteuxVPGB1pQR1kWfWA&s=zDZXKaPhPh2j3s_G5xT_1ySr2bfkxAuNTKhlbX25HMY&e=>
>>>>
>>> _______________________________________________
>> ndnSIM mailing list
>> ndnSIM at lists.cs.ucla.edu
>>
>> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.lists.cs.ucla.edu_mailman_listinfo_ndnsim&d=DwICAg&c=Cu5g146wZdoqVuKpTNsYHeFX_rg6kWhlkLF8Eft-wwo&r=eI5Bh74ovG-uIXQ5ksQETSPgRFzmJXjIZXneCqw580E&m=iVeUKIYBbctEMozc-bO8JiTPCteuxVPGB1pQR1kWfWA&s=zDZXKaPhPh2j3s_G5xT_1ySr2bfkxAuNTKhlbX25HMY&e=
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20191202/5543691e/attachment.html>


More information about the ndnSIM mailing list