[ndnSIM] Questions About the Hop Counts
alexander.afanasyev at ucla.edu
Thu Mar 27 13:16:06 PDT 2014
Sorry for the confusion. But here is the basic rule that I tried to explain in the docs, but apparently fail (you're not the first one who confused).
HopCount is increased any time "Send" is called from the forwarder side. forwarder -> other node; forwarder -> applications. It is never increased when application sends anything towards the forwarder, since it doesn't use "Send" method, it uses a different mechanism provided by AppFace/ApiFace.
So. Again. When application sends out interest/data, hop count is not increased (send out is done via an appFace callback), when application receives interest/data, hop count **is** increased.
Hop count cannot be zero. If data is satisfied from local cache, hop count would be 1 (app->forwarder +0, forwarder->app +1).
Is it still confusing?
On Mar 25, 2014, at 11:52 PM, Aaron <aaronishere at qq.com> wrote:
> Hi, Alex
> Why the HopCounts in the AppDelayTracer can be an odd hop counts? Since one interest matches one data, if the hop counts combine the interest and data, it should be a even hop counts. What causes an odd hop counts?
> Another question is that, the hop counts can be zero if the consumer gets data from its access node, is that right? I'm not sure how the consumer as an application sends its interest to the access node in the code?
> Consumer::SendPacket ()
> m_transmittedInterests (interest, this, m_face);
> m_face->ReceiveInterest (interest);
> m_face->ReceiveInterest (interest); It seems to send the interest to the AppFace that is towards access node.
> Face::ReceiveInterest (Ptr<Interest> interest)
> if (!IsUp ())
> // no tracing here. If we were off while receiving, we shouldn't even know that something was there
> return false;
> m_upstreamInterestHandler (this, interest);
> return true;
> I'not sure which function will call the m_upstreamInterestHandler so that the interest is finally sent to the ForwardingStrategy::Oninterest()?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ndnSIM