[ndnSIM] Data forwarding backoff

nabil khemache khemache.nabil at gmail.com
Sun May 10 22:25:52 PDT 2020


Hi Muktadir

I just found out that the problem came from the data refrence passed to
onOutgoingData function. I think it was first created without make_shared.

I solved it while troubleshooting by creating in the funtion a new instance
of data object and "cloned" from the passed one using the getters and
setters of Signature and Metainfo.

I don't think this is the best way to operate. I might reach the data first
call and make it shared, but this is all i have for the moment. Any other
ideas would be great.

Thank you

Nabil

Le lun. 11 mai 2020 à 05:39, Muktadir R Chowdhury (mrchwdhr) <
mrchwdhr at memphis.edu> a écrit :

> Turn on the forwarder log of ndnSIM to see what's actually going on. If
> you can't find the problem, please share the log here. That will be helpful
> in debugging the problem.
>
> -Muktadir
> ------------------------------
> *From:* ndnSIM <ndnsim-bounces at lists.cs.ucla.edu> on behalf of nabil
> khemache via ndnSIM <ndnsim at lists.cs.ucla.edu>
> *Sent:* Sunday, May 10, 2020 11:35 AM
> *To:* ndnsim at lists.cs.ucla.edu <ndnsim at lists.cs.ucla.edu>
> *Subject:* [ndnSIM] Data forwarding backoff
>
> Hi everyone,
>
> i hope all of you are fine,
>
> I'm trying one of the first forwarding mechanisms used in wireless
> networks: overhear and backoff forwarding
>
>
> i used ns3::Simulator::Schedule to schedule the outface.sendInterest in
> the onOutgoingInterest function, and it works very well, i can see nodes
> keeping "silent".
>
> But when i tried to use the same thing in the onOutgoingData with
> ns3::Simulator::Schedule(ns3::MilliSeconds(rand()%2, &Face::sendData,
> &outFace, data)
> i get a pointers related error "terminate called after throwing an
> instance of 'std::bad_weak_ptr'
>   what():  bad_weak_ptr"
>
> I don't have any idea which pointer is meant, and i'd be very pleased if
> anyone could give me a clue or another way to do it if i'm doing it wrong.
>
> thanks in advance.
>
> Best regards, Nabil
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20200511/094649f7/attachment.html>


More information about the ndnSIM mailing list