Alexander Afanasyev | c74a602 | 2011-08-15 20:01:35 -0700 | [diff] [blame] | 1 | /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */ |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 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: Ilya Moiseenko <iliamo@cs.ucla.edu> |
| 19 | * Alexander Afanasyev <alexander.afanasyev@ucla.edu> |
| 20 | */ |
| 21 | |
| 22 | ///< #CCN_PR_SCOPE0 (0x20) local scope, |
| 23 | ///< #CCN_PR_SCOPE1 (0x40) this host, |
| 24 | ///< #CCN_PR_SCOPE2 (0x80) immediate neighborhood |
| 25 | |
Alexander Afanasyev | 4aac557 | 2012-08-09 10:49:55 -0700 | [diff] [blame] | 26 | #include "ndn-interest-header.h" |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 27 | |
Alexander Afanasyev | 45b92d4 | 2011-08-14 23:11:38 -0700 | [diff] [blame] | 28 | #include "ns3/log.h" |
Alexander Afanasyev | d9fecdd | 2012-06-08 16:22:24 -0700 | [diff] [blame] | 29 | #include "ns3/unused.h" |
Alexander Afanasyev | 663d63f | 2012-09-09 11:55:36 -0700 | [diff] [blame] | 30 | #include "ns3/packet.h" |
Alexander Afanasyev | 4aac557 | 2012-08-09 10:49:55 -0700 | [diff] [blame] | 31 | #include "../helper/ndn-encoding-helper.h" |
| 32 | #include "../helper/ndn-decoding-helper.h" |
Alexander Afanasyev | 45b92d4 | 2011-08-14 23:11:38 -0700 | [diff] [blame] | 33 | |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 34 | NS_LOG_COMPONENT_DEFINE ("ndn.InterestHeader"); |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 35 | |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 36 | namespace ns3 { |
| 37 | namespace ndn { |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 38 | |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 39 | NS_OBJECT_ENSURE_REGISTERED (InterestHeader); |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 40 | |
| 41 | TypeId |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 42 | InterestHeader::GetTypeId (void) |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 43 | { |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 44 | static TypeId tid = TypeId ("ns3::ndn::InterestHeader") |
Alexander Afanasyev | 4aac557 | 2012-08-09 10:49:55 -0700 | [diff] [blame] | 45 | .SetGroupName ("Ndn") |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 46 | .SetParent<Header> () |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 47 | .AddConstructor<InterestHeader> () |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 48 | ; |
| 49 | return tid; |
| 50 | } |
| 51 | |
| 52 | |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 53 | InterestHeader::InterestHeader () |
Alexander Afanasyev | 31cb469 | 2012-08-17 13:08:20 -0700 | [diff] [blame] | 54 | : m_name () |
| 55 | , m_minSuffixComponents (-1) |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 56 | , m_maxSuffixComponents (-1) |
Alexander Afanasyev | 31cb469 | 2012-08-17 13:08:20 -0700 | [diff] [blame] | 57 | , m_exclude () |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 58 | , m_childSelector (false) |
| 59 | , m_answerOriginKind (false) |
| 60 | , m_scope (-1) |
Alexander Afanasyev | 85a3bca | 2011-08-31 16:51:03 -0700 | [diff] [blame] | 61 | , m_interestLifetime (Seconds (0)) |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 62 | , m_nonce (0) |
Alexander Afanasyev | a46844b | 2011-11-21 19:13:26 -0800 | [diff] [blame] | 63 | , m_nackType (NORMAL_INTEREST) |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 64 | { |
| 65 | } |
| 66 | |
Alexander Afanasyev | 31cb469 | 2012-08-17 13:08:20 -0700 | [diff] [blame] | 67 | InterestHeader::InterestHeader (const InterestHeader &interest) |
| 68 | : m_name (Create<NameComponents> (interest.GetName ())) |
| 69 | , m_minSuffixComponents (interest.m_minSuffixComponents) |
| 70 | , m_maxSuffixComponents (interest.m_maxSuffixComponents) |
Alexander Afanasyev | 08b7d9e | 2012-08-23 10:53:46 -0700 | [diff] [blame] | 71 | , m_exclude (interest.IsEnabledExclude () ? Create<NameComponents> (interest.GetExclude ()) : 0) |
Alexander Afanasyev | 31cb469 | 2012-08-17 13:08:20 -0700 | [diff] [blame] | 72 | , m_childSelector (interest.m_childSelector) |
| 73 | , m_answerOriginKind (interest.m_answerOriginKind) |
| 74 | , m_scope (interest.m_scope) |
| 75 | , m_interestLifetime (interest.m_interestLifetime) |
| 76 | , m_nonce (interest.m_nonce) |
| 77 | , m_nackType (interest.m_nackType) |
| 78 | { |
| 79 | } |
| 80 | |
Alexander Afanasyev | 663d63f | 2012-09-09 11:55:36 -0700 | [diff] [blame] | 81 | Ptr<InterestHeader> |
| 82 | InterestHeader::GetInterest (Ptr<Packet> packet) |
| 83 | { |
| 84 | Ptr<InterestHeader> interest = Create<InterestHeader> (); |
| 85 | packet->RemoveHeader (*interest); |
| 86 | |
| 87 | return interest; |
| 88 | } |
| 89 | |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 90 | void |
Alexander Afanasyev | ec1e395 | 2012-08-20 13:48:15 -0700 | [diff] [blame] | 91 | InterestHeader::SetName (Ptr<NameComponents> name) |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 92 | { |
| 93 | m_name = name; |
| 94 | } |
| 95 | |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 96 | const NameComponents& |
| 97 | InterestHeader::GetName () const |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 98 | { |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 99 | if (m_name==0) throw InterestHeaderException(); |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 100 | return *m_name; |
| 101 | } |
| 102 | |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 103 | Ptr<const NameComponents> |
| 104 | InterestHeader::GetNamePtr () const |
Alexander Afanasyev | 30f60e3 | 2012-07-10 14:21:16 -0700 | [diff] [blame] | 105 | { |
| 106 | return m_name; |
| 107 | } |
| 108 | |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 109 | void |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 110 | InterestHeader::SetMinSuffixComponents (int32_t value) |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 111 | { |
| 112 | m_minSuffixComponents = value; |
| 113 | } |
| 114 | |
| 115 | int32_t |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 116 | InterestHeader::GetMinSuffixComponents () const |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 117 | { |
| 118 | return m_minSuffixComponents; |
| 119 | } |
| 120 | |
| 121 | void |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 122 | InterestHeader::SetMaxSuffixComponents (int32_t value) |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 123 | { |
| 124 | m_maxSuffixComponents = value; |
| 125 | } |
| 126 | |
| 127 | int32_t |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 128 | InterestHeader::GetMaxSuffixComponents () const |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 129 | { |
| 130 | return m_maxSuffixComponents; |
| 131 | } |
| 132 | |
| 133 | void |
Alexander Afanasyev | ec1e395 | 2012-08-20 13:48:15 -0700 | [diff] [blame] | 134 | InterestHeader::SetExclude (Ptr<NameComponents> exclude) |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 135 | { |
| 136 | m_exclude = exclude; |
| 137 | } |
| 138 | |
Alexander Afanasyev | 85a3bca | 2011-08-31 16:51:03 -0700 | [diff] [blame] | 139 | bool |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 140 | InterestHeader::IsEnabledExclude () const |
Alexander Afanasyev | 85a3bca | 2011-08-31 16:51:03 -0700 | [diff] [blame] | 141 | { |
| 142 | return m_exclude!=0; |
| 143 | } |
| 144 | |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 145 | const NameComponents& |
| 146 | InterestHeader::GetExclude () const |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 147 | { |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 148 | if (m_exclude==0) throw InterestHeaderException(); |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 149 | return *m_exclude; |
| 150 | } |
| 151 | |
| 152 | void |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 153 | InterestHeader::SetChildSelector (bool value) |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 154 | { |
Alexander Afanasyev | c74a602 | 2011-08-15 20:01:35 -0700 | [diff] [blame] | 155 | m_childSelector = value; |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 156 | } |
| 157 | |
| 158 | bool |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 159 | InterestHeader::IsEnabledChildSelector () const |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 160 | { |
| 161 | return m_childSelector; |
| 162 | } |
| 163 | |
| 164 | void |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 165 | InterestHeader::SetAnswerOriginKind (bool value) |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 166 | { |
Alexander Afanasyev | c74a602 | 2011-08-15 20:01:35 -0700 | [diff] [blame] | 167 | m_answerOriginKind = value; |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 168 | } |
| 169 | |
| 170 | bool |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 171 | InterestHeader::IsEnabledAnswerOriginKind () const |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 172 | { |
| 173 | return m_answerOriginKind; |
| 174 | } |
| 175 | |
| 176 | void |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 177 | InterestHeader::SetScope (int8_t scope) |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 178 | { |
| 179 | m_scope = scope; |
| 180 | } |
| 181 | |
| 182 | int8_t |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 183 | InterestHeader::GetScope () const |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 184 | { |
| 185 | return m_scope; |
| 186 | } |
| 187 | |
| 188 | void |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 189 | InterestHeader::SetInterestLifetime (Time lifetime) |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 190 | { |
| 191 | m_interestLifetime = lifetime; |
| 192 | } |
| 193 | |
Alexander Afanasyev | c74a602 | 2011-08-15 20:01:35 -0700 | [diff] [blame] | 194 | Time |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 195 | InterestHeader::GetInterestLifetime () const |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 196 | { |
| 197 | return m_interestLifetime; |
| 198 | } |
| 199 | |
| 200 | void |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 201 | InterestHeader::SetNonce (uint32_t nonce) |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 202 | { |
| 203 | m_nonce = nonce; |
| 204 | } |
| 205 | |
| 206 | uint32_t |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 207 | InterestHeader::GetNonce () const |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 208 | { |
| 209 | return m_nonce; |
| 210 | } |
Ilya Moiseenko | 75d9bf5 | 2011-10-28 13:18:32 -0700 | [diff] [blame] | 211 | |
| 212 | void |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 213 | InterestHeader::SetNack (uint32_t nackType) |
Ilya Moiseenko | 75d9bf5 | 2011-10-28 13:18:32 -0700 | [diff] [blame] | 214 | { |
Alexander Afanasyev | a46844b | 2011-11-21 19:13:26 -0800 | [diff] [blame] | 215 | m_nackType = nackType; |
Ilya Moiseenko | 75d9bf5 | 2011-10-28 13:18:32 -0700 | [diff] [blame] | 216 | } |
Alexander Afanasyev | a46844b | 2011-11-21 19:13:26 -0800 | [diff] [blame] | 217 | |
| 218 | uint32_t |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 219 | InterestHeader::GetNack () const |
Ilya Moiseenko | 75d9bf5 | 2011-10-28 13:18:32 -0700 | [diff] [blame] | 220 | { |
Alexander Afanasyev | a5bbe0e | 2011-11-22 17:28:39 -0800 | [diff] [blame] | 221 | return m_nackType; |
Ilya Moiseenko | 75d9bf5 | 2011-10-28 13:18:32 -0700 | [diff] [blame] | 222 | } |
Ilya Moiseenko | 75d9bf5 | 2011-10-28 13:18:32 -0700 | [diff] [blame] | 223 | |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 224 | uint32_t |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 225 | InterestHeader::GetSerializedSize (void) const |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 226 | { |
Alexander Afanasyev | 85a3bca | 2011-08-31 16:51:03 -0700 | [diff] [blame] | 227 | // unfortunately, we don't know exact header size in advance |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 228 | return EncodingHelper::GetSerializedSize (*this); |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 229 | } |
| 230 | |
| 231 | void |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 232 | InterestHeader::Serialize (Buffer::Iterator start) const |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 233 | { |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 234 | size_t size = EncodingHelper::Serialize (start, *this); |
Alexander Afanasyev | d9fecdd | 2012-06-08 16:22:24 -0700 | [diff] [blame] | 235 | NS_UNUSED (size); |
Alexander Afanasyev | 85a3bca | 2011-08-31 16:51:03 -0700 | [diff] [blame] | 236 | NS_LOG_INFO ("Serialize size = " << size); |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 237 | } |
| 238 | |
| 239 | uint32_t |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 240 | InterestHeader::Deserialize (Buffer::Iterator start) |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 241 | { |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 242 | return DecodingHelper::Deserialize (start, *this); // \todo Debugging is necessary |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 243 | } |
| 244 | |
| 245 | TypeId |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 246 | InterestHeader::GetInstanceTypeId (void) const |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 247 | { |
| 248 | return GetTypeId (); |
| 249 | } |
| 250 | |
| 251 | void |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 252 | InterestHeader::Print (std::ostream &os) const |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 253 | { |
Alexander Afanasyev | 7f3e49e | 2012-04-30 00:17:07 -0700 | [diff] [blame] | 254 | os << "I: " << GetName (); |
| 255 | |
| 256 | return; |
Alexander Afanasyev | 85a3bca | 2011-08-31 16:51:03 -0700 | [diff] [blame] | 257 | os << "<Interest>\n <Name>" << GetName () << "</Name>\n"; |
Alexander Afanasyev | a46844b | 2011-11-21 19:13:26 -0800 | [diff] [blame] | 258 | if (GetNack ()>0) |
| 259 | { |
| 260 | os << " <NACK>"; |
| 261 | switch (GetNack ()) |
| 262 | { |
| 263 | case NACK_LOOP: |
| 264 | os << "loop"; |
| 265 | break; |
| 266 | case NACK_CONGESTION: |
| 267 | os << "congestion"; |
| 268 | break; |
| 269 | default: |
| 270 | os << "unknown"; |
| 271 | break; |
| 272 | } |
| 273 | os << "</NACK>\n"; |
| 274 | } |
Alexander Afanasyev | 85a3bca | 2011-08-31 16:51:03 -0700 | [diff] [blame] | 275 | if (GetMinSuffixComponents () >= 0) |
| 276 | os << " <MinSuffixComponents>" << GetMinSuffixComponents () << "</MinSuffixComponents>\n"; |
| 277 | if (GetMaxSuffixComponents () >= 0) |
| 278 | os << " <MaxSuffixComponents>" << m_maxSuffixComponents << "</MaxSuffixComponents>\n"; |
| 279 | if (IsEnabledExclude () && GetExclude ().size()>0) |
| 280 | os << " <Exclude>" << GetExclude () << "</Exclude>\n"; |
| 281 | if (IsEnabledChildSelector ()) |
| 282 | os << " <ChildSelector />\n"; |
| 283 | if (IsEnabledAnswerOriginKind ()) |
| 284 | os << " <AnswerOriginKind />\n"; |
| 285 | if (GetScope () >= 0) |
| 286 | os << " <Scope>" << GetScope () << "</Scope>\n"; |
| 287 | if ( !GetInterestLifetime ().IsZero() ) |
| 288 | os << " <InterestLifetime>" << GetInterestLifetime () << "</InterestLifetime>\n"; |
| 289 | if (GetNonce ()>0) |
| 290 | os << " <Nonce>" << GetNonce () << "</Nonce>\n"; |
| 291 | os << "</Interest>"; |
Alexander Afanasyev | 08d984e | 2011-08-13 19:20:22 -0700 | [diff] [blame] | 292 | } |
| 293 | |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 294 | } // namespace ndn |
| 295 | } // namespace ns3 |
| 296 | |