[ndnSIM] question
Alex Afanasyev
alexander.afanasyev at ucla.edu
Thu Apr 18 20:52:57 PDT 2013
Can you also post the actual error message?
I have a small suspicion that including <ns3/packet.h> will solve the problem, but cannot be sure without a little bit more context.
---
Alex
On Apr 18, 2013, at 6:58 PM, 王宁 <wnbupt9 at gmail.com> wrote:
> the following is my code :
>
> 1. //generate CA_Packet
>
> ndn::CAHeader caheader;
> NameComponents name=header->GetName();
> caheader.SetName(&name);
> caheader.SetScope(0xFF);
> caheader.SetCA_TTL(0);
> caheader.SetNonce(0);
> caheader.SetNack(0);
> Ptr<Packet>packet = Create<Packet>();
> packet->AddHeader (caheader);
> NS_LOG_DEBUG ("Sending CA packet for"<<header ->GetName());
>
> 2.//send CA_PACKET
>
> Ptr<L3Protocol> ndn = this->GetObject<L3Protocol> ();
> for (uint32_t faceNum = 0; faceNum < ndn->GetNFaces (); faceNum++)
> {
> Ptr<Face> face = ndn->GetFace (faceNum);
> face->Send(packet);
> }
>
>
> when i use the following code to send packet ,the packet type can be resolved:
>
> BOOST_FOREACH(const fib::FaceMetric &metricFace,pitEntry->GetFibEntry ()->m_faces.get<fib::i_metric> ())
> {
> metricFace.m_face->Send(packet);
> }
>
>
>
>
> 2013/4/19 Alex Afanasyev <alexander.afanasyev at ucla.edu>
>> I'm not quite sure what is the relation between ndn->GetNFaces() and new type of packet you created. Would it be possible if you post some code, so I can check what is going wrong?
>>
>> ---
>> Alex
>>
>> On Apr 18, 2013, at 2:09 AM, 王宁 <wnbupt9 at gmail.com> wrote:
>>
>>> hi,thank you for your answers . Since i define a new packet,so when i use 'ndn->GetNFaces ()' sending to all faces, when the node recevice the packet ,it cannot get the type of my new packet, i define the new packet in ndn-header-helper.cc ndn-header-helper.h , so what should i do ?
>>>
>>>
>>> 2013/4/18 Alex Afanasyev <alexander.afanasyev at ucla.edu>
>>>> Is there a reason for not adding information about forwarding to the node's neighbor to the FIB? FIB suppose to be just a database for all available paths to where you can send Interests for specific (or all) prefixes, maintaining data plane performance characteristics for each face.
>>>>
>>>> If you really want to do that, it is still possible if you write a custom strategy (http://ndnsim.net/fw.html#writing-your-own-custom-strategy). You may also want to check this conversation http://www.lists.cs.ucla.edu/pipermail/ndnsim/2012-December/000030.html with an example how to send out interests to faces not listed in the FIB.
>>>>
>>>> ---
>>>> Alex
>>>>
>>>> On Apr 17, 2013, at 6:27 AM, 王宁 <wnbupt9 at gmail.com> wrote:
>>>>
>>>>> hi,i want to know if the node's neighbor is not in FIB,but i want to send interest to all neighbor. what should i do ?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20130418/391d974e/attachment.html>
More information about the ndnSIM
mailing list