[ndnSIM] question

Alex Afanasyev alexander.afanasyev at ucla.edu
Fri Apr 19 12:56:21 PDT 2013


Oh. This is not a compilation error, so you don't need to include anything.  

You probably didn't completely handle your new packet format in ndn-header-helper.cc.  The error telling you that there is an exception ndn::UnknownHeaderException, which is thrown by HeaderHelper::GetNdnHeaderType () method.

And of course, you will have to properly handle your new packet format by ndn::L3Protocol and (if necessary) by ndn::AppFace.

---
Alex

On Apr 18, 2013, at 9:59 PM, 王宁 <wnbupt9 at gmail.com> wrote:

> the error code   :
> assert failed. cond="false", msg="Unknown NDN header. Should not happen", file=../src/ndnSIM/model/ndn-l3-protocol.cc, line=336
> terminate called after throwing an instance of 'ns3::ndn::UnknownHeaderException'
> 
> i don't know  including <ns3/packet.h> to which file? 
> 
> 
> 
> 
> 
> 
> 2013/4/19 Alex Afanasyev <alexander.afanasyev at ucla.edu>
> 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/20130419/1188660c/attachment.html>


More information about the ndnSIM mailing list