LEFT | RIGHT |
(no file at all) | |
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) 2008 INRIA | 3 * Copyright (c) 2008 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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 uint32_t rate, | 328 uint32_t rate, |
329 bool isShortPreamble, | 329 bool isShortPreamble, |
330 double signalDbm, | 330 double signalDbm, |
331 double noiseDbm) | 331 double noiseDbm) |
332 { | 332 { |
333 uint32_t dlt = file->GetDataLinkType (); | 333 uint32_t dlt = file->GetDataLinkType (); |
334 | 334 |
335 switch (dlt) | 335 switch (dlt) |
336 { | 336 { |
337 case PcapHelper::DLT_IEEE802_11: | 337 case PcapHelper::DLT_IEEE802_11: |
338 file->Write (Simulator::Now (), packet); | 338 { |
339 return; | 339 Ptr<Packet> p = packet->Copy (); |
| 340 RadiotapHeader header; |
| 341 p->RemoveHeader(header); |
| 342 file->Write (Simulator::Now (), p); |
| 343 return; |
| 344 } |
340 case PcapHelper::DLT_PRISM_HEADER: | 345 case PcapHelper::DLT_PRISM_HEADER: |
341 { | 346 { |
342 NS_FATAL_ERROR ("PcapSniffRxEvent(): DLT_PRISM_HEADER not implemented"); | 347 NS_FATAL_ERROR ("PcapSniffRxEvent(): DLT_PRISM_HEADER not implemented"); |
343 return; | 348 return; |
344 } | 349 } |
345 case PcapHelper::DLT_IEEE802_11_RADIO: | 350 case PcapHelper::DLT_IEEE802_11_RADIO: |
346 { | 351 { |
347 file->Write (Simulator::Now (), packet); | 352 file->Write (Simulator::Now (), packet); |
348 return; | 353 return; |
349 } | 354 } |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 oss.str (""); | 494 oss.str (""); |
490 oss << "/NodeList/" << nodeid << "/DeviceList/" << deviceid << "/$ns3::WifiNet
Device/Phy/State/RxOk"; | 495 oss << "/NodeList/" << nodeid << "/DeviceList/" << deviceid << "/$ns3::WifiNet
Device/Phy/State/RxOk"; |
491 Config::Connect (oss.str (), MakeBoundCallback (&AsciiPhyReceiveSinkWithContex
t, stream)); | 496 Config::Connect (oss.str (), MakeBoundCallback (&AsciiPhyReceiveSinkWithContex
t, stream)); |
492 | 497 |
493 oss.str (""); | 498 oss.str (""); |
494 oss << "/NodeList/" << nodeid << "/DeviceList/" << deviceid << "/$ns3::WifiNet
Device/Phy/State/Tx"; | 499 oss << "/NodeList/" << nodeid << "/DeviceList/" << deviceid << "/$ns3::WifiNet
Device/Phy/State/Tx"; |
495 Config::Connect (oss.str (), MakeBoundCallback (&AsciiPhyTransmitSinkWithConte
xt, stream)); | 500 Config::Connect (oss.str (), MakeBoundCallback (&AsciiPhyTransmitSinkWithConte
xt, stream)); |
496 } | 501 } |
497 | 502 |
498 } // namespace ns3 | 503 } // namespace ns3 |
LEFT | RIGHT |