OLD | NEW |
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2006, 2009 INRIA | 3 * Copyright (c) 2006, 2009 INRIA |
4 * Copyright (c) 2009 MIRKO BANCHI | 4 * Copyright (c) 2009 MIRKO BANCHI |
5 * | 5 * |
6 * This program is free software; you can redistribute it and/or modify | 6 * This program is free software; you can redistribute it and/or modify |
7 * it under the terms of the GNU General Public License version 2 as | 7 * it under the terms of the GNU General Public License version 2 as |
8 * published by the Free Software Foundation; | 8 * published by the Free Software Foundation; |
9 * | 9 * |
10 * This program is distributed in the hope that it will be useful, | 10 * This program is distributed in the hope that it will be useful, |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 m_ctrlSubtype = 15; | 250 m_ctrlSubtype = 15; |
251 break; | 251 break; |
252 } | 252 } |
253 m_ctrlToDs = 0; | 253 m_ctrlToDs = 0; |
254 m_ctrlFromDs = 0; | 254 m_ctrlFromDs = 0; |
255 } | 255 } |
256 | 256 |
257 void | 257 void |
258 WifiMacHeader::SetDuration (Time duration) | 258 WifiMacHeader::SetDuration (Time duration) |
259 { | 259 { |
260 int64_t duration_us = ceil (static_cast<double> (duration.GetNanoSeconds ()) /
1000); | 260 int64_t duration_us = static_cast<int64_t>(ceil (static_cast<double> (duration
.GetNanoSeconds ()) / 1000)); |
261 NS_ASSERT (duration_us >= 0 && duration_us <= 0x7fff); | 261 NS_ASSERT (duration_us >= 0 && duration_us <= 0x7fff); |
262 m_duration = static_cast<uint16_t> (duration_us); | 262 m_duration = static_cast<uint16_t> (duration_us); |
263 } | 263 } |
264 | 264 |
265 void WifiMacHeader::SetId (uint16_t id) | 265 void WifiMacHeader::SetId (uint16_t id) |
266 { | 266 { |
267 m_duration = id; | 267 m_duration = id; |
268 } | 268 } |
269 | 269 |
270 void WifiMacHeader::SetSequenceNumber (uint16_t seq) | 270 void WifiMacHeader::SetSequenceNumber (uint16_t seq) |
(...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1093 if (m_ctrlSubtype & 0x08) | 1093 if (m_ctrlSubtype & 0x08) |
1094 { | 1094 { |
1095 SetQosControl (i.ReadLsbtohU16 ()); | 1095 SetQosControl (i.ReadLsbtohU16 ()); |
1096 } | 1096 } |
1097 break; | 1097 break; |
1098 } | 1098 } |
1099 return i.GetDistanceFrom (start); | 1099 return i.GetDistanceFrom (start); |
1100 } | 1100 } |
1101 | 1101 |
1102 } //namespace ns3 | 1102 } //namespace ns3 |
OLD | NEW |