From anilj.mailing at gmail.com Thu Sep 1 13:21:35 2016 From: anilj.mailing at gmail.com (Anil Jangam) Date: Thu, 1 Sep 2016 13:21:35 -0700 Subject: [ndnSIM] ndnSIM with NFD 0.4 In-Reply-To: References: Message-ID: Hi Junxiao, Alex: Is there any plans to merge the recent fixes from NFD into ndnSIM? I am specifically interested in following issues. http://redmine.named-data.net/issues/3619 http://redmine.named-data.net/issues/3618 (this is still being worked on). I do not know what other issues are going to be merged. Can you please elaborate the plan? Alternatively, please let me know if just merging the patch for 3619 would be sufficient. /anil. On Fri, May 27, 2016 at 2:53 PM, Junxiao Shi wrote: > Hi ndnSIM developers > > Is there a plan for a ndnSIM release with NFD 0.4.0 or above? > If so, which Redmine issue should we watch? > > Yours, Junxiao > > _______________________________________________ > ndnSIM mailing list > ndnSIM at lists.cs.ucla.edu > http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From xuxiangtian at ucla.edu Thu Sep 1 14:31:11 2016 From: xuxiangtian at ucla.edu (Xuxiang Tian) Date: Thu, 1 Sep 2016 14:31:11 -0700 Subject: [ndnSIM] ndnSIM with NFD 0.4 In-Reply-To: References: Message-ID: Hi Anil, We do have a plan for updating ndnSIM with NFD 0.4.1 and ndn-cxx 0.4.1. I started working on it this summer and most of work done is on adapting to refactored implementation of face. As for elaboration of the plan, you may need to wait for others' reply. -- Xuxiang 2016-09-01 13:21 GMT-07:00 Anil Jangam : > Hi Junxiao, Alex: > > Is there any plans to merge the recent fixes from NFD into ndnSIM? I am > specifically interested in following issues. > > http://redmine.named-data.net/issues/3619 > http://redmine.named-data.net/issues/3618 (this is still being worked > on). > > I do not know what other issues are going to be merged. Can you please > elaborate the plan? Alternatively, please let me know if just merging the > patch for 3619 would be sufficient. > > /anil. > > > > > On Fri, May 27, 2016 at 2:53 PM, Junxiao Shi > wrote: > >> Hi ndnSIM developers >> >> Is there a plan for a ndnSIM release with NFD 0.4.0 or above? >> If so, which Redmine issue should we watch? >> >> Yours, Junxiao >> >> _______________________________________________ >> ndnSIM mailing list >> ndnSIM at lists.cs.ucla.edu >> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim >> >> > > _______________________________________________ > ndnSIM mailing list > ndnSIM at lists.cs.ucla.edu > http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From narges.mehran at gmail.com Thu Sep 1 21:27:54 2016 From: narges.mehran at gmail.com (Narges Mehran) Date: Fri, 2 Sep 2016 08:57:54 +0430 Subject: [ndnSIM] getting PIT size? Message-ID: Hello everyone, I want to get the PIT size at the moment, although I know that it isn't needed to allocate PIT size in NFD. When I run the following code, I get this error, any help? Ptr pit = (*node)->GetObject(); cout << pit->size() << "\t"; ./ns3/ptr.h:710:7: error: ?class nfd::Pit? has no member named ?Ref? m_ptr->Ref (); -------------- next part -------------- An HTML attachment was scrubbed... URL: From aa at CS.UCLA.EDU Thu Sep 1 21:55:07 2016 From: aa at CS.UCLA.EDU (Alex Afanasyev) Date: Thu, 1 Sep 2016 21:55:07 -0700 Subject: [ndnSIM] getting PIT size? In-Reply-To: References: Message-ID: Hi Narges, There is a slightly different way for that: auto& pit = (*node)->GetObject()->getForwarder()->getPit(); cout << pit.size(); -- Alex > On Sep 1, 2016, at 9:27 PM, Narges Mehran wrote: > > Hello everyone, > > I want to get the PIT size at the moment, although I know that it isn't needed to allocate PIT size in NFD. When I run the following code, I get this error, any help? > > Ptr pit = (*node)->GetObject(); > cout << pit->size() << "\t"; > > ./ns3/ptr.h:710:7: error: ?class nfd::Pit? has no member named ?Ref? > m_ptr->Ref (); > _______________________________________________ > ndnSIM mailing list > ndnSIM at lists.cs.ucla.edu > http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 841 bytes Desc: Message signed with OpenPGP using GPGMail URL: From narges.mehran at gmail.com Thu Sep 1 22:24:55 2016 From: narges.mehran at gmail.com (Narges Mehran) Date: Fri, 2 Sep 2016 09:54:55 +0430 Subject: [ndnSIM] getting PIT size? In-Reply-To: References: Message-ID: Thank you! it worked! I was familiar with ndnSIM 1.0, Now I can get involved with ndnSIM 2.1. Best Regards On Fri, Sep 2, 2016 at 9:25 AM, Alex Afanasyev wrote: > Hi Narges, > > There is a slightly different way for that: > > auto& pit = (*node)->GetObject()->getForwarder()- > >getPit(); > cout << pit.size(); > > -- > Alex > > > On Sep 1, 2016, at 9:27 PM, Narges Mehran > wrote: > > > > Hello everyone, > > > > I want to get the PIT size at the moment, although I know that it isn't > needed to allocate PIT size in NFD. When I run the following code, I get > this error, any help? > > > > Ptr pit = (*node)->GetObject(); > > cout << pit->size() << "\t"; > > > > ./ns3/ptr.h:710:7: error: ?class nfd::Pit? has no member named ?Ref? > > m_ptr->Ref (); > > _______________________________________________ > > ndnSIM mailing list > > ndnSIM at lists.cs.ucla.edu > > http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From anilj.mailing at gmail.com Sat Sep 3 12:34:37 2016 From: anilj.mailing at gmail.com (Anil Jangam) Date: Sat, 3 Sep 2016 12:34:37 -0700 Subject: [ndnSIM] ndnSIM with NFD 0.4 In-Reply-To: References: Message-ID: Thanks Xuxiang. Looking forward to the new release of ndnSIM. On Thu, Sep 1, 2016 at 2:31 PM, Xuxiang Tian wrote: > Hi Anil, > > We do have a plan for updating ndnSIM with NFD 0.4.1 and ndn-cxx 0.4.1. I > started working on it this summer and most of work done is on adapting to > refactored implementation of face. As for elaboration of the plan, you may > need to wait for others' reply. > > -- > Xuxiang > > 2016-09-01 13:21 GMT-07:00 Anil Jangam : > >> Hi Junxiao, Alex: >> >> Is there any plans to merge the recent fixes from NFD into ndnSIM? I am >> specifically interested in following issues. >> >> http://redmine.named-data.net/issues/3619 >> http://redmine.named-data.net/issues/3618 (this is still being worked >> on). >> >> I do not know what other issues are going to be merged. Can you please >> elaborate the plan? Alternatively, please let me know if just merging the >> patch for 3619 would be sufficient. >> >> /anil. >> >> >> >> >> On Fri, May 27, 2016 at 2:53 PM, Junxiao Shi < >> shijunxiao at email.arizona.edu> wrote: >> >>> Hi ndnSIM developers >>> >>> Is there a plan for a ndnSIM release with NFD 0.4.0 or above? >>> If so, which Redmine issue should we watch? >>> >>> Yours, Junxiao >>> >>> _______________________________________________ >>> ndnSIM mailing list >>> ndnSIM at lists.cs.ucla.edu >>> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim >>> >>> >> >> _______________________________________________ >> ndnSIM mailing list >> ndnSIM at lists.cs.ucla.edu >> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From q304001zu at gmail.com Sun Sep 4 23:25:02 2016 From: q304001zu at gmail.com (Miho AOKI) Date: Mon, 5 Sep 2016 15:25:02 +0900 Subject: [ndnSIM] How to obtain the overflowed Data on routers Message-ID: Hi, We would like to transmit the overflowed Data (in any buffer) to neighboring routers. Currently, we're trying to make the above operation using " onOutgoingData (forwarder.cpp) ", however, the following log is output and cannot transfer the overflowed Data. libc++abi.dylib: terminating with uncaught exception of type std::__1::bad_weak_ptr: bad_weak_ptr How should we obtain the overflowed Data? Would you please help us? Best regards, Miho Aoki -------------- next part -------------- An HTML attachment was scrubbed... URL: From shijunxiao at email.arizona.edu Mon Sep 5 06:06:01 2016 From: shijunxiao at email.arizona.edu (Junxiao Shi) Date: Mon, 5 Sep 2016 06:06:01 -0700 Subject: [ndnSIM] How to obtain the overflowed Data on routers In-Reply-To: References: Message-ID: <57cd6db5.4618620a.a1eda.f72a@mx.google.com> Hi Miho I neither understand nor agree with what you are trying to do. There?s no concept of "overflowed Data? in NFD. The exception indicates an object not managed by a shared_ptr is passed to a function that calls shared_from_this on that object. You may use GDB or LLDB to obtain a backtrace where this exception is thrown, and investigate the mistake from there. Yours, Junxiao From: Miho AOKI -------------- next part -------------- An HTML attachment was scrubbed... URL: From asifcsep at gmail.com Mon Sep 5 06:30:59 2016 From: asifcsep at gmail.com (Shahid Md. Asif Iqbal) Date: Mon, 5 Sep 2016 19:30:59 +0600 Subject: [ndnSIM] "Kilobytes" field for InInterests and OutInterests are missing for all nodes Message-ID: Dear All, Can you find me a way out from this problem? Cheers Asif -------------- next part -------------- An HTML attachment was scrubbed... URL: From shijunxiao at email.arizona.EDU Mon Sep 5 06:43:51 2016 From: shijunxiao at email.arizona.EDU (Junxiao Shi) Date: Mon, 5 Sep 2016 06:43:51 -0700 Subject: [ndnSIM] "Kilobytes" field for InInterests and OutInterests aremissing for all nodes In-Reply-To: References: Message-ID: <57cd7693.0209620a.88e87.c027@mx.google.com> Hi Asif Your report contains too little information that others cannot understand the issue. Can you have a look at http://www.lists.cs.ucla.edu/pipermail/nfd-dev/2016-May/001748.html and add more information? Yours, Junxiao From: Shahid Md. Asif Iqbal -------------- next part -------------- An HTML attachment was scrubbed... URL: From asifcsep at gmail.com Mon Sep 5 21:53:03 2016 From: asifcsep at gmail.com (Shahid Md. Asif Iqbal) Date: Tue, 6 Sep 2016 10:53:03 +0600 Subject: [ndnSIM] "Kilobytes" field for InInterests and OutInterests aremissing for all nodes In-Reply-To: <57cd7693.0209620a.88e87.c027@mx.google.com> References: <57cd7693.0209620a.88e87.c027@mx.google.com> Message-ID: Dear Junxiao Thanks for the reply. Here is an instance of the problem. As I said the trace file is not showing anything under the kilobytes columns for InInterests and OutInterests Time Node FaceId FaceDescr Type Packets Kilobytes PacketRaw KilobytesRaw 10 0 1 internal:// InInterests 0 0 0 0 10 0 1 internal:// OutInterests 0 0 0 0 10 0 1 internal:// InData 0 0 0 0 10 0 1 internal:// OutData 0 0 0 0 10 0 1 internal:// InSatisfiedInterests 0 0 0 0 10 0 1 internal:// InTimedOutInterests 0 0 0 0 10 0 1 internal:// OutSatisfiedInterests 0.16 0 2 0 10 0 1 internal:// OutTimedOutInterests 0 0 0 0 10 0 259 ndnFace://0 InInterests 0.4 0 5 0 10 0 259 ndnFace://0 OutInterests 0 0 0 0 10 0 259 ndnFace://0 InData 0 0 0 0 10 0 259 ndnFace://0 OutData 0 0 0 0 10 0 259 ndnFace://0 InSatisfiedInterests 0.16 0 2 0 10 0 259 ndnFace://0 InTimedOutInterests 0 0 0 0 10 0 259 ndnFace://0 OutSatisfiedInterests 0 0 0 0 10 0 259 ndnFace://0 OutTimedOutInterests 0 0 0 0 10 0 -1 all SatisfiedInterests 0.32 0 4 0 10 0 -1 all TimedOutInterests 0 0 0 0 10 1 1 internal:// InInterests 0 0 0 0 10 1 1 internal:// OutInterests 0 0 0 0 10 1 1 internal:// InData 0 0 0 0 10 1 1 internal:// OutData 0 0 0 0 10 1 1 internal:// InSatisfiedInterests 0 0 0 0 10 1 1 internal:// InTimedOutInterests 0 0 0 0 10 1 1 internal:// OutSatisfiedInterests 0.16 0 2 0 10 1 1 internal:// OutTimedOutInterests 0 0 0 0 10 1 258 ndnFace://1 InInterests 0.32 0 4 0 10 1 258 ndnFace://1 OutInterests 0 0 0 0 10 1 258 ndnFace://1 InData 0 0 0 0 10 1 258 ndnFace://1 OutData 0 0 0 0 10 1 258 ndnFace://1 InSatisfiedInterests 0.16 0 2 0 10 1 258 ndnFace://1 InTimedOutInterests 0 0 0 0 10 1 258 ndnFace://1 OutSatisfiedInterests 0 0 0 0 10 1 258 ndnFace://1 OutTimedOutInterests 0 0 0 0 10 1 -1 all SatisfiedInterests 0.24 0 3 0 10 1 -1 all TimedOutInterests 0 0 0 0 10 2 1 internal:// InInterests 0 0 0 0 10 2 1 internal:// OutInterests 0 0 0 0 10 2 1 internal:// InData 0 0 0 0 10 2 1 internal:// OutData 0 0 0 0 10 2 1 internal:// InSatisfiedInterests 0 0 0 0 10 2 1 internal:// InTimedOutInterests 0 0 0 0 10 2 1 internal:// OutSatisfiedInterests 0.16 0 2 0 10 2 1 internal:// OutTimedOutInterests 0 0 0 0 10 2 258 ndnFace://2 InInterests 0.32 0 4 0 10 2 258 ndnFace://2 OutInterests 0 0 0 0 10 2 258 ndnFace://2 InData 0 0 0 0 10 2 258 ndnFace://2 OutData 0 0 0 0 10 2 258 ndnFace://2 InSatisfiedInterests 0.16 0 2 0 10 2 258 ndnFace://2 InTimedOutInterests 0 0 0 0 10 2 258 ndnFace://2 OutSatisfiedInterests 0 0 0 0 10 2 258 ndnFace://2 OutTimedOutInterests 0 0 0 0 10 2 -1 all SatisfiedInterests 0.24 0 3 0 10 2 -1 all TimedOutInterests 0 0 0 0 10 3 1 internal:// InInterests 0 0 0 0 10 3 1 internal:// OutInterests 0 0 0 0 10 3 1 internal:// InData 0 0 0 0 10 3 1 internal:// OutData 0 0 0 0 10 3 1 internal:// InSatisfiedInterests 0 0 0 0 10 3 1 internal:// InTimedOutInterests 0 0 0 0 10 3 1 internal:// OutSatisfiedInterests 0.16 0 2 0 10 3 1 internal:// OutTimedOutInterests 0 0 0 0 10 3 257 netDeviceFace:// InInterests 23.36 0 292 0 10 3 257 netDeviceFace:// OutInterests 0 0 0 0 10 3 257 netDeviceFace:// InData 0 0 0 0 10 3 257 netDeviceFace:// OutData 23.36 6.06219 292 75.7773 10 3 257 netDeviceFace:// InSatisfiedInterests 23.2 0 290 0 10 3 257 netDeviceFace:// InTimedOutInterests 0 0 0 0 10 3 257 netDeviceFace:// OutSatisfiedInterests 0 0 0 0 10 3 257 netDeviceFace:// OutTimedOutInterests 0 0 0 0 10 3 258 netDeviceFace:// InInterests 0 0 0 0 10 3 258 netDeviceFace:// OutInterests 23.2 0 290 0 10 3 258 netDeviceFace:// InData 23.2 6.06219 290 75.7773 10 3 258 netDeviceFace:// OutData 0 0 0 0 10 3 258 netDeviceFace:// InSatisfiedInterests 0 0 0 0 10 3 258 netDeviceFace:// InTimedOutInterests 0 0 0 0 10 3 258 netDeviceFace:// OutSatisfiedInterests 23.2 0 290 0 10 3 258 netDeviceFace:// OutTimedOutInterests 0 0 0 0 10 3 259 ndnFace://3 InInterests 0.4 0 5 0 10 3 259 ndnFace://3 OutInterests 0 0 0 0 10 3 259 ndnFace://3 InData 0 0 0 0 10 3 259 ndnFace://3 OutData 0 0 0 0 10 3 259 ndnFace://3 InSatisfiedInterests 0.16 0 2 0 10 3 259 ndnFace://3 InTimedOutInterests 0 0 0 0 10 3 259 ndnFace://3 OutSatisfiedInterests 0 0 0 0 10 3 259 ndnFace://3 OutTimedOutInterests 0 0 0 0 10 3 -1 all SatisfiedInterests 23.68 0 296 0 10 3 -1 all TimedOutInterests 0 0 0 0 On Mon, Sep 5, 2016 at 7:43 PM, Junxiao Shi wrote: > Hi Asif > > > > Your report contains too little information that others cannot understand > the issue. > > Can you have a look at http://www.lists.cs.ucla.edu/ > pipermail/nfd-dev/2016-May/001748.html and add more information? > > > > Yours, Junxiao > > > > *From: *Shahid Md. Asif Iqbal > *Sent: *Monday, September 5, 2016 06:31 > *To: *ndnsim > *Subject: *[ndnSIM] "Kilobytes" field for InInterests and OutInterests > aremissing for all nodes > > > > Dear All, > > Can you find me a way out from this problem? > > Cheers > > Asif > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From asifcsep at gmail.com Wed Sep 7 02:44:06 2016 From: asifcsep at gmail.com (Shahid Md. Asif Iqbal) Date: Wed, 7 Sep 2016 15:44:06 +0600 Subject: [ndnSIM] Explanation of trace file In-Reply-To: References: <6677EF4B-917D-4066-A900-55B12112E51E@cs.ucla.edu> Message-ID: Hi Spyridon, Thanks for explaining the trace files. Now, can you please let me know which faces, i.e. appface, ndnface, netdeviceface, internal, etc., of a node are important to be analyzed or to be used as input to some graph/stats packages. To be exact, which faces I should consider to find out the number of transmissions of Interest and Data in a CCN. On Sun, Mar 27, 2016 at 8:46 AM, Shahid Md. Asif Iqbal wrote: > Thanks Spyridon for the explanation. However, I was running a 49 node grid > topology (with ConsumerCbr). By the way, did you thought about the > sequencing and retransmission of my DISCOVER-REQUEST interest issue? > > On Sat, Mar 26, 2016 at 11:01 PM, Spyridon (Spyros) Mastorakis < > mastorakis at cs.ucla.edu> wrote: > >> Hi Asif, >> >> the internal face is the face that NFD uses to communicate with its >> managers (used for command Interests). You can think of the netDeviceFace >> as the network layer interfaces of a router. The ndnFace refers to the >> ndnSIM specific implementation of the ndn-cxx face. The appFace refers to >> the face of an ndnSIM application receiving Data and Interest packets. The >> face ids are used to distinguish among the different faces. You can take a >> look here as well: >> >> http://ndnsim.net/2.1/metric.html >> >> What application you were running when you obtained this trace file? >> >> Thanks, >> >> Spyridon (Spyros) Mastorakis >> Personal Website: http://cs.ucla.edu/~mastorakis/ >> Internet Research Laboratory >> Computer Science Department >> UCLA >> >> >> >> >> On Mar 26, 2016, at 9:08 AM, Shahid Md. Asif Iqbal >> wrote: >> >> Dear All, >> Can anyone please explain the rate-trace file for me? Especially the >> meaning of internal, netDeviceFace://, ndnface://24, appface:// and how >> are these face relating each others.And, also how are these faces having >> face id like 257, 258..... >> >> Time Node FaceId FaceDescr Type Packets Kilobytes >> PacketRaw KilobytesRaw >> 1 24 1 internal:// InInterests 0 0 0 0 >> 1 24 1 internal:// OutInterests 0 0 0 0 >> 1 24 1 internal:// InData 0 0 0 0 >> 1 24 1 internal:// OutData 0 0 0 0 >> 1 24 1 internal:// InSatisfiedInterests 0 0 0 0 >> 1 24 1 internal:// InTimedOutInterests 0 0 0 0 >> 1 24 1 internal:// OutSatisfiedInterests 1.6 0 2 0 >> 1 24 1 internal:// OutTimedOutInterests 0 0 0 0 >> 1 24 257 netDeviceFace:// InInterests 8 0.25 10 >> 0.3125 >> 1 24 257 netDeviceFace:// OutInterests 0 0 0 0 >> 1 24 257 netDeviceFace:// InData 0 0 0 0 >> 1 24 257 netDeviceFace:// OutData 0 0 0 0 >> 1 24 257 netDeviceFace:// InSatisfiedInterests 0 0 >> 0 0 >> 1 24 257 netDeviceFace:// InTimedOutInterests 0 0 >> 0 0 >> 1 24 257 netDeviceFace:// OutSatisfiedInterests 0 0 >> 0 0 >> 1 24 257 netDeviceFace:// OutTimedOutInterests 0 0 >> 0 0 >> 1 24 258 netDeviceFace:// InInterests 8 0.25 10 >> 0.3125 >> 1 24 258 netDeviceFace:// OutInterests 0 0 0 0 >> 1 24 258 netDeviceFace:// InData 0 0 0 0 >> 1 24 258 netDeviceFace:// OutData 8 8.27344 10 >> 10.3418 >> 1 24 258 netDeviceFace:// InSatisfiedInterests 8 0 >> 10 0 >> 1 24 258 netDeviceFace:// InTimedOutInterests 0 0 >> 0 0 >> 1 24 258 netDeviceFace:// OutSatisfiedInterests 0 0 >> 0 0 >> 1 24 258 netDeviceFace:// OutTimedOutInterests 0 0 >> 0 0 >> 1 24 259 netDeviceFace:// InInterests 8 0.25 10 >> 0.3125 >> 1 24 259 netDeviceFace:// OutInterests 8 0.25 10 >> 0.3125 >> 1 24 259 netDeviceFace:// InData 0 0 0 0 >> 1 24 259 netDeviceFace:// OutData 0 0 0 0 >> 1 24 259 netDeviceFace:// InSatisfiedInterests 0 0 >> 0 0 >> 1 24 259 netDeviceFace:// InTimedOutInterests 0 0 >> 0 0 >> 1 24 259 netDeviceFace:// OutSatisfiedInterests 8 0 >> 10 0 >> 1 24 259 netDeviceFace:// OutTimedOutInterests 0 0 >> 0 0 >> 1 24 260 ndnFace://24 InInterests 3.2 0 4 0 >> 1 24 260 ndnFace://24 OutInterests 0 0 0 0 >> 1 24 260 ndnFace://24 InData 0 0 0 0 >> 1 24 260 ndnFace://24 OutData 0 0 0 0 >> 1 24 260 ndnFace://24 InSatisfiedInterests 1.6 0 >> 2 0 >> 1 24 260 ndnFace://24 InTimedOutInterests 0 0 0 0 >> 1 24 260 ndnFace://24 OutSatisfiedInterests 0 0 >> 0 0 >> 1 24 260 ndnFace://24 OutTimedOutInterests 0 0 0 >> 0 >> 1 24 261 appFace:// InInterests 0 0 0 0 >> 1 24 261 appFace:// OutInterests 8 0.25 10 0.3125 >> 1 24 261 appFace:// InData 8 8.27344 10 10.3418 >> 1 24 261 appFace:// OutData 0 0 0 0 >> 1 24 261 appFace:// InSatisfiedInterests 0 0 0 0 >> 1 24 261 appFace:// InTimedOutInterests 0 0 0 0 >> 1 24 261 appFace:// OutSatisfiedInterests 8 0 10 0 >> 1 24 261 appFace:// OutTimedOutInterests 0 0 0 0 >> 1 24 -1 all SatisfiedInterests 10.4 0 13 0 >> 1 24 -1 all TimedOutInterests 0 0 0 0 >> >> Thanks >> Asif >> _______________________________________________ >> ndnSIM mailing list >> ndnSIM at lists.cs.ucla.edu >> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From q304001zu at gmail.com Wed Sep 7 03:59:49 2016 From: q304001zu at gmail.com (Miho AOKI) Date: Wed, 7 Sep 2016 19:59:49 +0900 Subject: [ndnSIM] How to obtain the overflowed Data on routers In-Reply-To: <57cd6db5.4618620a.a1eda.f72a@mx.google.com> References: <57cd6db5.4618620a.a1eda.f72a@mx.google.com> Message-ID: Hi, Junxiao Thank you for the reply. We changed the question. Would you please help us again? 1. When a Data acquisition request has occurred at a Consumer, corresponding Interest will be forwarded toward a destined Producer. 2. The router having cached Data for the Interest, sends back the Data to the Consumer. 3. The Data will be cached at the inter mediate routers belonging to the return path to the Consumer. 4. At this time, if the number of cached Data exceeds the upper limit of the CS (default:100), one Data selected according to CS policy is evicted at the default ndnSIM.(Currently, we adopt LRU policy.) 5. So, we?d like to transfer the selected Data for eviction, to the other neighbor routers, and keep it at the CS. 6. For the above objective, we modified the operation of ndnSIM as follows : - At the router receiving a Interest, 1. Copy all cached Data (CS entry) to local memory as (line:50-52) - std::vector beforeCS; - for(int i = 0; i < cssize; i++) { beforeCS.push_back(getCs().getEntryName(i).toUri()); } 2. Call ? m_cs.insert(*dataCopyWithout Packet) ? 3. Copy all cached Data to local memory as (line:65-67) - std::vector afterCS; - for(int i = 0; i < cssize; i++){ afterCS.push_back(getCs().getEntryName(i).toUri()); } 4. Identify the evicted cached Data by comparing afterCS and beforeCS, and, obtain the Data from the beforeCS. 7. In the above process, we could identify the evicted cached Data. 1. We?re trying to send the evicted Data to neighbor router by using ?onOutgoingData (forwarder.cpp)?. (line:110) As the following log indicated, the transmission seems to success at the sender side. - Extract of the log - 10.4775s 1 nfd.Forwarder:onOutgoingData(): [DEBUG] onOutgoingData face=259 data=/prefix/%FE%00 - 10.4775s 1 ndn.NetDeviceFace:sendData(0x7f848a6029d8, 0x10c033000) 2. However, the following log is also output and simulation stops. - libc++abi.dylib: terminating with uncaught exception of type std::__1::bad_weak_ptr: bad_weak_ptr 8. Would you give us the advice how to realize the operation we wanted? ???????????????????????????????????? 1. void 2. Forwarder::onIncomingData(Face& inFace, const Data& data) 3. { 4. // receive Data 5. NFD_LOG_DEBUG("onIncomingData face=" << inFace.getId() << " data=" << data.getName()); 6. const_cast(data).setIncomingFaceId(inFace.getId()); 7. ++m_counters.getNInDatas(); 8. 9. // /localhost scope control 10. bool isViolatingLocalhost = !inFace.isLocal() && 11. LOCALHOST_NAME.isPrefixOf(data.getName()); 12. if (isViolatingLocalhost) { 13. NFD_LOG_DEBUG("onIncomingData face=" << inFace.getId() << 14. " data=" << data.getName() << " violates /localhost"); 15. // (drop) 16. return; 17. } 18. 19. // PIT match 20. pit::DataMatchResult pitMatches = m_pit.findAllDataMatches(data); 21. if (pitMatches.begin() == pitMatches.end()) { 22. // goto Data unsolicited pipeline 23. this->onDataUnsolicited(inFace, data); 24. return; 25. } 26. 27. // Remove Ptr from the Data before inserting into cache, serving two purposes 28. // - reduce amount of memory used by cached entries 29. // - remove all tags that (e.g., hop count tag) that could have been associated with Ptr 30. // 31. // Copying of Data is relatively cheap operation, as it copies (mostly) a collection of Blocks 32. // pointing to the same underlying memory buffer. 33. shared_ptr dataCopyWithoutPacket = make_shared(data); 34. dataCopyWithoutPacket->removeTag(); 35. 36. // before CS entry 7/27 37. std::vector beforeCS; 38. // after CS entry 7/28 39. std::vector afterCS; 40. 41. int cssize; 42. cssize = getCs().size(); 43. // Data 7/28 44. std::vector data1; 45. 46. // CS insert 47. if (m_csFromNdnSim == nullptr){ 48. 49. // insert CS entry in beforeCS 7/29 50. for(int i = 0; i < cssize; i++){ 51. beforeCS.push_back(getCs().getEntryName(i).toUri()); 52. } 53. // insert Data in data1 7/29 54. for(const cs::EntryImpl& entry : getCs().m_table){ 55. data1.push_back(entry.getData()); 56. } 57. 58. m_cs.insert(*dataCopyWithoutPacket); 59. 60. } 61. else 62. m_csFromNdnSim->Add(dataCopyWithoutPacket); 63. 64. // insert CS entry in afterCS 7/29 65. for(int j = 0; j < cssize; j++){ 66. afterCS.push_back(getCs().getEntryName(j).toUri()); 67. } 68. 69. int dsize; 70. dsize = data1.size(); 71. 72. if(ns3::Simulator::GetContext() == 1){ 73. std::string beCS; 74. std::string DATA; 75. shared_ptr OUTFACE; 76. 77. int n = 0; 78. 79. int csize; 80. csize = getCs().size(); 81. // comparison of beforeCS and afterCS 82. int k = 0; 83. for(; k < csize; ++k){ 84. int l = 0; 85. for(; l < csize; ++l){ 86. if(beforeCS[k] == afterCS[l]) break; 87. } 88. if(l < csize){ 89. break; 90. } 91. else{ 92. beCS = beforeCS[k]; 93. for(int m = 0; m < dsize; m++){ 94. DATA = data1[m].getName().toUri(); 95. if( beCS == DATA ){ 96. n = m; 97. for(auto itr = mfaces.begin(); itr != mfaces.end(); ++itr){ 98. if((int)(inFace.getId()) > 255){ 99. if(itr->second->getRemoteUri().toString() == itr->second->getLocalUri().toString() && itr->second->getLocalUri().toString() == "netDeviceFace://"){ 100. if(itr->second->getId() != inFace.getId()){ 101. if(itr->second->getId() == 259){ 102. OUTFACE = itr->second; 103. } 104. } // end if(itr->second->getId() != inFace.getId()) 105. } // end if(itr->second->getRemoteUri().toString()...) 106. } // end if((int)(inFace.getId()) > 255) 107. } // end if (auto itr...) 108. } // end if( beCS == DATA ) 109. } //end for(int m = 0; m < dsize; m++) 110. } // end else 111. this->onOutgoingData(data1[n], *OUTFACE); 112. } // end for(; k < csize; ++k) 113. } // endif(ns3::Simulator::GetContext() == 1) 114. 115. 116. std::set > pendingDownstreams; 117. // foreach PitEntry 118. for (const shared_ptr& pitEntry : pitMatches) { 119. NFD_LOG_DEBUG("onIncomingData matching=" << pitEntry->getName()); 120. 121. // cancel unsatisfy & straggler timer 122. this->cancelUnsatisfyAndStragglerTimer(pitEntry); 123. 124. // remember pending downstreams 125. const pit::InRecordCollection& inRecords = pitEntry->getInRecords(); 126. for (pit::InRecordCollection::const_iterator it = inRecords.begin(); 127. it != inRecords.end(); ++it) { 128. if (it->getExpiry() > time::steady_clock::now()) { 129. pendingDownstreams.insert(it->getFace()); 130. faceid[fcnt++] = (it->getFace())->getId(); 131. } 132. } 133. 134. // invoke PIT satisfy callback 135. beforeSatisfyInterest(*pitEntry, inFace, data); 136. this->dispatchToStrategy(pitEntry, bind(&Strategy::beforeSatisfyInterest, _1, 137. pitEntry, cref(inFace), cref(data))); 138. 139. // Dead Nonce List insert if necessary (for OutRecord of inFace) 140. this->insertDeadNonceList(*pitEntry, true, data.getFreshnessPeriod(), &inFace); 141. 142. // mark PIT satisfied 143. pitEntry->deleteInRecords(); 144. pitEntry->deleteOutRecord(inFace); 145. 146. // set PIT straggler timer 147. this->setStragglerTimer(pitEntry, true, data.getFreshnessPeriod()); 148. } 149. 150. // foreach pending downstream 151. for (std::set >::iterator it = pendingDownstreams.begin(); 152. it != pendingDownstreams.end(); ++it) { 153. shared_ptr pendingDownstream = *it; 154. if (pendingDownstream.get() == &inFace) { 155. continue; 156. } 157. // goto outgoing Data pipeline 158. this->onOutgoingData(data, *pendingDownstream); 159. } 160. } ???????????????????????????????????? Best regards, Miho Aoki 2016-09-05 22:06 GMT+09:00 Junxiao Shi : > Hi Miho > > > > I neither understand nor agree with what you are trying to do. There?s no > concept of "overflowed Data? in NFD. > > > > The exception indicates an object not managed by a shared_ptr is passed to > a function that calls shared_from_this on that object. You may use GDB or > LLDB to obtain a backtrace where this exception is thrown, and investigate > the mistake from there. > > > > Yours, Junxiao > > > > *From: *Miho AOKI > *Sent: *Sunday, September 4, 2016 23:25 > *To: *ndnsim at lists.cs.ucla.edu > *Subject: *[ndnSIM] How to obtain the overflowed Data on routers > > > > Hi, > > > > We would like to transmit the overflowed Data (in any buffer) to > neighboring routers. > > > > Currently, we're trying to make the above operation using " onOutgoingData > (forwarder.cpp) ", however, the following log is output and cannot transfer > the overflowed Data. > > > > libc++abi.dylib: terminating with uncaught exception of type > std::__1::bad_weak_ptr: bad_weak_ptr > > > > > > How should we obtain the overflowed Data? > > > > Would you please help us? > > > > Best regards, > > Miho Aoki > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From shijunxiao at email.arizona.edu Wed Sep 7 11:07:39 2016 From: shijunxiao at email.arizona.edu (Junxiao Shi) Date: Wed, 7 Sep 2016 11:07:39 -0700 Subject: [ndnSIM] How to obtain the overflowed Data on routers In-Reply-To: References: <57cd6db5.4618620a.a1eda.f72a@mx.google.com> Message-ID: <57d0576b.c99b420a.f0ca.073f@mx.google.com> Hi Miho bad_weak_ptr exception usually indicates an object not managed by a shared_ptr is passed to a function that calls shared_from_this on that object. You may use GDB or LLDB to obtain a backtrace where this exception is thrown, and investigate the mistake from there. Yours, Junxiao From: Miho AOKI -------------- next part -------------- An HTML attachment was scrubbed... URL: From 2665624529 at qq.com Sun Sep 11 06:17:07 2016 From: 2665624529 at qq.com (=?gb18030?B?0O3Rx8a9?=) Date: Sun, 11 Sep 2016 21:17:07 +0800 Subject: [ndnSIM] the Use about ndn::LinkControlHelper Message-ID: Dear Sirs, The email is about ndnSIM Helper.I'm a beginner for ndnSIM and NDN.At present,I meet some problems when I use ndn::LinkControlHelper.I write a program about faillink and uplink of some nodes.However ,when the simulation starts ,it makes error.As shown in the figure below. Some parts of my program show in the below: What the reason is?I hope to know the answer in a hurry. I look forward to hearing from you soon. Thankyou! -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 80852 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 7056 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/octet-stream Size: 16562 bytes Desc: not available URL: From aa at CS.UCLA.EDU Sun Sep 11 13:35:20 2016 From: aa at CS.UCLA.EDU (Alex Afanasyev) Date: Sun, 11 Sep 2016 13:35:20 -0700 Subject: [ndnSIM] the Use about ndn::LinkControlHelper In-Reply-To: References: Message-ID: <81DDAB86-740F-4C03-8F72-0331777BE222@cs.ucla.edu> The reason is what the assertion message is telling: you don't have a link between the nodes you trying to fail a link. For example, there is no link between node Get(5) and Get(2), and others. LinkControlHelper "fails" only links between PointToPointNetDevices if they are directly connected. -- Alex > On Sep 11, 2016, at 6:17 AM, ??? <2665624529 at qq.com> wrote: > > Dear Sirs, > The email is about ndnSIM Helper.I'm a beginner for ndnSIM and NDN.At present,I meet some problems when I use ndn::LinkControlHelper.I write a program about faillink and uplink of some nodes.However ,when the simulation starts ,it makes error.As shown in the figure below. > > > Some parts of my program show in the below: > <5C925E32 at 8478A138.5359D557.PNG> > > What the reason is?I hope to know the answer in a hurry. > I look forward to hearing from you soon. > Thankyou! > _______________________________________________ > ndnSIM mailing list > ndnSIM at lists.cs.ucla.edu > http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 841 bytes Desc: Message signed with OpenPGP using GPGMail URL: From aa at CS.UCLA.EDU Mon Sep 12 13:06:43 2016 From: aa at CS.UCLA.EDU (Alex Afanasyev) Date: Mon, 12 Sep 2016 13:06:43 -0700 Subject: [ndnSIM] the Use about ndn::LinkControlHelper In-Reply-To: References: <81DDAB86-740F-4C03-8F72-0331777BE222@cs.ucla.edu> Message-ID: LinkControlHelper does not create links. It can only set the link into 100% loss mode or change it to to 0% loss mode. --- Alex > On Sep 11, 2016, at 9:34 PM, ??? <2665624529 at qq.com> wrote: > > Dear Sir, > Thank you for your answer firstly! > But I am still puzzled. If node Get(5) and Get(2) have no link in the beginning ,are they not directly connected by using "UpLink"? If I still want to achieve the links between these nodes,such as node Get(5) and Get(2) are connected at 1.3s. How should I do? Could you give me some suggestions to solve the problem? > I look forward to hearing from you soon. Thank you! > -- > Xuyaping > > ------------------ ???? ------------------ > ???: "Alex Afanasyev";; > ????: 2016?9?12?(???) ??4:35 > ???: "???"<2665624529 at qq.com>; > ??: "ndnsim"; > ??: Re: [ndnSIM] the Use about ndn::LinkControlHelper > > The reason is what the assertion message is telling: you don't have a link between the nodes you trying to fail a link. For example, there is no link between node Get(5) and Get(2), and others. > > LinkControlHelper "fails" only links between PointToPointNetDevices if they are directly connected. > > -- > Alex > > > On Sep 11, 2016, at 6:17 AM, ??? <2665624529 at qq.com> wrote: > > > > Dear Sirs, > > The email is about ndnSIM Helper.I'm a beginner for ndnSIM and NDN.At present,I meet some problems when I use ndn::LinkControlHelper.I write a program about faillink and uplink of some nodes.However ,when the simulation starts ,it makes error.As shown in the figure below. > > > > > > Some parts of my program show in the below: > > <5C925E32 at 8478A138.5359D557.PNG> > > > > What the reason is?I hope to know the answer in a hurry. > > I look forward to hearing from you soon. > > Thankyou! > > _______________________________________________ > > ndnSIM mailing list > > ndnSIM at lists.cs.ucla.edu > > http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 841 bytes Desc: Message signed with OpenPGP using GPGMail URL: From mastorakis at CS.UCLA.EDU Mon Sep 12 14:34:51 2016 From: mastorakis at CS.UCLA.EDU (Spyridon (Spyros) Mastorakis) Date: Mon, 12 Sep 2016 14:34:51 -0700 Subject: [ndnSIM] How to add a new field to interest packet in ndn-cxx or nan-SIM In-Reply-To: <128841FE-36EE-4D40-9193-5E5BCDDFC1A4@gmail.com> References: <128841FE-36EE-4D40-9193-5E5BCDDFC1A4@gmail.com> Message-ID: <925CC132-061B-4A26-BAAB-572FA70D23B3@cs.ucla.edu> Hi, please take a look here: http://www.lists.cs.ucla.edu/pipermail/ndnsim/2015-July/002039.html Spyridon (Spyros) Mastorakis Personal Website: http://cs.ucla.edu/~mastorakis/ Internet Research Laboratory Computer Science Department UCLA > On Aug 17, 2016, at 2:43 AM, ??? wrote: > > To all, > > I involve this field (ndn/ndnSIM) first time, so I confuse on some problems. As following: > 1. How can I add fields in the interest packet? (May you teach me the steps?) > 2. And if I add the fields, what things should I pay attention? > -------------- next part -------------- An HTML attachment was scrubbed... URL: From anselme333 at gmail.com Tue Sep 13 00:27:03 2016 From: anselme333 at gmail.com (NDIKUMANA ANSELME) Date: Tue, 13 Sep 2016 16:27:03 +0900 Subject: [ndnSIM] Rocketfuel Topology Message-ID: Hi everyone, I want to use rocketfuel topology (http://ndnsim.net/2.1/doxygen/dir_ 52450a816968f4d022ff9feb5761ebba.html) in my simulation. Is there any example which can help to configure my simulation such as topology reading, choosing forwarding strategy, installing producer and consumer applications on specific nodes, etc. ? Your feedback is highly appreciated. With Regards, Anselme N. -------------- next part -------------- An HTML attachment was scrubbed... URL: From neogeoss at ajou.ac.kr Fri Sep 16 21:00:41 2016 From: neogeoss at ajou.ac.kr (=?UTF-8?B?7Zmp7J247LCs?=) Date: Sat, 17 Sep 2016 13:00:41 +0900 Subject: [ndnSIM] Question on PIT size measurement. Message-ID: When I looked into PIT.cpp in NFD. There is a function to measure PIT size. I wanted to make use of it at NDNSIM. Thus, I was trying to change ndn::L3RateTracer to record each node's PIT size. However, I was not able to find anything related. I think anything related with forwarder class must be there to trace it. Do you guys know any way to trace each node's PIT size ?? Best wishes, inchan Hwang -------------- next part -------------- An HTML attachment was scrubbed... URL: From aa at CS.UCLA.EDU Sun Sep 18 11:18:26 2016 From: aa at CS.UCLA.EDU (Alex Afanasyev) Date: Sun, 18 Sep 2016 11:18:26 -0700 Subject: [ndnSIM] Question on PIT size measurement. In-Reply-To: References: Message-ID: Hi Inchan, There is not yet a readily available tracer for that, but you can quickly write one with the following logic: - Schedule a periodic event with whichever granularity you want to trace the size - In the scheduled event, for each node that you want to obtain information (you can use NodeList to access all nodes) Ptr node = ...; size_t currentPitSize = node->GetObject()->getForwarder()->getPit()->size(); ... save the value -- Alex > On Sep 16, 2016, at 9:00 PM, ??? wrote: > > When I looked into PIT.cpp in NFD. There is a function to measure PIT size. > I wanted to make use of it at NDNSIM. Thus, I was trying to change ndn::L3RateTracer to record > each node's PIT size. However, I was not able to find anything related. I think anything related with forwarder class must be there > to trace it. Do you guys know any way to trace each node's PIT size ?? > > Best wishes, > > inchan Hwang -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 841 bytes Desc: Message signed with OpenPGP using GPGMail URL: From q304043ud at gmail.com Tue Sep 27 19:30:25 2016 From: q304043ud at gmail.com (=?UTF-8?B?44KP44Gf44Gu44Gv44KL44GL?=) Date: Wed, 28 Sep 2016 11:30:25 +0900 Subject: [ndnSIM] Link failure among contents routers Message-ID: Dear All, Currently, I am working on how to cope with the link failure among contents routers on NDN. Please give us the information about followings: 1) Can I detect the link failure at NDN node (forwarder.cpp or others) on ndnsim? 2) How can I get the elapsed time of each entry on PIT from the registration? Best Regards, Haruka -------------- next part -------------- An HTML attachment was scrubbed... URL: From shijunxiao at email.arizona.edu Tue Sep 27 20:38:21 2016 From: shijunxiao at email.arizona.edu (Junxiao Shi) Date: Tue, 27 Sep 2016 20:38:21 -0700 Subject: [ndnSIM] Link failure among contents routers In-Reply-To: References: Message-ID: Hi Haruka 1) NFD has "link DOWN" semantics, but there's no corresponding implementation. The upcoming ndnSIM 2.2 release doesn't seem to have a "link DOWN" implementation in the simulation face type. 2) You may look at "last refreshed" timestamp on PIT in-records and out-records. These are the time point on which an incoming Interest is received from a face or an outgoing Interest is sent to a face. Yours, Junxiao On Tue, Sep 27, 2016 at 7:30 PM, ?????? wrote: > Dear All, > > Currently, I am working on how to cope with the link failure > among contents routers on NDN. > > Please give us the information about followings: > > 1) Can I detect the link failure at NDN node (forwarder.cpp > or others) on ndnsim? > 2) How can I get the elapsed time of each entry on PIT from the > registration? > > Best Regards, > Haruka > > _______________________________________________ > ndnSIM mailing list > ndnSIM at lists.cs.ucla.edu > http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From 410330533 at qq.com Thu Sep 29 18:39:01 2016 From: 410330533 at qq.com (=?gb18030?B?zfXX072h?=) Date: Fri, 30 Sep 2016 09:39:01 +0800 Subject: [ndnSIM] something wrong in the technical report Message-ID: Hello, After read the technical report, I realized something wrong as the following picture shows. Why is the cs::Probability:Fifo correspond to LFU and cs::Probability:lfu correspond to Random?Does the table lost some information? Sincerely, Prince -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/jpeg Size: 130731 bytes Desc: not available URL: From neogeoss1 at gmail.com Wed Sep 14 06:43:53 2016 From: neogeoss1 at gmail.com (Hwang In Chan) Date: Wed, 14 Sep 2016 13:43:53 -0000 Subject: [ndnSIM] Topology construction! Message-ID: Dear All, I am making a topology of a certain format in a wifi adhoc mode. [image: ?? ??? 1] I am aiming to have a topology like this with NDN SIM. I was trying to make it visible like the picture above. In the beginning, I was making use of Grid Position allocator with mobility class. However, I soon realized that it is not going to help me. So I used the manuel allocator mentioned in https://www.nsnam.org/wiki/MobilityHelper#Manual_Allocation But there is not much explanation. I am confused whether my approach works. Do you know anything about position allocation in Wifi Adhoc mode? #include "ns3/core-module.h" #include "ns3/network-module.h" #include "ns3/applications-module.h" #include "ns3/wifi-module.h" #include "ns3/mobility-module.h" #include "ns3/internet-module.h" #include "ns3/ndnSIM-module.h" using namespace std; namespace ns3 { NS_LOG_COMPONENT_DEFINE("ndn.WifiExample"); // // DISCLAIMER: Note that this is an extremely simple example, containing just 2 wifi nodes // communicating directly over AdHoc channel. // // Ptr // MyNetDeviceFaceCallback (Ptr node, Ptr ndn, Ptr device) // { // // NS_LOG_DEBUG ("Create custom network device " << node->GetId ()); // Ptr face = CreateObject (node, device); // ndn->AddFace (face); // return face; // } void ReceivePacket (Ptr socket) { while (socket->Recv ()) { NS_LOG_UNCOND ("Received one packet!"); } } static void GenerateTraffic (Ptr socket, uint32_t pktSize, uint32_t pktCount, Time pktInterval ) { if (pktCount > 0) { socket->Send (Create (pktSize)); Simulator::Schedule (pktInterval, &GenerateTraffic, socket, pktSize,pktCount-1, pktInterval); } else { socket->Close (); } } int main(int argc, char* argv[]) { std::string phyMode ("DsssRate1Mbps"); double distance = 500; // m uint32_t packetSize = 1000; // bytes uint32_t numPackets = 1; uint32_t numNodes = 25; // by default, 5x5 uint32_t sinkNode = 0; uint32_t sourceNode = 24; double interval = 1.0; // seconds bool verbose = false; bool tracing = false; CommandLine cmd; cmd.AddValue ("phyMode", "Wifi Phy mode", phyMode); cmd.AddValue ("distance", "distance (m)", distance); cmd.AddValue ("packetSize", "size of application packet sent", packetSize); cmd.AddValue ("numPackets", "number of packets generated", numPackets); cmd.AddValue ("interval", "interval (seconds) between packets", interval); cmd.AddValue ("verbose", "turn on all WifiNetDevice log components", verbose); cmd.AddValue ("tracing", "turn on ascii and pcap tracing", tracing); cmd.AddValue ("numNodes", "number of nodes", numNodes); cmd.AddValue ("sinkNode", "Receiver node number", sinkNode); cmd.AddValue ("sourceNode", "Sender node number", sourceNode); cmd.Parse (argc, argv); // Convert to time object Time interPacketInterval = Seconds (interval); // disable fragmentation Config::SetDefault("ns3::WifiRemoteStationManager::FragmentationThreshold", StringValue("2200")); Config::SetDefault("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue("2200")); Config::SetDefault("ns3::WifiRemoteStationManager::NonUnicastMode", StringValue("DsssRate1Mbps")); ////////////////////// ////////////////////// ////////////////////// WifiHelper wifi = WifiHelper::Default(); // wifi.SetRemoteStationManager ("ns3::AarfWifiManager"); wifi.SetStandard(WIFI_PHY_STANDARD_80211a); wifi.SetRemoteStationManager("ns3::ConstantRateWifiManager", "DataMode", StringValue("DsssRate1Mbps")); YansWifiChannelHelper wifiChannel; // = YansWifiChannelHelper::Default (); wifiChannel.SetPropagationDelay("ns3::ConstantSpeedPropagationDelayModel"); wifiChannel.AddPropagationLoss("ns3::FriisPropagationLossModel"); //wifiChannel.AddPropagationLoss("ns3::NakagamiPropagationLossModel"); // YansWifiPhy wifiPhy = YansWifiPhy::Default(); YansWifiPhyHelper wifiPhyHelper = YansWifiPhyHelper::Default(); wifiPhyHelper.Set ("RxGain", DoubleValue (-10) ); // ns-3 supports RadioTap and Prism tracing extensions for 802.11b wifiPhyHelper.SetPcapDataLinkType (YansWifiPhyHelper::DLT_IEEE802_11_RADIO); wifiPhyHelper.SetChannel(wifiChannel.Create()); /*wifiPhyHelper.Set("TxPowerStart", DoubleValue(5)); wifiPhyHelper.Set("TxPowerEnd", DoubleValue(5));*/ NqosWifiMacHelper wifiMacHelper = NqosWifiMacHelper::Default(); wifi.SetStandard (WIFI_PHY_STANDARD_80211b); wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager", "DataMode",StringValue (phyMode), "ControlMode",StringValue (phyMode)); wifiMacHelper.SetType("ns3::AdhocWifiMac"); /* Ptr randomizer = CreateObject(); randomizer->SetAttribute("Min", DoubleValue(10)); randomizer->SetAttribute("Max", DoubleValue(100));*/ MobilityHelper mobility; Ptr initialAlloc = CreateObject (); initialAlloc->Add(Vector(1, 1., 0.)); initialAlloc->Add(Vector(1, 3., 0.)); initialAlloc->Add(Vector(2, 2., 0.)); initialAlloc->Add(Vector(3, 2., 0.)); initialAlloc->Add(Vector(4, 2., 0.)); initialAlloc->Add(Vector(5, 1., 0.)); initialAlloc->Add(Vector(5, 2., 0.)); initialAlloc->Add(Vector(5, 3., 0.)); mobility.SetMobilityModel("ns3::ConstantPositionMobilityModel"); mobility.SetPositionAllocator(initialAlloc); NodeContainer nodes; nodes.Create(8); //////////////// // 1. Install Wifi NetDeviceContainer wifiNetDevices = wifi.Install(wifiPhyHelper, wifiMacHelper, nodes); // 2. Install Mobility model mobility.Install(nodes); // 3. Install NDN stack NS_LOG_INFO("Installing NDN stack"); ndn::StackHelper ndnHelper; // ndnHelper.AddNetDeviceFaceCreateCallback (WifiNetDevice::GetTypeId (), MakeCallback // (MyNetDeviceFaceCallback)); ndnHelper.SetOldContentStore("ns3::ndn::cs::Lru", "MaxSize", "1000"); ndnHelper.SetDefaultRoutes(true); ndnHelper.Install(nodes); // Set BestRoute strategy ndn::StrategyChoiceHelper::Install(nodes, "/", "/localhost/nfd/strategy/best-route"); ndn::GlobalRoutingHelper ndnGlobalRoutingHelper; ndnGlobalRoutingHelper.InstallAll(); // 4. Set up applications NS_LOG_INFO("Installing Applications"); std::string prefix = "/prefix"; ndn::AppHelper consumerHelper("ns3::ndn::ConsumerCbr"); consumerHelper.SetPrefix(prefix); consumerHelper.SetAttribute("Frequency", DoubleValue(100.0)); consumerHelper.Install(nodes.Get(0)); consumerHelper.Install(nodes.Get(1)); //consumerHelper.Install(nodes.Get()); /* consumerHelper.SetPrefix("/test/prefix1"); consumerHelper.SetAttribute("Frequency", DoubleValue(10.0)); consumerHelper.Install(nodes.Get(1));*/ ndn::AppHelper producerHelper("ns3::ndn::Producer"); producerHelper.SetPrefix(prefix); producerHelper.SetAttribute("PayloadSize", StringValue("1200")); producerHelper.Install(nodes.Get(5)); producerHelper.Install(nodes.Get(6)); producerHelper.Install(nodes.Get(7)); /* producerHelper.SetPrefix("/"); producerHelper.SetAttribute("PayloadSize", StringValue("1200")); producerHelper.Install(nodes.Get(2));*/ //////////////// ndnGlobalRoutingHelper.AddOrigins(prefix, nodes.Get(7)); ndnGlobalRoutingHelper.AddOrigins(prefix, nodes.Get(6)); ndnGlobalRoutingHelper.AddOrigins(prefix, nodes.Get(5)); // Calculate and install FIBs ndn::GlobalRoutingHelper::CalculateRoutes(); wifiPhyHelper.EnablePcap ("ndn-simple-adhoc", wifiNetDevices); Simulator::Stop(Seconds(30.0)); Simulator::Run(); Simulator::Destroy(); return 0; } } // namespace ns3 int main(int argc, char* argv[]) { return ns3::main(argc, argv); } -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 15379 bytes Desc: not available URL: