LEFT | RIGHT |
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) 2005 INRIA | 3 * Copyright (c) 2005 INRIA |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 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 | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 return 0; | 236 return 0; |
237 } | 237 } |
238 else | 238 else |
239 { | 239 { |
240 return packet; | 240 return packet; |
241 } | 241 } |
242 } | 242 } |
243 } | 243 } |
244 | 244 |
245 void | 245 void |
246 MacRxMiddle::Receive (Ptr<Packet> packet, const WifiMacHeader *hdr, RadiotapHead
er radiotaphdr) | 246 MacRxMiddle::Receive (Ptr<Packet> packet, const WifiMacHeader *hdr, const Radiot
apHeader *radiotaphdr) |
247 { | 247 { |
248 NS_LOG_FUNCTION (packet << hdr); | 248 NS_LOG_FUNCTION (packet << hdr); |
249 NS_ASSERT (hdr->IsData () || hdr->IsMgt ()); | 249 NS_ASSERT (hdr->IsData () || hdr->IsMgt ()); |
250 OriginatorRxStatus *originator = Lookup (hdr); | 250 OriginatorRxStatus *originator = Lookup (hdr); |
251 /** | 251 /** |
252 * The check below is really uneeded because it can fail in a lot of | 252 * The check below is really uneeded because it can fail in a lot of |
253 * normal cases. Specifically, it is possible for sequence numbers to | 253 * normal cases. Specifically, it is possible for sequence numbers to |
254 * loop back to zero once they reach 0xfff0 and to go up to 0xf7f0 in | 254 * loop back to zero once they reach 0xfff0 and to go up to 0xf7f0 in |
255 * which case the check below will report the two sequence numbers to | 255 * which case the check below will report the two sequence numbers to |
256 * not have the correct order relationship. | 256 * not have the correct order relationship. |
(...skipping 22 matching lines...) Expand all Loading... |
279 ", seq=" << hdr->GetSequenceNumber () << | 279 ", seq=" << hdr->GetSequenceNumber () << |
280 ", frag=" << hdr->GetFragmentNumber ()); | 280 ", frag=" << hdr->GetFragmentNumber ()); |
281 if (!hdr->GetAddr1 ().IsGroup ()) | 281 if (!hdr->GetAddr1 ().IsGroup ()) |
282 { | 282 { |
283 originator->SetSequenceControl (hdr->GetSequenceControl ()); | 283 originator->SetSequenceControl (hdr->GetSequenceControl ()); |
284 } | 284 } |
285 m_callback (agregate, hdr, radiotaphdr); | 285 m_callback (agregate, hdr, radiotaphdr); |
286 } | 286 } |
287 | 287 |
288 } // namespace ns3 | 288 } // namespace ns3 |
LEFT | RIGHT |