[ndnSIM] how does "sending packet" be implemented ?

Alex Afanasyev alexander.afanasyev at ucla.edu
Thu Mar 7 11:48:29 PST 2013

Hi Huqian,

DidSendOutData and DidSendOutInterest (as I was hoping that name would suggest) are so called events that are executed just after Data or Interest packet was send out on a face.   You can override these events in a custom strategy, e.g., to calculate statistics  or do some other processing.  In any case, these are not used and not intended to be used to send packets.

m_outInterests and m_outData are so called TracedCallbacks, whose sole purpose is to collect statistics.


To send out an Interest/Data you need to simply call Send method on Face object, similar as it is done for Interests here:
and for Data here:


On Mar 7, 2013, at 1:40 AM, huqian <huqian at bupt.edu.cn> wrote:

> Hi,Alex:
> I have some questions about "how to send a packet ".
> I found that function "DidSendOutData " in "ndn-forwarding-strategy.cc " is not implemented yet,so how does a DATA packet be sended to other nodes?
> the same question about "DidSendOutInterest".
> do functions "m_outInterests" and "m_outData" send out the packet actually?I am confused that how do they work.....
> I try to implement that,one node can send a kind of packet defined by custom,may be not INTEREST or DATA packet.
> -----------------------------------------------------
> related codes
> ForwardingStrategy::DidSendOutInterest (Ptr<Face> inFace,
>                                         Ptr<Face> outFace,
>                                         Ptr<const InterestHeader> header,
>                                         Ptr<const Packet> origPacket,
>                                         Ptr<pit::Entry> pitEntry)
> {
>   m_outInterests (header, outFace);
> }
> TracedCallback<Ptr<const InterestHeader>,
>                  Ptr<const Face> > m_outInterests;
> TracedCallback<Ptr<const InterestHeader>,
>                  Ptr<const Face> > m_outData ;
> Huqian
> _______________________________________________
> ndnSIM mailing list
> ndnSIM at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim

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

More information about the ndnSIM mailing list