[ndnSIM] Change an Interest Packet in App

Julian Wulfheide ju.wulfheide at gmail.com
Thu Nov 27 03:19:40 PST 2014


Yeah, it did that now but not with the cost but with the flag. Thanks!

On Mon, Nov 24, 2014 at 10:27 PM, Alex Afanasyev
<alexander.afanasyev at ucla.edu> wrote:
> You can try to cheat and use specific value of the face cost. For example, you can use, say cost 131 (or any other small value---it should be smaller than any other NetDeviceFace cost), to determine if the face is connected to your app or not.
>
> ---
> Alex
>
>> On Nov 24, 2014, at 12:08 PM, Julian Wulfheide <ju.wulfheide at gmail.com> wrote:
>>
>> Okay... I was a little bit too unobservant there again ;) The Interest
>> is const in the DoPropagateInterest(...) as well... But there are
>> other methods in the ForwardingStrategy that I can use to change the
>> interest packet. But still, is there a way to see what is "behind" a
>> face?
>> Thanks!
>>
>> On Mon, Nov 24, 2014 at 11:23 AM, Julian Wulfheide
>> <ju.wulfheide at gmail.com> wrote:
>>> Hi Alex,
>>> again thank you very much for you help. Much appreciated!
>>>
>>> I have a ndnSim App (MyApp) that is deployed on some nodes in my
>>> network. I want interest packets that passed nodes with this app
>>> (those nodes also have to forward the packet to the app) to be marked.
>>> Marked packets will not be forwarded to the App on other nodes.
>>>
>>> In principle I now see how that can be implemented in the routing
>>> strategy. But for that I would have to be able to see what App sits
>>> "behind" a face in the ForwardingStrategy::DoPropagateInterest(...),
>>> right? I would need something like this:
>>>
>>>  BOOST_FOREACH (const fib::FaceMetric &metricFace,
>>> pitEntry->GetFibEntry ()->m_faces.get<fib::i_metric> ())
>>>    {
>>>      if (metricFace.GetStatus () == fib::FaceMetric::NDN_FIB_RED) //
>>> all non-read faces are in the front of the list
>>>        break;
>>>
>>>      if (MyApp sits behind metricFace AND interest is not already marked)
>>>        TrySendOutInterest (inFace, metricFace.GetFace (), interest, pitEntry))
>>>      else if (!TrySendOutInterest (inFace, metricFace.GetFace (),
>>> interest, pitEntry))
>>>        {
>>>          continue;
>>>        }
>>>
>>>      propagatedCount++;
>>>      break;
>>>    }
>>>
>>> I am able to check if the metricFace is an AppFace. But that does not
>>> allow me to handle MyApp individually.
>>>
>>> Best, Julian
>>>
>>> On Thu, Nov 20, 2014 at 2:28 AM, Alex Afanasyev
>>> <alexander.afanasyev at ucla.edu> wrote:
>>>> Hi Julian,
>>>>
>>>> It depends on what exactly you want to do.  When you do anything within an application, you're dealing with the final copy of the Interest, which will never be forwarded anywhere.  So, even if the Interest wasn't marked const, none of your updates would be effective during forwarding.
>>>>
>>>> You may want to update custom fields inside the forwarding strategy, before the Interest is actually forwarded.
>>>>
>>>> ---
>>>> Alex
>>>>
>>>>
>>>>> On Nov 19, 2014, at 9:02 AM, Julian Wulfheide <ju.wulfheide at gmail.com> wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> I have an App in which I want to mark an Interest packet before it is forwarded.
>>>>> So I added a new field to the Interest packet as describe here:
>>>>> http://www.lists.cs.ucla.edu/pipermail/ndnsim/2013-December/001046.html
>>>>>
>>>>> I was hoping I could now just alter the Interest packet with something
>>>>> like interest->SetXXX(Y) in my
>>>>>
>>>>> MonitorApp::OnInterest (Ptr<const ndn::Interest> interest)
>>>>>
>>>>> but I just now realized that it is constant. What would be the
>>>>> recommended way of "marking" a packet while it is being forwarded to
>>>>> its destination?
>>>>>
>>>>> Thanks!
>>>>> _______________________________________________
>>>>> ndnSIM mailing list
>>>>> ndnSIM at lists.cs.ucla.edu
>>>>> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim
>>>>
>>
>> _______________________________________________
>> 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