[ndnSIM] RTT tag
alexander.afanasyev at ucla.edu
Thu Sep 5 21:01:43 PDT 2013
I think what you're describing is not RTT, but something like propagation delay from the producer/cache.
To access tags, you can always use PeekPacketTag to get a copy of the tag, or RemovePacketTag to get tag and remove it (i.e., you want to use this if you want to update the tag/value of the tag).
As for OnData. I think the best place is to put it after the line 256 in fw/ndn-forwarding-strategy.cc, just add the condition on `cached' variable, which indicate whether Data was cached or not, as determined by your policy/implementation.
On Sep 4, 2013, at 6:57 PM, 陈胜蓝 <blindeafer at 163.com> wrote:
> I am sorry for my expression,I make an example:
> (A)- - - - - -(B)- - - - - -(C)- - - - - -(D)
> there are four nodes, A is consumer, D is producer,B and C are routers.If A send out an interest to request a content M,and D satisfies the interest.M will pass C and B to A.The tag is created and initialized to 0 at producer.
> If node C decide to cache M and store it successfully,it will update the value of tag with the RTT of M.And node B will consult the value to decide whether to cache M.If node B cache M successfully, the value of tag will be update with the RTT at node B.So the value of the tag always record the latest RTT the lastest time content is cached.
> In my cache policy, node will consult the value of tag to decide whether to cache the content incoming, and will update the value if the content is successfully cached at this node.
> So I wuold like to know how to get the value of the tag in OnData() function and how to insert the value updated into packet before it is send to downstream node to satisfy interests.
> Thank you.
> At 2013-09-05 04:05:40,"Alex Afanasyev" <alexander.afanasyev at ucla.edu> wrote:
> I'm really sorry, but I'm still confused. Did you check how FwHopCount tag is implemented? Is it something similar to what you want, but just different metric?
> Also, why do you want to put RTT metric into the packet, as you client (who generated interest) can always know when it send out Interest packet and after Data packet is received it can calculate RTT for the Interest/Data pair. Actually, there is already implementation and TraceHelper for that functionality: http://ndnsim.net/metric.html#application-level-trace-helper
> On Sep 2, 2013, at 6:17 PM, 陈胜蓝 <blindeafer at 163.com> wrote:
>> I add the RTT tag to data packet,it is created and initialized to 0 at producer.cc.
>> 1.When a data packet arrive at a node,I can get the interval R from the time the coresponding interest was send.If the node decide to cache the data packet,and before the data packet was send to satisfy interests in PIT, the node will update the tag with the inteval R.
>> 2.when a node get a data packet, it will get the value of the RTT tag.
>> I don't know how to get the value from data packet and how to add the updated tag to data packet before it is send to satisfy interests.
>> At 2013-09-03 01:06:16,"Alex Afanasyev" <alexander.afanasyev at ucla.edu> wrote:
>> Can you clarify a little bit more on what is your exact problem... I'm a little bit confused.
>> On Sep 2, 2013, at 8:10 AM, 陈胜蓝 <blindeafer at 163.com> wrote:
>>> Hi Alex,
>>> I create a new tag to record RTT and add it to content packet.It is initialized to 0 by producer. If the node cache the content, it will update the value of the tag with RTT(Simulator::Now() - sendtime),the sendtime = pitEntry->GetOutgoing ().find (inFace)->m_sendTime.
>>> I create the tag class with Update() function and Get() function to get the value. How to add the tag to origPacket after it is updated before SatisfyPendingInterest (inFace, header, payload, origPacket, pitEntry) in OnData(),and get the value from origPacket in the OnData(),could you give me some hint?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ndnSIM