[ndnSIM] Question on sending packets via netdeviceface

Spyridon (Spyros) Mastorakis spiros.mastorakis at gmail.com
Thu Jan 15 17:32:21 PST 2015

Hello Yali,

I forward your email to the ndnSIM maliing list in order to be visible to all the ndnSIM users. 

Regarding your question:

This error means that the packet, which is received, has a header that cannot be recognized by ndnSIM. ndnSIM implements the communication model of NDN where two types of packets are defined: The Interest and the data packet. Hello packets are not defined.

Therefore, if a packet is neither an Interest nor a Data packet, the communication paradigm is violated. 
If you really want to exchange Hello packets though, you will need either to specify a special Interest packet for this purpose (i.e., change the Interest class) and handle this Interest packet in a special way or to hack somehow the wire encoding/decoding methods and the face class in order to encode, decode and accept, respectively, packets other than Interest and Data. 

Hope this helps.

Spyridon (Spyros) Mastorakis
Personal Website: http://cs.ucla.edu/~mastorakis/
Internet Research Laboratory
PhD Computer Science

> On Jan 15, 2015, at 4:54 PM, Yali Wang <ylwang at soe.ucsc.edu> wrote:
> Hello,
> I want to send to all neighbors the periodic Hello message(regular packet) via ndn-netdevice-face class, and it works fine. but it gets stuck on header part.
> I don't know what to put in header part. Here is my definition of packet:
> m_packet = Create<Packet> (reinterpret_cast<const uint8_t*> (str), size);
> Ndnsim needs the wire encoding(0x01,0xD2 as interest-ccnb) to decide if receives the interest or data.  How to solve my issue?  I only want to send hello messages.
> As below, it is error message from ndn-face.cc
> msg="Unknown NDN header. Should not happen", file=../src/ndnSIM/model/ndn-face.cc, line=196
> libc++abi.dylib: terminating with uncaught exception of type ns3::ndn::UnknownHeaderException
> Command ['/Users/yawang/ndnSIM/ns-3/build/src/ndnSIM/examples/ns3-dev-ndn-grid-topo-plugin-debug'] terminated with signal SIGIOT. Run it under a debugger to get more information (./waf --run <program> --command-template="gdb --args %s <args>").
> Thank you!
> Yali

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20150115/3f32da12/attachment.html>

More information about the ndnSIM mailing list