[ndnSIM] Extension of Nack packet

Alex Afanasyev alexander.afanasyev at ucla.edu
Wed Dec 18 13:28:14 PST 2013


Hi Tun,

When you saying that "it doesn't receive", where are you expecting to receive it?  I mean, which function?

Depending on which strategy class you're modifying, this could be in different places.  If you're modifying directly ndn-forwarding-strategy.cc, then the packet will arrive in OnInterest() call.

If you are modifying anything that inherited from fw::Nacks class, then it will be in OnNack() method.  You can check the implementation of OnInterest in fw::Nacks class to the get idea how this happens.

--
Alex

On Dec 11, 2013, at 10:56 PM, Tun Tun Oo <htunhtunu at gmail.com> wrote:

> Dear Alex,
> 
> I would like to try an idea for responding whenever Data packet received as in the scenario.
> 
> Data Packet flow ::Consumer <-------R1<-----------R2<--------------Producer
> ACK-Data ::           Consumer ------->R1----------->R2-------------->Producer
> 
> For this purpose, I need to create a new packet, just a name, ACK-Data.
> As my understanding, it is similar like nack and I try to implement this packet as an extension of nack.
> Firstly, I prepared it as nack type and then I tried with following code
> 
> OnData (Ptr<Face>face,
>                 Ptr<Data>data)
> {
>          Ptr<Name> name = Create<Name>(data->GetName ());
> 
>         Ptr<Interest> ack= Create <Interest>();
> 
>         ack->SetNack (Interest::ACK_Data);
>  
>         ack->SetName (name);
>  
>         face->SendInterest (ack);
> }
> 
> When running, it  doesn't receive the reply packet.
> I am not confidence about the coding and could you give me a kindly guidance?
> Thanks you 
> 
> Sincerely yours
> TUN
> 
>  
> 
> _______________________________________________
> ndnSIM mailing list
> ndnSIM at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim





More information about the ndnSIM mailing list