[ndnSIM] Question about extending forwarding strategy in ndnSIM

Alex Afanasyev alexander.afanasyev at ucla.edu
Wed Feb 27 12:52:40 PST 2013


Hi Yifeng,

On Feb 27, 2013, at 8:56 AM, Yifeng Li <yifengl at email.arizona.edu> wrote:

> Hello Alex,
> 
> Regarding using window limits, I want to update the current limit (e.g. increase window size or decrease by 1). In my forwarding strategy, when I'm reducing the limit, I'm using something like:
> 
>   Ptr<Limits> faceLimits = face->GetObject<Limits> ();
>   double newLimit = std::max (0.0, faceLimits->GetCurrentLimit() - 1); //cannot be less than 0
>   faceLimits->UpdateCurrentLimit(newLimit);
>   
>  But from the outputs I'm getting (pcap trace), it seems like the throughput gets reduced too much. What would be the equivalent of 1 window size?

If you want to have minimum window 1, why don't you have this as part of you newLimit calculation?  For example,

    double newLimit = std::max (1.0, faceLimits->GetCurrentLimit() - 1); //cannot be less than 1  

If it is something undesirable, you have to have some what to increase window from 0 (which means that no Interests are allowed to be send out at all).

> Also, I'm printing the limits as they change, but I cannot see which node the limit belongs to. I'm using:
> 
> uint32_t nodeid = inFace->GetObject <Node>()->GetId();
> std::cout << "current node: " << nodeid << std::endl;

This is a little bit wrong.  Face is not aggregated to a Node object.  You need a little bit different syntax (see more here: http://ndnsim.net/doxygen/classns3_1_1ndn_1_1_net_device_face.html) if you want to get node id:

uint32_t nodeId = inFace->GetNode ()->GetId ()
...

---
Alex

> Inside my forwarding strategy, but it will give a segfault. Can I not get the node id this way?
> 
> Yifeng

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20130227/04d7b150/attachment.html>


More information about the ndnSIM mailing list