View | Details | Raw Unified | Return to bug 2444
Collapse All | Expand All

(-)a/src/network/helper/trace-helper.cc (-1 / +1 lines)
 Lines 49-55    Link Here 
49
PcapHelper::CreateFile (
49
PcapHelper::CreateFile (
50
  std::string filename, 
50
  std::string filename, 
51
  std::ios::openmode filemode,
51
  std::ios::openmode filemode,
52
  uint32_t    dataLinkType, 
52
  DataLinkType dataLinkType,
53
  uint32_t    snapLen, 
53
  uint32_t    snapLen, 
54
  int32_t     tzCorrection)
54
  int32_t     tzCorrection)
55
{
55
{
(-)a/src/network/helper/trace-helper.h (-9 / +15 lines)
 Lines 38-50    Link Here 
38
class PcapHelper
38
class PcapHelper
39
{
39
{
40
public:
40
public:
41
  //
41
  /**
42
  // These are the data link types that will be written to the pcap file.  We
42
   * This enumeration holds the data link types that will be written to the pcap file.
43
  // don't include pcap-bpf.h to avoid an explicit dependency on the real pcap
43
   *
44
  // and we don't make an enumeration of all of the values to make it easy to
44
   * We don't include pcap-bpf.h to avoid an explicit dependency on the real pcap
45
  // pass new values in.
45
   * and we don't make an enumeration of all of the values to make it easy to
46
  //
46
   * pass new values in.
47
  enum {
47
   *
48
   * For a list of Data Link Types see http://www.tcpdump.org/linktypes.html
49
   */
50
  enum DataLinkType {
48
    DLT_NULL = 0,
51
    DLT_NULL = 0,
49
    DLT_EN10MB = 1,
52
    DLT_EN10MB = 1,
50
    DLT_PPP = 9,
53
    DLT_PPP = 9,
 Lines 101-108    Link Here 
101
   * @param tzCorrection time zone correction to be applied to timestamps of packets
104
   * @param tzCorrection time zone correction to be applied to timestamps of packets
102
   * @returns a smart pointer to the Pcap file
105
   * @returns a smart pointer to the Pcap file
103
   */
106
   */
104
  Ptr<PcapFileWrapper> CreateFile (std::string filename, std::ios::openmode filemode,
107
  Ptr<PcapFileWrapper> CreateFile (std::string filename,
105
                                   uint32_t dataLinkType,  uint32_t snapLen = std::numeric_limits<uint32_t>::max (), int32_t tzCorrection = 0);
108
                                   std::ios::openmode filemode,
109
                                   DataLinkType dataLinkType,
110
                                   uint32_t snapLen = std::numeric_limits<uint32_t>::max (),
111
                                   int32_t tzCorrection = 0);
106
  /**
112
  /**
107
   * @brief Hook a trace source to the default trace sink
113
   * @brief Hook a trace source to the default trace sink
108
   * 
114
   * 
(-)a/src/network/utils/pcap-file-wrapper.h (-1 / +1 lines)
 Lines 105-111    Link Here 
105
   * \warning Calling this method on an existing file will result in the loss
105
   * \warning Calling this method on an existing file will result in the loss
106
   * any existing data.
106
   * any existing data.
107
   */
107
   */
108
  void Init (uint32_t dataLinkType, 
108
  void Init (uint32_t dataLinkType,
109
             uint32_t snapLen = std::numeric_limits<uint32_t>::max (), 
109
             uint32_t snapLen = std::numeric_limits<uint32_t>::max (), 
110
             int32_t tzCorrection = PcapFile::ZONE_DEFAULT);
110
             int32_t tzCorrection = PcapFile::ZONE_DEFAULT);
111
111
(-)a/src/network/utils/pcap-file.h (-1 / +1 lines)
 Lines 116-122    Link Here 
116
   * \warning Calling this method on an existing file will result in the loss
116
   * \warning Calling this method on an existing file will result in the loss
117
   * any existing data.
117
   * any existing data.
118
   */
118
   */
119
  void Init (uint32_t dataLinkType, 
119
  void Init (uint32_t dataLinkType,
120
             uint32_t snapLen = SNAPLEN_DEFAULT, 
120
             uint32_t snapLen = SNAPLEN_DEFAULT, 
121
             int32_t timeZoneCorrection = ZONE_DEFAULT,
121
             int32_t timeZoneCorrection = ZONE_DEFAULT,
122
             bool swapMode = false,
122
             bool swapMode = false,
(-)a/src/wifi/helper/yans-wifi-helper.cc (-1 / +1 lines)
 Lines 656-662    Link Here 
656
    }
656
    }
657
}
657
}
658
658
659
uint32_t
659
PcapHelper::DataLinkType
660
YansWifiPhyHelper::GetPcapDataLinkType (void) const
660
YansWifiPhyHelper::GetPcapDataLinkType (void) const
661
{
661
{
662
  return m_pcapDlt;
662
  return m_pcapDlt;
(-)a/src/wifi/helper/yans-wifi-helper.h (-2 / +2 lines)
 Lines 253-259    Link Here 
253
   *
253
   *
254
   * @returns The data link type of the pcap file (and packets) to be used
254
   * @returns The data link type of the pcap file (and packets) to be used
255
   */
255
   */
256
  uint32_t GetPcapDataLinkType (void) const;
256
  PcapHelper::DataLinkType GetPcapDataLinkType (void) const;
257
257
258
private:
258
private:
259
  /**
259
  /**
 Lines 300-306    Link Here 
300
  ObjectFactory m_phy;
300
  ObjectFactory m_phy;
301
  ObjectFactory m_errorRateModel;
301
  ObjectFactory m_errorRateModel;
302
  Ptr<YansWifiChannel> m_channel;
302
  Ptr<YansWifiChannel> m_channel;
303
  uint32_t m_pcapDlt;
303
  PcapHelper::DataLinkType m_pcapDlt;
304
};
304
};
305
305
306
} //namespace ns3
306
} //namespace ns3

Return to bug 2444