Alexander Afanasyev | 78057c3 | 2012-07-06 15:18:46 -0700 | [diff] [blame] | 1 | /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */ |
| 2 | /* |
| 3 | * Copyright (c) 2011 University of California, Los Angeles |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License version 2 as |
| 7 | * published by the Free Software Foundation; |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, write to the Free Software |
| 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 17 | * |
| 18 | * Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu> |
| 19 | */ |
| 20 | |
Alexander Afanasyev | 4aac557 | 2012-08-09 10:49:55 -0700 | [diff] [blame] | 21 | #include "ndn-fib-impl.h" |
Alexander Afanasyev | 78057c3 | 2012-07-06 15:18:46 -0700 | [diff] [blame] | 22 | |
Alexander Afanasyev | 4aac557 | 2012-08-09 10:49:55 -0700 | [diff] [blame] | 23 | #include "ns3/ndn-face.h" |
Alexander Afanasyev | bd9c18e | 2012-11-19 15:23:41 -0800 | [diff] [blame] | 24 | #include "ns3/ndn-interest.h" |
Alexander Afanasyev | adcccf4 | 2012-11-26 23:55:34 -0800 | [diff] [blame] | 25 | #include "ns3/ndn-forwarding-strategy.h" |
Alexander Afanasyev | 78057c3 | 2012-07-06 15:18:46 -0700 | [diff] [blame] | 26 | |
| 27 | #include "ns3/node.h" |
| 28 | #include "ns3/assert.h" |
| 29 | #include "ns3/names.h" |
| 30 | #include "ns3/log.h" |
| 31 | |
| 32 | #include <boost/ref.hpp> |
| 33 | #include <boost/lambda/lambda.hpp> |
| 34 | #include <boost/lambda/bind.hpp> |
| 35 | namespace ll = boost::lambda; |
| 36 | |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 37 | NS_LOG_COMPONENT_DEFINE ("ndn.fib.FibImpl"); |
Alexander Afanasyev | 78057c3 | 2012-07-06 15:18:46 -0700 | [diff] [blame] | 38 | |
| 39 | namespace ns3 { |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 40 | namespace ndn { |
| 41 | namespace fib { |
Alexander Afanasyev | 78057c3 | 2012-07-06 15:18:46 -0700 | [diff] [blame] | 42 | |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 43 | NS_OBJECT_ENSURE_REGISTERED (FibImpl); |
Alexander Afanasyev | 78057c3 | 2012-07-06 15:18:46 -0700 | [diff] [blame] | 44 | |
| 45 | TypeId |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 46 | FibImpl::GetTypeId (void) |
Alexander Afanasyev | 78057c3 | 2012-07-06 15:18:46 -0700 | [diff] [blame] | 47 | { |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 48 | static TypeId tid = TypeId ("ns3::ndn::fib::Default") // cheating ns3 object system |
| 49 | .SetParent<Fib> () |
Alexander Afanasyev | 4aac557 | 2012-08-09 10:49:55 -0700 | [diff] [blame] | 50 | .SetGroupName ("Ndn") |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 51 | .AddConstructor<FibImpl> () |
Alexander Afanasyev | 78057c3 | 2012-07-06 15:18:46 -0700 | [diff] [blame] | 52 | ; |
| 53 | return tid; |
| 54 | } |
| 55 | |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 56 | FibImpl::FibImpl () |
Alexander Afanasyev | 78057c3 | 2012-07-06 15:18:46 -0700 | [diff] [blame] | 57 | { |
| 58 | } |
| 59 | |
| 60 | void |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 61 | FibImpl::NotifyNewAggregate () |
Alexander Afanasyev | 78057c3 | 2012-07-06 15:18:46 -0700 | [diff] [blame] | 62 | { |
| 63 | Object::NotifyNewAggregate (); |
| 64 | } |
| 65 | |
| 66 | void |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 67 | FibImpl::DoDispose (void) |
Alexander Afanasyev | 78057c3 | 2012-07-06 15:18:46 -0700 | [diff] [blame] | 68 | { |
| 69 | clear (); |
| 70 | Object::DoDispose (); |
| 71 | } |
| 72 | |
| 73 | |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 74 | Ptr<Entry> |
| 75 | FibImpl::LongestPrefixMatch (const InterestHeader &interest) |
Alexander Afanasyev | 78057c3 | 2012-07-06 15:18:46 -0700 | [diff] [blame] | 76 | { |
Alexander Afanasyev | 30f60e3 | 2012-07-10 14:21:16 -0700 | [diff] [blame] | 77 | super::iterator item = super::longest_prefix_match (interest.GetName ()); |
Alexander Afanasyev | 78057c3 | 2012-07-06 15:18:46 -0700 | [diff] [blame] | 78 | // @todo use predicate to search with exclude filters |
| 79 | |
| 80 | if (item == super::end ()) |
| 81 | return 0; |
| 82 | else |
| 83 | return item->payload (); |
| 84 | } |
| 85 | |
| 86 | |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 87 | Ptr<Entry> |
Alexander Afanasyev | cfdc14f | 2013-03-15 14:38:44 -0700 | [diff] [blame^] | 88 | FibImpl::Add (const Name &prefix, Ptr<Face> face, int32_t metric) |
Alexander Afanasyev | 78057c3 | 2012-07-06 15:18:46 -0700 | [diff] [blame] | 89 | { |
Alexander Afanasyev | cfdc14f | 2013-03-15 14:38:44 -0700 | [diff] [blame^] | 90 | return Add (Create<Name> (prefix), face, metric); |
Alexander Afanasyev | 78057c3 | 2012-07-06 15:18:46 -0700 | [diff] [blame] | 91 | } |
| 92 | |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 93 | Ptr<Entry> |
Alexander Afanasyev | cfdc14f | 2013-03-15 14:38:44 -0700 | [diff] [blame^] | 94 | FibImpl::Add (const Ptr<const Name> &prefix, Ptr<Face> face, int32_t metric) |
Alexander Afanasyev | 78057c3 | 2012-07-06 15:18:46 -0700 | [diff] [blame] | 95 | { |
Alexander Afanasyev | 1ba09b8 | 2012-07-09 09:16:14 -0700 | [diff] [blame] | 96 | NS_LOG_FUNCTION (this->GetObject<Node> ()->GetId () << boost::cref(*prefix) << boost::cref(*face) << metric); |
Alexander Afanasyev | 78057c3 | 2012-07-06 15:18:46 -0700 | [diff] [blame] | 97 | |
| 98 | // will add entry if doesn't exists, or just return an iterator to the existing entry |
Alexander Afanasyev | 30f60e3 | 2012-07-10 14:21:16 -0700 | [diff] [blame] | 99 | std::pair< super::iterator, bool > result = super::insert (*prefix, 0); |
| 100 | if (result.first != super::end ()) |
| 101 | { |
| 102 | if (result.second) |
| 103 | { |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 104 | Ptr<EntryImpl> newEntry = Create<EntryImpl> (prefix); |
Alexander Afanasyev | 30f60e3 | 2012-07-10 14:21:16 -0700 | [diff] [blame] | 105 | newEntry->SetTrie (result.first); |
| 106 | result.first->set_payload (newEntry); |
| 107 | } |
Alexander Afanasyev | 78057c3 | 2012-07-06 15:18:46 -0700 | [diff] [blame] | 108 | |
Alexander Afanasyev | 30f60e3 | 2012-07-10 14:21:16 -0700 | [diff] [blame] | 109 | super::modify (result.first, |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 110 | ll::bind (&Entry::AddOrUpdateRoutingMetric, ll::_1, face, metric)); |
Alexander Afanasyev | adcccf4 | 2012-11-26 23:55:34 -0800 | [diff] [blame] | 111 | |
| 112 | if (result.second) |
| 113 | { |
| 114 | // notify forwarding strategy about new FIB entry |
| 115 | NS_ASSERT (this->GetObject<ForwardingStrategy> () != 0); |
| 116 | this->GetObject<ForwardingStrategy> ()->DidAddFibEntry (result.first->payload ()); |
| 117 | } |
| 118 | |
Alexander Afanasyev | 30f60e3 | 2012-07-10 14:21:16 -0700 | [diff] [blame] | 119 | return result.first->payload (); |
| 120 | } |
| 121 | else |
| 122 | return 0; |
Alexander Afanasyev | 78057c3 | 2012-07-06 15:18:46 -0700 | [diff] [blame] | 123 | } |
| 124 | |
| 125 | void |
Alexander Afanasyev | cfdc14f | 2013-03-15 14:38:44 -0700 | [diff] [blame^] | 126 | FibImpl::Remove (const Ptr<const Name> &prefix) |
Alexander Afanasyev | 78057c3 | 2012-07-06 15:18:46 -0700 | [diff] [blame] | 127 | { |
| 128 | NS_LOG_FUNCTION (this->GetObject<Node> ()->GetId () << boost::cref(*prefix)); |
| 129 | |
Alexander Afanasyev | adcccf4 | 2012-11-26 23:55:34 -0800 | [diff] [blame] | 130 | super::iterator fibEntry = super::find_exact (*prefix); |
| 131 | if (fibEntry != super::end ()) |
| 132 | { |
| 133 | // notify forwarding strategy about soon be removed FIB entry |
| 134 | NS_ASSERT (this->GetObject<ForwardingStrategy> () != 0); |
| 135 | this->GetObject<ForwardingStrategy> ()->WillRemoveFibEntry (fibEntry->payload ()); |
| 136 | |
| 137 | super::erase (fibEntry); |
| 138 | } |
| 139 | // else do nothing |
Alexander Afanasyev | 78057c3 | 2012-07-06 15:18:46 -0700 | [diff] [blame] | 140 | } |
| 141 | |
Alexander Afanasyev | 44bb6ea | 2012-07-09 08:44:41 -0700 | [diff] [blame] | 142 | // void |
Alexander Afanasyev | cfdc14f | 2013-03-15 14:38:44 -0700 | [diff] [blame^] | 143 | // FibImpl::Invalidate (const Ptr<const Name> &prefix) |
Alexander Afanasyev | 44bb6ea | 2012-07-09 08:44:41 -0700 | [diff] [blame] | 144 | // { |
| 145 | // NS_LOG_FUNCTION (this->GetObject<Node> ()->GetId () << boost::cref(*prefix)); |
Alexander Afanasyev | 78057c3 | 2012-07-06 15:18:46 -0700 | [diff] [blame] | 146 | |
Alexander Afanasyev | 44bb6ea | 2012-07-09 08:44:41 -0700 | [diff] [blame] | 147 | // super::iterator foundItem, lastItem; |
| 148 | // bool reachLast; |
| 149 | // boost::tie (foundItem, reachLast, lastItem) = super::getTrie ().find (*prefix); |
Alexander Afanasyev | 78057c3 | 2012-07-06 15:18:46 -0700 | [diff] [blame] | 150 | |
Alexander Afanasyev | 44bb6ea | 2012-07-09 08:44:41 -0700 | [diff] [blame] | 151 | // if (!reachLast || lastItem->payload () == 0) |
| 152 | // return; // nothing to invalidate |
Alexander Afanasyev | 78057c3 | 2012-07-06 15:18:46 -0700 | [diff] [blame] | 153 | |
Alexander Afanasyev | 44bb6ea | 2012-07-09 08:44:41 -0700 | [diff] [blame] | 154 | // super::modify (lastItem, |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 155 | // ll::bind (&Entry::Invalidate, ll::_1)); |
Alexander Afanasyev | 44bb6ea | 2012-07-09 08:44:41 -0700 | [diff] [blame] | 156 | // } |
Alexander Afanasyev | 78057c3 | 2012-07-06 15:18:46 -0700 | [diff] [blame] | 157 | |
| 158 | void |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 159 | FibImpl::InvalidateAll () |
Alexander Afanasyev | 78057c3 | 2012-07-06 15:18:46 -0700 | [diff] [blame] | 160 | { |
Alexander Afanasyev | 44bb6ea | 2012-07-09 08:44:41 -0700 | [diff] [blame] | 161 | NS_LOG_FUNCTION (this->GetObject<Node> ()->GetId ()); |
Alexander Afanasyev | 78057c3 | 2012-07-06 15:18:46 -0700 | [diff] [blame] | 162 | |
Alexander Afanasyev | 44bb6ea | 2012-07-09 08:44:41 -0700 | [diff] [blame] | 163 | super::parent_trie::recursive_iterator item (super::getTrie ()); |
| 164 | super::parent_trie::recursive_iterator end (0); |
| 165 | for (; item != end; item++) |
| 166 | { |
| 167 | if (item->payload () == 0) continue; |
| 168 | |
| 169 | super::modify (&(*item), |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 170 | ll::bind (&Entry::Invalidate, ll::_1)); |
Alexander Afanasyev | 44bb6ea | 2012-07-09 08:44:41 -0700 | [diff] [blame] | 171 | } |
Alexander Afanasyev | 78057c3 | 2012-07-06 15:18:46 -0700 | [diff] [blame] | 172 | } |
| 173 | |
| 174 | void |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 175 | FibImpl::RemoveFace (super::parent_trie &item, Ptr<Face> face) |
Alexander Afanasyev | 78057c3 | 2012-07-06 15:18:46 -0700 | [diff] [blame] | 176 | { |
Alexander Afanasyev | 44bb6ea | 2012-07-09 08:44:41 -0700 | [diff] [blame] | 177 | if (item.payload () == 0) return; |
| 178 | NS_LOG_FUNCTION (this); |
Alexander Afanasyev | 78057c3 | 2012-07-06 15:18:46 -0700 | [diff] [blame] | 179 | |
Alexander Afanasyev | 44bb6ea | 2012-07-09 08:44:41 -0700 | [diff] [blame] | 180 | super::modify (&item, |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 181 | ll::bind (&Entry::RemoveFace, ll::_1, face)); |
Alexander Afanasyev | 78057c3 | 2012-07-06 15:18:46 -0700 | [diff] [blame] | 182 | } |
| 183 | |
| 184 | void |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 185 | FibImpl::RemoveFromAll (Ptr<Face> face) |
Alexander Afanasyev | 78057c3 | 2012-07-06 15:18:46 -0700 | [diff] [blame] | 186 | { |
Alexander Afanasyev | 44bb6ea | 2012-07-09 08:44:41 -0700 | [diff] [blame] | 187 | NS_LOG_FUNCTION (this); |
Alexander Afanasyev | 78057c3 | 2012-07-06 15:18:46 -0700 | [diff] [blame] | 188 | |
Alexander Afanasyev | 44bb6ea | 2012-07-09 08:44:41 -0700 | [diff] [blame] | 189 | std::for_each (super::parent_trie::recursive_iterator (super::getTrie ()), |
| 190 | super::parent_trie::recursive_iterator (0), |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 191 | ll::bind (&FibImpl::RemoveFace, |
Alexander Afanasyev | 44bb6ea | 2012-07-09 08:44:41 -0700 | [diff] [blame] | 192 | this, ll::_1, face)); |
| 193 | |
| 194 | super::parent_trie::recursive_iterator trieNode (super::getTrie ()); |
| 195 | super::parent_trie::recursive_iterator end (0); |
| 196 | for (; trieNode != end; trieNode++) |
| 197 | { |
| 198 | if (trieNode->payload () == 0) continue; |
| 199 | |
| 200 | if (trieNode->payload ()->m_faces.size () == 0) |
| 201 | { |
Alexander Afanasyev | adcccf4 | 2012-11-26 23:55:34 -0800 | [diff] [blame] | 202 | // notify forwarding strategy about soon be removed FIB entry |
| 203 | NS_ASSERT (this->GetObject<ForwardingStrategy> () != 0); |
| 204 | this->GetObject<ForwardingStrategy> ()->WillRemoveFibEntry (trieNode->payload ()); |
| 205 | |
Alexander Afanasyev | 44bb6ea | 2012-07-09 08:44:41 -0700 | [diff] [blame] | 206 | trieNode = super::parent_trie::recursive_iterator (trieNode->erase ()); |
| 207 | } |
| 208 | } |
Alexander Afanasyev | 78057c3 | 2012-07-06 15:18:46 -0700 | [diff] [blame] | 209 | } |
| 210 | |
| 211 | void |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 212 | FibImpl::Print (std::ostream &os) const |
Alexander Afanasyev | 78057c3 | 2012-07-06 15:18:46 -0700 | [diff] [blame] | 213 | { |
Alexander Afanasyev | 44bb6ea | 2012-07-09 08:44:41 -0700 | [diff] [blame] | 214 | // !!! unordered_set imposes "random" order of item in the same level !!! |
| 215 | super::parent_trie::const_recursive_iterator item (super::getTrie ()); |
| 216 | super::parent_trie::const_recursive_iterator end (0); |
| 217 | for (; item != end; item++) |
| 218 | { |
| 219 | if (item->payload () == 0) continue; |
| 220 | |
| 221 | os << item->payload ()->GetPrefix () << "\t" << *item->payload () << "\n"; |
| 222 | } |
Alexander Afanasyev | 78057c3 | 2012-07-06 15:18:46 -0700 | [diff] [blame] | 223 | } |
| 224 | |
Alexander Afanasyev | f1e013f | 2012-07-11 17:59:40 -0700 | [diff] [blame] | 225 | uint32_t |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 226 | FibImpl::GetSize () const |
Alexander Afanasyev | f1e013f | 2012-07-11 17:59:40 -0700 | [diff] [blame] | 227 | { |
| 228 | return super::getPolicy ().size (); |
| 229 | } |
| 230 | |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 231 | Ptr<const Entry> |
Alexander Afanasyev | ea9b3e6 | 2012-08-13 19:02:54 -0700 | [diff] [blame] | 232 | FibImpl::Begin () const |
Alexander Afanasyev | 95a4fa3 | 2012-07-09 15:23:59 -0700 | [diff] [blame] | 233 | { |
| 234 | super::parent_trie::const_recursive_iterator item (super::getTrie ()); |
| 235 | super::parent_trie::const_recursive_iterator end (0); |
| 236 | for (; item != end; item++) |
| 237 | { |
| 238 | if (item->payload () == 0) continue; |
| 239 | break; |
| 240 | } |
| 241 | |
| 242 | if (item == end) |
| 243 | return End (); |
| 244 | else |
| 245 | return item->payload (); |
| 246 | } |
| 247 | |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 248 | Ptr<const Entry> |
Alexander Afanasyev | ea9b3e6 | 2012-08-13 19:02:54 -0700 | [diff] [blame] | 249 | FibImpl::End () const |
Alexander Afanasyev | 95a4fa3 | 2012-07-09 15:23:59 -0700 | [diff] [blame] | 250 | { |
| 251 | return 0; |
| 252 | } |
| 253 | |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 254 | Ptr<const Entry> |
Alexander Afanasyev | ea9b3e6 | 2012-08-13 19:02:54 -0700 | [diff] [blame] | 255 | FibImpl::Next (Ptr<const Entry> from) const |
Alexander Afanasyev | 95a4fa3 | 2012-07-09 15:23:59 -0700 | [diff] [blame] | 256 | { |
| 257 | if (from == 0) return 0; |
| 258 | |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 259 | super::parent_trie::const_recursive_iterator item (*StaticCast<const EntryImpl> (from)->to_iterator ()); |
Alexander Afanasyev | 95a4fa3 | 2012-07-09 15:23:59 -0700 | [diff] [blame] | 260 | super::parent_trie::const_recursive_iterator end (0); |
| 261 | for (item++; item != end; item++) |
| 262 | { |
| 263 | if (item->payload () == 0) continue; |
| 264 | break; |
| 265 | } |
| 266 | |
| 267 | if (item == end) |
| 268 | return End (); |
| 269 | else |
| 270 | return item->payload (); |
| 271 | } |
| 272 | |
Alexander Afanasyev | ea9b3e6 | 2012-08-13 19:02:54 -0700 | [diff] [blame] | 273 | Ptr<Entry> |
| 274 | FibImpl::Begin () |
| 275 | { |
| 276 | super::parent_trie::recursive_iterator item (super::getTrie ()); |
| 277 | super::parent_trie::recursive_iterator end (0); |
| 278 | for (; item != end; item++) |
| 279 | { |
| 280 | if (item->payload () == 0) continue; |
| 281 | break; |
| 282 | } |
| 283 | |
| 284 | if (item == end) |
| 285 | return End (); |
| 286 | else |
| 287 | return item->payload (); |
| 288 | } |
| 289 | |
| 290 | Ptr<Entry> |
| 291 | FibImpl::End () |
| 292 | { |
| 293 | return 0; |
| 294 | } |
| 295 | |
| 296 | Ptr<Entry> |
| 297 | FibImpl::Next (Ptr<Entry> from) |
| 298 | { |
| 299 | if (from == 0) return 0; |
| 300 | |
| 301 | super::parent_trie::recursive_iterator item (*StaticCast<EntryImpl> (from)->to_iterator ()); |
| 302 | super::parent_trie::recursive_iterator end (0); |
| 303 | for (item++; item != end; item++) |
| 304 | { |
| 305 | if (item->payload () == 0) continue; |
| 306 | break; |
| 307 | } |
| 308 | |
| 309 | if (item == end) |
| 310 | return End (); |
| 311 | else |
| 312 | return item->payload (); |
| 313 | } |
| 314 | |
| 315 | |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 316 | } // namespace fib |
| 317 | } // namespace ndn |
Alexander Afanasyev | 78057c3 | 2012-07-06 15:18:46 -0700 | [diff] [blame] | 318 | } // namespace ns3 |