bool myNetDeviceFace::Send (Ptr packet) { HeaderHelper::Type type = HeaderHelper::GetNdnHeaderType (packet); GeoTransmissionTag tag; bool isTag = packet->PeekPacketTag (tag); Ptr mobility = m_node->GetObject (); if (mobility == 0) { NS_FATAL_ERROR ("Mobility model has to be installed on the node"); } double distance = m_maxDistance; if (isTag) { distance = CalculateDistance (tag.GetPosition (), mobility->GetPosition ()); NS_LOG_DEBUG ("Tag is OK, distance is " << distance); distance = std::min (m_maxDistance, distance); } else { NS_LOG_DEBUG("Tag not found"); } if (type == HeaderHelper::INTEREST_CCNB || type == HeaderHelper::INTEREST_NDNSIM) { // DO STUFF } else if (type == HeaderHelper::CONTENT_OBJECT_CCNB || type == HeaderHelper::CONTENT_OBJECT_NDNSIM) { // DO OTHER STUFF } }