<div dir="ltr">Hi, Junxiao<br>Thank you for the reply.<br><br>We changed the question.<br>Would you please help us again?<div><br><div><ol><li>When a Data acquisition request has occurred at a Consumer, corresponding Interest will be forwarded toward a destined Producer.</li><li><span style="font-family:helvetica;font-size:12px">The router having cached Data for the Interest, sends back the Data to the Consumer.</span></li><li><span style="font-family:helvetica;font-size:12px">The Data will be cached at the inter mediate routers belonging to the return path to the Consumer.</span></li><li><span style="font-family:helvetica;font-size:12px">At this time, if the number of cached Data exceeds the upper limit of the CS (default:100), one Data selected according to CS policy is evicted at the  default ndnSIM.(Currently, we adopt LRU policy.)</span></li><li><span style="font-family:helvetica;font-size:12px">So, we’d like to transfer the selected Data for eviction, to the other neighbor routers, and keep it at the CS.</span></li><li><span style="font-family:helvetica;font-size:12px">For the above objective, we modified the operation of ndnSIM as follows :</span></li><ul><li><span style="font-family:helvetica;font-size:12px">At the router receiving a Interest,</span></li></ul><ol><ol><li><span style="font-family:helvetica;font-size:12px">Copy all cached Data (CS entry) to local memory as (line:50-52)</span></li><ul><li><span style="font-family:menlo;font-size:11px">std::vector<std::string> beforeCS;</span></li><li><span style="font-family:menlo;font-size:11px">for(int i = 0; i < cssize; i++) { beforeCS.push_back(getCs().getEntryName(i).toUri()); }</span></li></ul><li><span style="font-family:helvetica;font-size:12px">Call “ m_cs.insert(*dataCopyWithout Packet) “</span></li><li><span style="font-family:helvetica;font-size:12px">Copy all cached Data to local memory as (line:65-67)</span></li><ul><li><span style="font-family:menlo;font-size:11px">std::vector<std::string> afterCS;</span></li><li><span style="font-family:menlo;font-size:11px;font-variant-ligatures:no-common-ligatures">for(int i = 0; i < cssize; i++){ afterCS.push_back(getCs().getEntryName(i).toUri());</span><span style="font-size:12px;line-height:normal;font-family:helvetica"> </span><span style="font-family:menlo;font-size:11px;font-variant-ligatures:no-common-ligatures">}</span></li></ul><li><span style="font-family:helvetica;font-size:12px">Identify the evicted cached Data by comparing afterCS and beforeCS, and, obtain the Data from the beforeCS.</span></li></ol></ol><li><span style="font-family:helvetica;font-size:12px">In the above process, we could identify the evicted cached Data.</span></li><ol><li><span style="font-family:helvetica;font-size:12px">We’re trying to send the evicted Data to neighbor router by using “onOutgoingData (forwarder.cpp)”. (line:110) As the following log indicated, the transmission seems to success at the sender side.</span></li><ul><li><span style="font-family:helvetica;font-size:12px">Extract of the log</span></li><ul><li><span style="font-family:helvetica;font-size:12px">10.4775s 1 nfd.Forwarder:onOutgoingData(): [DEBUG] onOutgoingData face=259 data=/prefix/%FE%00</span></li><li><span style="font-family:helvetica;font-size:12px">10.4775s 1 ndn.NetDeviceFace:sendData(0x7f848a6029d8, 0x10c033000)</span></li></ul></ul><li><span style="font-family:helvetica;font-size:12px">However, the following log is also output and simulation stops.</span></li><ul><li><span style="font-family:helvetica;font-size:12px">libc++abi.dylib: terminating with uncaught exception of type std::__1::bad_weak_ptr: bad_weak_ptr</span><br></li></ul></ol><li><span style="font-family:helvetica;font-size:12px">Would you give us the advice how to realize the operation we wanted?</span></li></ol><div><font face="helvetica"><span style="font-size:12px"><br></span></font></div><div><font face="helvetica"><span style="font-size:12px"><br></span></font></div><div><p style="margin:0px;font-size:12px;line-height:normal;font-family:helvetica">————————————————————————————————————</p>
<ol>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">void</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">Forwarder::onIncomingData(Face& inFace, const Data& data)</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">{</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    // receive Data</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    NFD_LOG_DEBUG("onIncomingData face=" << inFace.getId() << " data=" << data.getName());</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    const_cast<Data&>(data).setIncomingFaceId(inFace.getId());</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    ++m_counters.getNInDatas();</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    </span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    // /localhost scope control</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    bool isViolatingLocalhost = !inFace.isLocal() &&</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    LOCALHOST_NAME.isPrefixOf(data.getName());</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    if (isViolatingLocalhost) {</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        NFD_LOG_DEBUG("onIncomingData face=" << inFace.getId() <<</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">                      " data=" << data.getName() << " violates /localhost");</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        // (drop)</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        return;</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    }</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    </span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    // PIT match</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    pit::DataMatchResult pitMatches = m_pit.findAllDataMatches(data);</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    if (pitMatches.begin() == pitMatches.end()) {</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        // goto Data unsolicited pipeline</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        this->onDataUnsolicited(inFace, data);</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        return;</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    }</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    </span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    // Remove Ptr<Packet> from the Data before inserting into cache, serving two purposes</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    // - reduce amount of memory used by cached entries</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    // - remove all tags that (e.g., hop count tag) that could have been associated with Ptr<Packet></span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    //</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    // Copying of Data is relatively cheap operation, as it copies (mostly) a collection of Blocks</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    // pointing to the same underlying memory buffer.</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    shared_ptr<Data> dataCopyWithoutPacket = make_shared<Data>(data);</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    dataCopyWithoutPacket->removeTag<ns3::ndn::Ns3PacketTag>();</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    </span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    // before CS entry 7/27</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    std::vector<std::string> beforeCS;</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    // after CS entry 7/28</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    std::vector<std::string> afterCS;</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    int cssize;</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    cssize = getCs().size();</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    // Data 7/28</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    std::vector<Data> data1;</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    </span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    // CS insert</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    if (m_csFromNdnSim == nullptr){</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        // insert CS entry in beforeCS 7/29</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        for(int i = 0; i < cssize; i++){</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">            beforeCS.push_back(getCs().getEntryName(i).toUri());</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        }</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        // insert Data in data1 7/29</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        for(const cs::EntryImpl& entry : getCs().m_table){</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">            data1.push_back(entry.getData());</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        }</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        </span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        m_cs.insert(*dataCopyWithoutPacket);</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        </span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    }</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    else</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        m_csFromNdnSim->Add(dataCopyWithoutPacket);</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    </span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    // insert CS entry in afterCS 7/29</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    for(int j = 0; j < cssize; j++){</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        afterCS.push_back(getCs().getEntryName(j).toUri());</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    }</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    </span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    int dsize;</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    dsize = data1.size();</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    </span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    if(ns3::Simulator::GetContext() == 1){</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        std::string beCS;</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        std::string DATA;</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        shared_ptr<Face> OUTFACE;</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        </span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        int n = 0;</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        </span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        int csize;</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        csize = getCs().size();</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        // comparison of beforeCS and afterCS</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        int k = 0;</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        for(; k < csize; ++k){</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">            int l = 0;</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">            for(; l < csize; ++l){</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">                if(beforeCS[k] == afterCS[l]) break;</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">            }</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">            if(l < csize){</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">                break;</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">            }</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">            else{</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">                beCS = beforeCS[k];</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">                for(int m = 0; m < dsize; m++){</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">                    DATA = data1[m].getName().toUri();</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">                    if( beCS == DATA ){</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">                        n = m;</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">                        for(auto itr = mfaces.begin(); itr != mfaces.end(); ++itr){</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">                            if((int)(inFace.getId()) > 255){</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">                                if(itr->second->getRemoteUri().toString() == itr->second->getLocalUri().toString() && itr->second->getLocalUri().toString() == "netDeviceFace://"){</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">                                    if(itr->second->getId() != inFace.getId()){</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">                                        if(itr->second->getId() == 259){</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">                                            OUTFACE = itr->second;</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">                                        }</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">                                    } // end if(itr->second->getId() != inFace.getId())</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">                                } // end if(itr->second->getRemoteUri().toString()...)</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">                            } // end if((int)(inFace.getId()) > 255)</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">                        } // end if (auto itr...)</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">                    } // end if( beCS == DATA )</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">                } //end for(int m = 0; m < dsize; m++)</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">            } // end else</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">            this->onOutgoingData(data1[n], *OUTFACE);</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        } // end for(; k < csize; ++k)</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    } // endif(ns3::Simulator::GetContext() == 1)</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    </span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    </span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    std::set<shared_ptr<Face> > pendingDownstreams;</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    // foreach PitEntry</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    for (const shared_ptr<pit::Entry>& pitEntry : pitMatches) {</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        NFD_LOG_DEBUG("onIncomingData matching=" << pitEntry->getName());</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        </span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        // cancel unsatisfy & straggler timer</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        this->cancelUnsatisfyAndStragglerTimer(pitEntry);</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        </span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">            // remember pending downstreams</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">            const pit::InRecordCollection& inRecords = pitEntry->getInRecords();</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">            for (pit::InRecordCollection::const_iterator it = inRecords.begin();</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">                 it != inRecords.end(); ++it) {</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">                if (it->getExpiry() > time::steady_clock::now()) {</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">                    pendingDownstreams.insert(it->getFace());</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">                    faceid[fcnt++] = (it->getFace())->getId();</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">                }</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">            }</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        </span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        // invoke PIT satisfy callback</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        beforeSatisfyInterest(*pitEntry, inFace, data);</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        this->dispatchToStrategy(pitEntry, bind(&Strategy::beforeSatisfyInterest, _1,</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">                                                pitEntry, cref(inFace), cref(data)));</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        </span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        // Dead Nonce List insert if necessary (for OutRecord of inFace)</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        this->insertDeadNonceList(*pitEntry, true, data.getFreshnessPeriod(), &inFace);</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        </span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        // mark PIT satisfied</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        pitEntry->deleteInRecords();</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        pitEntry->deleteOutRecord(inFace);</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        </span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        // set PIT straggler timer</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        this->setStragglerTimer(pitEntry, true, data.getFreshnessPeriod());</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    }</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    </span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    // foreach pending downstream</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    for (std::set<shared_ptr<Face> >::iterator it = pendingDownstreams.begin();</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">         it != pendingDownstreams.end(); ++it) {</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        shared_ptr<Face> pendingDownstream = *it;</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        if (pendingDownstream.get() == &inFace) {</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">            continue;</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        }</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        // goto outgoing Data pipeline</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">        this->onOutgoingData(data, *pendingDownstream);</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">    }</span></li>
<li style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">}</span></li>
</ol>
<p style="margin:0px;font-size:12px;line-height:normal;font-family:helvetica">————————————————————————————————————</p><p style="margin:0px;font-size:12px;line-height:normal;font-family:helvetica"><br></p><p style="margin:0px;font-size:12px;line-height:normal;font-family:helvetica">Best regards,</p><p style="margin:0px;font-size:12px;line-height:normal;font-family:helvetica">Miho Aoki</p></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-09-05 22:06 GMT+09:00 Junxiao Shi <span dir="ltr"><<a href="mailto:shijunxiao@email.arizona.edu" target="_blank">shijunxiao@email.arizona.edu</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="#954F72"><div><p class="MsoNormal">Hi Miho</p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">I neither understand nor agree with what you are trying to do. There’s no concept of "overflowed Data” in NFD.</p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">The exception indicates an object not managed by a shared_ptr is passed to a function that calls shared_from_this on that object. You may use GDB or LLDB to obtain a backtrace where this exception is thrown, and investigate the mistake from there.</p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Yours, Junxiao</p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><u></u> <u></u></span></p><div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0in 0in 0in"><p class="MsoNormal" style="border:none;padding:0in"><b>From: </b><a href="mailto:q304001zu@gmail.com" target="_blank">Miho AOKI</a><br><b>Sent: </b>Sunday, September 4, 2016 23:25<br><b>To: </b><a href="mailto:ndnsim@lists.cs.ucla.edu" target="_blank">ndnsim@lists.cs.ucla.edu</a><br><b>Subject: </b>[ndnSIM] How to obtain the overflowed Data on routers</p></div><div><div class="h5"><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><u></u> <u></u></span></p><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif">Hi,</span><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><u></u><u></u></span></p><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><u></u> <u></u></span></p><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif">We would like to transmit the overflowed Data (in any buffer) to neighboring routers.<u></u><u></u></span></p></div></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><u></u> <u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif">Currently, we're trying to make the above operation using " onOutgoingData (forwarder.cpp) ", however, the following log is output and cannot transfer the overflowed Data.<u></u><u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><u></u> <u></u></span></p></div><div><p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:8.5pt;font-family:"menlo",serif">libc++abi.dylib: terminating with uncaught exception of type std::__1::bad_weak_ptr: bad_weak_ptr<u></u><u></u></span></p><p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:8.5pt;font-family:"menlo",serif"><u></u> <u></u></span></p><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><u></u> <u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif">How should we obtain the overflowed Data?<u></u><u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><u></u> <u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif">Would you please help us?<u></u><u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><u></u> <u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif">Best regards,<u></u><u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif">Miho Aoki<u></u><u></u></span></p></div><p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:8.5pt;font-family:"menlo",serif"><u></u> <u></u></span></p></div></div><p style="margin:0in;margin-bottom:.0001pt"><span style="font-size:8.5pt;font-family:"menlo",serif"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><u></u> <u></u></span></p></div></div></div></div></blockquote></div><br></div>