Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 1 | /** -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */ |
| 2 | /* |
| 3 | * Copyright (c) 2013, Regents of the University of California |
| 4 | * Alexander Afanasyev |
| 5 | * |
Alexander Afanasyev | a89bc10 | 2013-07-16 10:17:31 -0700 | [diff] [blame] | 6 | * GNU 3.0 license, See the LICENSE file for more information |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 7 | * |
| 8 | * Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu> |
| 9 | */ |
| 10 | |
| 11 | #include "ndnsim.h" |
| 12 | |
Alexander Afanasyev | faa01f9 | 2013-07-10 18:34:31 -0700 | [diff] [blame] | 13 | using namespace std; |
| 14 | |
| 15 | #include <ns3/header.h> |
| 16 | #include <ns3/packet.h> |
| 17 | #include <ns3/log.h> |
| 18 | |
Alexander Afanasyev | a89bc10 | 2013-07-16 10:17:31 -0700 | [diff] [blame] | 19 | #include "ndnsim/wire-ndnsim.h" |
| 20 | |
Alexander Afanasyev | faa01f9 | 2013-07-10 18:34:31 -0700 | [diff] [blame] | 21 | NS_LOG_COMPONENT_DEFINE ("ndn.wire.ndnSIM"); |
| 22 | |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 23 | NDN_NAMESPACE_BEGIN |
| 24 | |
| 25 | namespace wire { |
| 26 | namespace ndnSIM { |
| 27 | |
Alexander Afanasyev | faa01f9 | 2013-07-10 18:34:31 -0700 | [diff] [blame] | 28 | NS_OBJECT_ENSURE_REGISTERED (Interest); |
| 29 | NS_OBJECT_ENSURE_REGISTERED (Data); |
| 30 | |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 31 | /////////////////////////////////////////////////////////////////////////////////////////////////// |
| 32 | /////////////////////////////////////////////////////////////////////////////////////////////////// |
| 33 | /////////////////////////////////////////////////////////////////////////////////////////////////// |
| 34 | |
| 35 | Interest::Interest () |
| 36 | : m_interest (Create<ndn::Interest> ()) |
| 37 | { |
| 38 | } |
| 39 | |
| 40 | Interest::Interest (Ptr<ndn::Interest> interest) |
| 41 | : m_interest (interest) |
| 42 | { |
| 43 | } |
| 44 | |
| 45 | Ptr<ndn::Interest> |
| 46 | Interest::GetInterest () |
| 47 | { |
| 48 | return m_interest; |
| 49 | } |
| 50 | |
| 51 | |
| 52 | TypeId |
| 53 | Interest::GetTypeId (void) |
| 54 | { |
| 55 | static TypeId tid = TypeId ("ns3::ndn::Interest::ndnSIM") |
| 56 | .SetGroupName ("Ndn") |
Alexander Afanasyev | faa01f9 | 2013-07-10 18:34:31 -0700 | [diff] [blame] | 57 | .SetParent<Header> () |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 58 | .AddConstructor<Interest> () |
| 59 | ; |
| 60 | return tid; |
| 61 | } |
| 62 | |
| 63 | TypeId |
| 64 | Interest::GetInstanceTypeId (void) const |
| 65 | { |
| 66 | return GetTypeId (); |
| 67 | } |
| 68 | |
| 69 | Ptr<Packet> |
| 70 | Interest::ToWire (Ptr<const ndn::Interest> interest) |
| 71 | { |
| 72 | Ptr<const Packet> p = interest->GetWire (); |
| 73 | if (!p) |
| 74 | { |
Alexander Afanasyev | faa01f9 | 2013-07-10 18:34:31 -0700 | [diff] [blame] | 75 | Ptr<Packet> packet = Create<Packet> (*interest->GetPayload ()); |
| 76 | Interest wireEncoding (ConstCast<ndn::Interest> (interest)); |
| 77 | packet->AddHeader (wireEncoding); |
| 78 | interest->SetWire (packet); |
| 79 | |
| 80 | p = packet; |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 81 | } |
| 82 | |
| 83 | return p->Copy (); |
| 84 | } |
| 85 | |
| 86 | Ptr<ndn::Interest> |
| 87 | Interest::FromWire (Ptr<Packet> packet) |
| 88 | { |
| 89 | Ptr<ndn::Interest> interest = Create<ndn::Interest> (); |
Alexander Afanasyev | dfa6985 | 2013-12-05 15:50:44 -0800 | [diff] [blame^] | 90 | Ptr<Packet> wire = packet->Copy (); |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 91 | |
| 92 | Interest wireEncoding (interest); |
| 93 | packet->RemoveHeader (wireEncoding); |
| 94 | |
| 95 | interest->SetPayload (packet); |
Alexander Afanasyev | dfa6985 | 2013-12-05 15:50:44 -0800 | [diff] [blame^] | 96 | interest->SetWire (wire); |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 97 | |
| 98 | return interest; |
| 99 | } |
| 100 | |
| 101 | uint32_t |
| 102 | Interest::GetSerializedSize (void) const |
| 103 | { |
| 104 | size_t size = |
| 105 | 1/*version*/ + 1 /*type*/ + 2/*length*/ + |
| 106 | (4/*nonce*/ + 1/*scope*/ + 1/*nack type*/ + 2/*timestamp*/ + |
Alexander Afanasyev | a89bc10 | 2013-07-16 10:17:31 -0700 | [diff] [blame] | 107 | NdnSim::SerializedSizeName (m_interest->GetName ()) + |
Alexander Afanasyev | abb493a | 2013-07-19 15:31:33 -0700 | [diff] [blame] | 108 | |
| 109 | (2 + |
| 110 | (m_interest->GetExclude () == 0 ? 0 : (1 + NdnSim::SerializedSizeExclude (*m_interest->GetExclude ()))) |
| 111 | )/* selectors */ + |
| 112 | |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 113 | (2 + 0)/* options */); |
| 114 | |
| 115 | NS_LOG_INFO ("Serialize size = " << size); |
| 116 | return size; |
| 117 | } |
| 118 | |
| 119 | void |
| 120 | Interest::Serialize (Buffer::Iterator start) const |
| 121 | { |
| 122 | start.WriteU8 (0x80); // version |
| 123 | start.WriteU8 (0x00); // packet type |
| 124 | |
| 125 | start.WriteU16 (GetSerializedSize () - 4); |
| 126 | |
Alexander Afanasyev | faa01f9 | 2013-07-10 18:34:31 -0700 | [diff] [blame] | 127 | start.WriteU32 (m_interest->GetNonce ()); |
| 128 | start.WriteU8 (m_interest->GetScope ()); |
| 129 | start.WriteU8 (m_interest->GetNack ()); |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 130 | |
Alexander Afanasyev | faa01f9 | 2013-07-10 18:34:31 -0700 | [diff] [blame] | 131 | NS_ASSERT_MSG (0 <= m_interest->GetInterestLifetime ().ToInteger (Time::S) && m_interest->GetInterestLifetime ().ToInteger (Time::S) < 65535, |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 132 | "Incorrect InterestLifetime (should not be smaller than 0 and larger than 65535"); |
| 133 | |
| 134 | // rounding timestamp value to seconds |
Alexander Afanasyev | faa01f9 | 2013-07-10 18:34:31 -0700 | [diff] [blame] | 135 | start.WriteU16 (static_cast<uint16_t> (m_interest->GetInterestLifetime ().ToInteger (Time::S))); |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 136 | |
Alexander Afanasyev | a89bc10 | 2013-07-16 10:17:31 -0700 | [diff] [blame] | 137 | NdnSim::SerializeName (start, m_interest->GetName ()); |
Alexander Afanasyev | abb493a | 2013-07-19 15:31:33 -0700 | [diff] [blame] | 138 | |
| 139 | if (m_interest->GetExclude () == 0) |
| 140 | { |
| 141 | start.WriteU16 (0); // no selectors |
| 142 | } |
| 143 | else |
| 144 | { |
| 145 | start.WriteU16 (1 + NdnSim::SerializedSizeExclude (*m_interest->GetExclude ())); |
| 146 | start.WriteU8 (0x01); |
| 147 | NdnSim::SerializeExclude (start, *m_interest->GetExclude ()); |
| 148 | } |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 149 | |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 150 | start.WriteU16 (0); // no options |
| 151 | } |
| 152 | |
| 153 | uint32_t |
| 154 | Interest::Deserialize (Buffer::Iterator start) |
| 155 | { |
| 156 | Buffer::Iterator i = start; |
| 157 | |
| 158 | if (i.ReadU8 () != 0x80) |
| 159 | throw new InterestException (); |
| 160 | |
| 161 | if (i.ReadU8 () != 0x00) |
| 162 | throw new InterestException (); |
| 163 | |
| 164 | i.ReadU16 (); // length, don't need it right now |
| 165 | |
| 166 | m_interest->SetNonce (i.ReadU32 ()); |
| 167 | m_interest->SetScope (i.ReadU8 ()); |
Alexander Afanasyev | faa01f9 | 2013-07-10 18:34:31 -0700 | [diff] [blame] | 168 | m_interest->SetNack (i.ReadU8 ()); |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 169 | |
| 170 | m_interest->SetInterestLifetime (Seconds (i.ReadU16 ())); |
| 171 | |
Alexander Afanasyev | a89bc10 | 2013-07-16 10:17:31 -0700 | [diff] [blame] | 172 | m_interest->SetName (NdnSim::DeserializeName (i)); |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 173 | |
Alexander Afanasyev | abb493a | 2013-07-19 15:31:33 -0700 | [diff] [blame] | 174 | uint32_t selectorsLen = i.ReadU16 (); |
| 175 | if (selectorsLen > 0) |
| 176 | { |
| 177 | if (i.ReadU8 () != 0x01) // exclude filter only |
| 178 | throw InterestException (); |
| 179 | |
| 180 | m_interest->SetExclude (NdnSim::DeserializeExclude (i)); |
| 181 | } |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 182 | i.ReadU16 (); |
| 183 | |
| 184 | NS_ASSERT (GetSerializedSize () == (i.GetDistanceFrom (start))); |
| 185 | |
| 186 | return i.GetDistanceFrom (start); |
| 187 | } |
| 188 | |
Alexander Afanasyev | faa01f9 | 2013-07-10 18:34:31 -0700 | [diff] [blame] | 189 | void |
| 190 | Interest::Print (std::ostream &os) const |
| 191 | { |
| 192 | m_interest->Print (os); |
| 193 | } |
| 194 | |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 195 | /////////////////////////////////////////////////////////////////////////////////////////////////// |
| 196 | /////////////////////////////////////////////////////////////////////////////////////////////////// |
| 197 | /////////////////////////////////////////////////////////////////////////////////////////////////// |
| 198 | |
| 199 | |
| 200 | TypeId |
| 201 | Data::GetTypeId (void) |
| 202 | { |
| 203 | static TypeId tid = TypeId ("ns3::ndn::Data::ndnSIM") |
| 204 | .SetGroupName ("Ndn") |
| 205 | .SetParent<Header> () |
| 206 | .AddConstructor<Data> () |
| 207 | ; |
| 208 | return tid; |
| 209 | } |
| 210 | |
| 211 | TypeId |
| 212 | Data::GetInstanceTypeId (void) const |
| 213 | { |
| 214 | return GetTypeId (); |
| 215 | } |
| 216 | |
| 217 | |
| 218 | Data::Data () |
Alexander Afanasyev | 772f51b | 2013-08-01 18:53:25 -0700 | [diff] [blame] | 219 | : m_data (Create<ndn::Data> ()) |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 220 | { |
| 221 | } |
| 222 | |
Alexander Afanasyev | 772f51b | 2013-08-01 18:53:25 -0700 | [diff] [blame] | 223 | Data::Data (Ptr<ndn::Data> data) |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 224 | : m_data (data) |
| 225 | { |
| 226 | } |
| 227 | |
Alexander Afanasyev | 772f51b | 2013-08-01 18:53:25 -0700 | [diff] [blame] | 228 | Ptr<ndn::Data> |
Alexander Afanasyev | faa01f9 | 2013-07-10 18:34:31 -0700 | [diff] [blame] | 229 | Data::GetData () |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 230 | { |
| 231 | return m_data; |
| 232 | } |
| 233 | |
| 234 | Ptr<Packet> |
Alexander Afanasyev | 772f51b | 2013-08-01 18:53:25 -0700 | [diff] [blame] | 235 | Data::ToWire (Ptr<const ndn::Data> data) |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 236 | { |
| 237 | Ptr<const Packet> p = data->GetWire (); |
| 238 | if (!p) |
| 239 | { |
Alexander Afanasyev | faa01f9 | 2013-07-10 18:34:31 -0700 | [diff] [blame] | 240 | Ptr<Packet> packet = Create<Packet> (*data->GetPayload ()); |
Alexander Afanasyev | 772f51b | 2013-08-01 18:53:25 -0700 | [diff] [blame] | 241 | Data wireEncoding (ConstCast<ndn::Data> (data)); |
Alexander Afanasyev | faa01f9 | 2013-07-10 18:34:31 -0700 | [diff] [blame] | 242 | packet->AddHeader (wireEncoding); |
| 243 | data->SetWire (packet); |
| 244 | |
| 245 | p = packet; |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 246 | } |
| 247 | |
| 248 | return p->Copy (); |
| 249 | } |
| 250 | |
Alexander Afanasyev | 772f51b | 2013-08-01 18:53:25 -0700 | [diff] [blame] | 251 | Ptr<ndn::Data> |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 252 | Data::FromWire (Ptr<Packet> packet) |
| 253 | { |
Alexander Afanasyev | 772f51b | 2013-08-01 18:53:25 -0700 | [diff] [blame] | 254 | Ptr<ndn::Data> data = Create<ndn::Data> (); |
Alexander Afanasyev | dfa6985 | 2013-12-05 15:50:44 -0800 | [diff] [blame^] | 255 | Ptr<Packet> wire = packet->Copy (); |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 256 | |
| 257 | Data wireEncoding (data); |
| 258 | packet->RemoveHeader (wireEncoding); |
| 259 | |
| 260 | data->SetPayload (packet); |
Alexander Afanasyev | dfa6985 | 2013-12-05 15:50:44 -0800 | [diff] [blame^] | 261 | data->SetWire (wire); |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 262 | |
| 263 | return data; |
| 264 | } |
| 265 | |
| 266 | uint32_t |
| 267 | Data::GetSerializedSize () const |
| 268 | { |
| 269 | uint32_t size = 1 + 1 + 2 + |
Alexander Afanasyev | a89bc10 | 2013-07-16 10:17:31 -0700 | [diff] [blame] | 270 | ((2 + 2) + |
| 271 | NdnSim::SerializedSizeName (m_data->GetName ()) + |
| 272 | (2 + 2 + 4 + 2 + 2 + (2 + 0))); |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 273 | if (m_data->GetSignature () != 0) |
| 274 | size += 4; |
| 275 | |
| 276 | NS_LOG_INFO ("Serialize size = " << size); |
| 277 | return size; |
| 278 | } |
| 279 | |
| 280 | void |
| 281 | Data::Serialize (Buffer::Iterator start) const |
| 282 | { |
| 283 | start.WriteU8 (0x80); // version |
| 284 | start.WriteU8 (0x01); // packet type |
| 285 | start.WriteU16 (GetSerializedSize () - 4); // length |
| 286 | |
| 287 | if (m_data->GetSignature () != 0) |
| 288 | { |
| 289 | start.WriteU16 (6); // signature length |
| 290 | start.WriteU16 (0xFF00); // "fake" simulator signature |
| 291 | start.WriteU32 (m_data->GetSignature ()); |
| 292 | } |
| 293 | else |
| 294 | { |
| 295 | start.WriteU16 (2); // signature length |
| 296 | start.WriteU16 (0); // empty signature |
| 297 | } |
| 298 | |
| 299 | // name |
Alexander Afanasyev | a89bc10 | 2013-07-16 10:17:31 -0700 | [diff] [blame] | 300 | NdnSim::SerializeName (start, m_data->GetName ()); |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 301 | |
| 302 | // content |
| 303 | // for now assume that contentdata length is zero |
| 304 | start.WriteU16 (2 + 4 + 2 + 2 + (2 + 0)); |
| 305 | start.WriteU16 (4 + 2 + 2 + (2 + 0)); |
Alexander Afanasyev | faa01f9 | 2013-07-10 18:34:31 -0700 | [diff] [blame] | 306 | start.WriteU32 (static_cast<uint32_t> (m_data->GetTimestamp ().ToInteger (Time::S))); |
| 307 | start.WriteU16 (static_cast<uint16_t> (m_data->GetFreshness ().ToInteger (Time::S))); |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 308 | start.WriteU16 (0); // reserved |
| 309 | start.WriteU16 (0); // Length (ContentInfoOptions) |
| 310 | |
| 311 | // that's it folks |
| 312 | } |
| 313 | |
| 314 | uint32_t |
| 315 | Data::Deserialize (Buffer::Iterator start) |
| 316 | { |
| 317 | Buffer::Iterator i = start; |
| 318 | |
| 319 | if (i.ReadU8 () != 0x80) |
Alexander Afanasyev | 772f51b | 2013-08-01 18:53:25 -0700 | [diff] [blame] | 320 | throw new DataException (); |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 321 | |
| 322 | if (i.ReadU8 () != 0x01) |
Alexander Afanasyev | 772f51b | 2013-08-01 18:53:25 -0700 | [diff] [blame] | 323 | throw new DataException (); |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 324 | |
| 325 | i.ReadU16 (); // length |
| 326 | |
| 327 | uint32_t signatureLength = i.ReadU16 (); |
| 328 | if (signatureLength == 6) |
| 329 | { |
| 330 | if (i.ReadU16 () != 0xFF00) // signature type |
Alexander Afanasyev | 772f51b | 2013-08-01 18:53:25 -0700 | [diff] [blame] | 331 | throw new DataException (); |
Alexander Afanasyev | faa01f9 | 2013-07-10 18:34:31 -0700 | [diff] [blame] | 332 | m_data->SetSignature (i.ReadU32 ()); |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 333 | } |
| 334 | else if (signatureLength == 2) |
| 335 | { |
| 336 | if (i.ReadU16 () != 0) // signature type |
Alexander Afanasyev | 772f51b | 2013-08-01 18:53:25 -0700 | [diff] [blame] | 337 | throw new DataException (); |
Alexander Afanasyev | faa01f9 | 2013-07-10 18:34:31 -0700 | [diff] [blame] | 338 | m_data->SetSignature (0); |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 339 | } |
| 340 | else |
Alexander Afanasyev | 772f51b | 2013-08-01 18:53:25 -0700 | [diff] [blame] | 341 | throw new DataException (); |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 342 | |
Alexander Afanasyev | a89bc10 | 2013-07-16 10:17:31 -0700 | [diff] [blame] | 343 | m_data->SetName (NdnSim::DeserializeName (i)); |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 344 | |
| 345 | if (i.ReadU16 () != (2 + 4 + 2 + 2 + (2 + 0))) // content length |
Alexander Afanasyev | 772f51b | 2013-08-01 18:53:25 -0700 | [diff] [blame] | 346 | throw new DataException (); |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 347 | |
| 348 | if (i.ReadU16 () != (4 + 2 + 2 + (2 + 0))) // Length (content Info) |
Alexander Afanasyev | 772f51b | 2013-08-01 18:53:25 -0700 | [diff] [blame] | 349 | throw new DataException (); |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 350 | |
| 351 | m_data->SetTimestamp (Seconds (i.ReadU32 ())); |
| 352 | m_data->SetFreshness (Seconds (i.ReadU16 ())); |
| 353 | |
| 354 | if (i.ReadU16 () != 0) // Reserved |
Alexander Afanasyev | 772f51b | 2013-08-01 18:53:25 -0700 | [diff] [blame] | 355 | throw new DataException (); |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 356 | if (i.ReadU16 () != 0) // Length (ContentInfoOptions) |
Alexander Afanasyev | 772f51b | 2013-08-01 18:53:25 -0700 | [diff] [blame] | 357 | throw new DataException (); |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 358 | |
| 359 | NS_ASSERT_MSG (i.GetDistanceFrom (start) == GetSerializedSize (), |
Alexander Afanasyev | 772f51b | 2013-08-01 18:53:25 -0700 | [diff] [blame] | 360 | "Something wrong with Data::Deserialize"); |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 361 | |
| 362 | return i.GetDistanceFrom (start); |
| 363 | } |
| 364 | |
Alexander Afanasyev | faa01f9 | 2013-07-10 18:34:31 -0700 | [diff] [blame] | 365 | void |
| 366 | Data::Print (std::ostream &os) const |
| 367 | { |
| 368 | m_data->Print (os); |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 369 | } |
Alexander Afanasyev | faa01f9 | 2013-07-10 18:34:31 -0700 | [diff] [blame] | 370 | |
| 371 | } // ndnSIM |
| 372 | } // wire |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 373 | |
| 374 | NDN_NAMESPACE_END |