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

(-)i/src/point-to-point/helper/point-to-point-helper.h (-5 / +11 lines)
 Lines 42-48   class Node; Link Here 
42
 * PcapUserHelperForDevice and AsciiTraceUserHelperForDevice are
42
 * PcapUserHelperForDevice and AsciiTraceUserHelperForDevice are
43
 * "mixins".
43
 * "mixins".
44
 */
44
 */
45
class PointToPointHelper : public PcapHelperForDevice, public AsciiTraceHelperForDevice
45
class PointToPointHelper : public PcapHelperForDevice,
46
	                   public AsciiTraceHelperForDevice
46
{
47
{
47
public:
48
public:
48
  /**
49
  /**
 Lines 102-107   public: Link Here 
102
103
103
  /**
104
  /**
104
   * \param c a set of nodes
105
   * \param c a set of nodes
106
   * \return a NetDeviceContainer for nodes
105
   *
107
   *
106
   * This method creates a ns3::PointToPointChannel with the
108
   * This method creates a ns3::PointToPointChannel with the
107
   * attributes configured by PointToPointHelper::SetChannelAttribute,
109
   * attributes configured by PointToPointHelper::SetChannelAttribute,
 Lines 115-120   public: Link Here 
115
  /**
117
  /**
116
   * \param a first node
118
   * \param a first node
117
   * \param b second node
119
   * \param b second node
120
   * \return a NetDeviceContainer for nodes
118
   *
121
   *
119
   * Saves you from having to construct a temporary NodeContainer. 
122
   * Saves you from having to construct a temporary NodeContainer. 
120
   * Also, if MPI is enabled, for distributed simulations, 
123
   * Also, if MPI is enabled, for distributed simulations, 
 Lines 125-130   public: Link Here 
125
  /**
128
  /**
126
   * \param a first node
129
   * \param a first node
127
   * \param bName name of second node
130
   * \param bName name of second node
131
   * \return a NetDeviceContainer for nodes
128
   *
132
   *
129
   * Saves you from having to construct a temporary NodeContainer.
133
   * Saves you from having to construct a temporary NodeContainer.
130
   */
134
   */
 Lines 133-138   public: Link Here 
133
  /**
137
  /**
134
   * \param aName Name of first node
138
   * \param aName Name of first node
135
   * \param b second node
139
   * \param b second node
140
   * \return a NetDeviceContainer for nodes
136
   *
141
   *
137
   * Saves you from having to construct a temporary NodeContainer.
142
   * Saves you from having to construct a temporary NodeContainer.
138
   */
143
   */
 Lines 141-146   public: Link Here 
141
  /**
146
  /**
142
   * \param aNode Name of first node
147
   * \param aNode Name of first node
143
   * \param bNode Name of second node
148
   * \param bNode Name of second node
149
   * \return a NetDeviceContainer for nodes
144
   *
150
   *
145
   * Saves you from having to construct a temporary NodeContainer.
151
   * Saves you from having to construct a temporary NodeContainer.
146
   */
152
   */
 Lines 178-187   private: Link Here 
178
    Ptr<NetDevice> nd,
184
    Ptr<NetDevice> nd,
179
    bool explicitFilename);
185
    bool explicitFilename);
180
186
181
  ObjectFactory m_queueFactory;
187
  ObjectFactory m_queueFactory;         //!< Queue Factory
182
  ObjectFactory m_channelFactory;
188
  ObjectFactory m_channelFactory;       //!< Channel Factory
183
  ObjectFactory m_remoteChannelFactory;
189
  ObjectFactory m_remoteChannelFactory; //!< Remote Channel Factory
184
  ObjectFactory m_deviceFactory;
190
  ObjectFactory m_deviceFactory;        //!< Device Factory
185
};
191
};
186
192
187
} // namespace ns3
193
} // namespace ns3
(-)i/src/point-to-point/model/point-to-point-channel.h (-23 / +43 lines)
 Lines 43-59   class Packet; Link Here 
43
 * There are two "wires" in the channel.  The first device connected gets the
43
 * There are two "wires" in the channel.  The first device connected gets the
44
 * [0] wire to transmit on.  The second device gets the [1] wire.  There is a
44
 * [0] wire to transmit on.  The second device gets the [1] wire.  There is a
45
 * state (IDLE, TRANSMITTING) associated with each wire.
45
 * state (IDLE, TRANSMITTING) associated with each wire.
46
 *
47
 * \see Attach
48
 * \see TransmitStart
46
 */
49
 */
47
class PointToPointChannel : public Channel 
50
class PointToPointChannel : public Channel
48
{
51
{
49
public:
52
public:
53
  /**
54
   * \brief Get the TypeId
55
   *
56
   * \return The TypeId for this class
57
   */
50
  static TypeId GetTypeId (void);
58
  static TypeId GetTypeId (void);
51
59
52
  /**
60
  /**
53
   * \brief Create a PointToPointChannel
61
   * \brief Create a PointToPointChannel
54
   *
62
   *
55
   * By default, you get a channel that
63
   * By default, you get a channel that has an "infitely" fast 
56
   * has zero transmission delay.
64
   * transmission speed and zero delay.
57
   */
65
   */
58
  PointToPointChannel ();
66
  PointToPointChannel ();
59
67
 Lines 78-91   public: Link Here 
78
   */
86
   */
79
  virtual uint32_t GetNDevices (void) const;
87
  virtual uint32_t GetNDevices (void) const;
80
88
81
  /*
89
  /**
82
   * \brief Get PointToPointNetDevice corresponding to index i on this channel
90
   * \brief Get PointToPointNetDevice corresponding to index i on this channel
83
   * \param i Index number of the device requested
91
   * \param i Index number of the device requested
84
   * \returns Ptr to PointToPointNetDevice requested
92
   * \returns Ptr to PointToPointNetDevice requested
85
   */
93
   */
86
  Ptr<PointToPointNetDevice> GetPointToPointDevice (uint32_t i) const;
94
  Ptr<PointToPointNetDevice> GetPointToPointDevice (uint32_t i) const;
87
95
88
  /*
96
  /**
89
   * \brief Get NetDevice corresponding to index i on this channel
97
   * \brief Get NetDevice corresponding to index i on this channel
90
   * \param i Index number of the device requested
98
   * \param i Index number of the device requested
91
   * \returns Ptr to NetDevice requested
99
   * \returns Ptr to NetDevice requested
 Lines 93-111   public: Link Here 
93
  virtual Ptr<NetDevice> GetDevice (uint32_t i) const;
101
  virtual Ptr<NetDevice> GetDevice (uint32_t i) const;
94
102
95
protected:
103
protected:
96
  /*
104
  /**
97
   * \brief Get the delay associated with this channel
105
   * \brief Get the delay associated with this channel
98
   * \returns Time delay
106
   * \returns Time delay
99
   */
107
   */
100
  Time GetDelay (void) const;
108
  Time GetDelay (void) const;
101
109
102
  /*
110
  /**
103
   * \brief Check to make sure the link is initialized
111
   * \brief Check to make sure the link is initialized
104
   * \returns true if initialized, asserts otherwise
112
   * \returns true if initialized, asserts otherwise
105
   */
113
   */
106
  bool IsInitialized (void) const;
114
  bool IsInitialized (void) const;
107
115
108
  /*
116
  /**
109
   * \brief Get the net-device source 
117
   * \brief Get the net-device source 
110
   * \param i the link requested
118
   * \param i the link requested
111
   * \returns Ptr to PointToPointNetDevice source for the 
119
   * \returns Ptr to PointToPointNetDevice source for the 
 Lines 113-119   protected: Link Here 
113
   */
121
   */
114
  Ptr<PointToPointNetDevice> GetSource (uint32_t i) const;
122
  Ptr<PointToPointNetDevice> GetSource (uint32_t i) const;
115
123
116
  /*
124
  /**
117
   * \brief Get the net-device destination
125
   * \brief Get the net-device destination
118
   * \param i the link requested
126
   * \param i the link requested
119
   * \returns Ptr to PointToPointNetDevice destination for 
127
   * \returns Ptr to PointToPointNetDevice destination for 
 Lines 122-132   protected: Link Here 
122
  Ptr<PointToPointNetDevice> GetDestination (uint32_t i) const;
130
  Ptr<PointToPointNetDevice> GetDestination (uint32_t i) const;
123
131
124
private:
132
private:
125
  // Each point to point link has exactly two net devices
133
  static const int N_DEVICES = 2; //!< Each point to point link has
126
  static const int N_DEVICES = 2;
134
                                  //   exactly two net devices
127
135
128
  Time          m_delay;
136
  Time          m_delay;    //!< Propagation delay
129
  int32_t       m_nDevices;
137
  int32_t       m_nDevices; //!< Devices of this channel
130
138
131
  /**
139
  /**
132
   * The trace source for the packet transmission animation events that the 
140
   * The trace source for the packet transmission animation events that the 
 Lines 135-141   private: Link Here 
135
   * net device, receiving net device, transmission time and 
143
   * net device, receiving net device, transmission time and 
136
   * packet receipt time.
144
   * packet receipt time.
137
   *
145
   *
138
   * @see class CallBackTraceSource
146
   * \see class CallBackTraceSource
139
   */
147
   */
140
  TracedCallback<Ptr<const Packet>, // Packet being transmitted
148
  TracedCallback<Ptr<const Packet>, // Packet being transmitted
141
                 Ptr<NetDevice>,    // Transmitting NetDevice
149
                 Ptr<NetDevice>,    // Transmitting NetDevice
 Lines 144-167   private: Link Here 
144
                 Time               // Last bit receive time (relative to now)
152
                 Time               // Last bit receive time (relative to now)
145
                 > m_txrxPointToPoint;
153
                 > m_txrxPointToPoint;
146
154
155
  /** \brief Wire states
156
   *
157
   */
147
  enum WireState
158
  enum WireState
148
  {
159
  {
149
    INITIALIZING,
160
    INITIALIZING, //!< Initializing state
150
    IDLE,
161
    IDLE,         //!< Idle state (no transmission from NetDevice)
151
    TRANSMITTING,
162
    TRANSMITTING, //!< Transmitting state (data being transmitted from
152
    PROPAGATING
163
                  //   NetDevice
164
    PROPAGATING   //!< Propagating state (data is being propagated in the
165
                  //   channel
153
  };
166
  };
154
167
168
  /**
169
   * \brief Wire model for the PointToPointChannel
170
   */
155
  class Link
171
  class Link
156
  {
172
  {
157
public:
173
    public:
174
    /** \brief Create the link, it will be in INITIALIZING state
175
     *
176
     */
158
    Link() : m_state (INITIALIZING), m_src (0), m_dst (0) {}
177
    Link() : m_state (INITIALIZING), m_src (0), m_dst (0) {}
159
    WireState                  m_state;
178
160
    Ptr<PointToPointNetDevice> m_src;
179
    WireState                  m_state; //!< State of the link
161
    Ptr<PointToPointNetDevice> m_dst;
180
    Ptr<PointToPointNetDevice> m_src;   //!< First NetDevice
181
    Ptr<PointToPointNetDevice> m_dst;   //!< Second NetDevice
162
  };
182
  };
163
183
164
  Link    m_link[N_DEVICES];
184
  Link    m_link[N_DEVICES]; //!< Link model
165
};
185
};
166
186
167
} // namespace ns3
187
} // namespace ns3
(-)i/src/point-to-point/model/point-to-point-net-device.h (-35 / +82 lines)
 Lines 39-45   class ErrorModel; Link Here 
39
39
40
/**
40
/**
41
 * \defgroup point-to-point Point-To-Point Network Device
41
 * \defgroup point-to-point Point-To-Point Network Device
42
 * This section documents the API of the ns-3 point-to-point module. For a generic functional description, please refer to the ns-3 manual.
42
 * This section documents the API of the ns-3 point-to-point module. For a
43
 * functional description, please refer to the ns-3 manual here:
44
 * http://www.nsnam.org/docs/models/html/point-to-point.html
45
 *
46
 * Be sure to read the manual BEFORE going down to the API.
43
 */
47
 */
44
48
45
/**
49
/**
 Lines 54-63   class ErrorModel; Link Here 
54
 * Key parameters or objects that can be specified for this device 
58
 * Key parameters or objects that can be specified for this device 
55
 * include a queue, data rate, and interframe transmission gap (the 
59
 * include a queue, data rate, and interframe transmission gap (the 
56
 * propagation delay is set in the PointToPointChannel).
60
 * propagation delay is set in the PointToPointChannel).
61
 *
62
 * \see SetDataRate
63
 * \see SetInterframeGap
64
 * \see SetReceiveErrorModel
65
 *
57
 */
66
 */
58
class PointToPointNetDevice : public NetDevice
67
class PointToPointNetDevice : public NetDevice
59
{
68
{
60
public:
69
public:
70
  /**
71
   * \brief Get the TypeId
72
   *
73
   * \return The TypeId for this class
74
   */
61
  static TypeId GetTypeId (void);
75
  static TypeId GetTypeId (void);
62
76
63
  /**
77
  /**
 Lines 81-88   public: Link Here 
81
   * set in the Attach () method from the corresponding field in the channel
95
   * set in the Attach () method from the corresponding field in the channel
82
   * to which the device is attached.  It can be overridden using this method.
96
   * to which the device is attached.  It can be overridden using this method.
83
   *
97
   *
84
   * @see Attach ()
98
   * \see Attach ()
85
   * @param bps the data rate at which this object operates
99
   * \param bps the data rate at which this object operates
86
   */
100
   */
87
  void SetDataRate (DataRate bps);
101
  void SetDataRate (DataRate bps);
88
102
 Lines 90-103   public: Link Here 
90
   * Set the interframe gap used to separate packets.  The interframe gap
104
   * Set the interframe gap used to separate packets.  The interframe gap
91
   * defines the minimum space required between packets sent by this device.
105
   * defines the minimum space required between packets sent by this device.
92
   *
106
   *
93
   * @param t the interframe gap time
107
   * \param t the interframe gap time
94
   */
108
   */
95
  void SetInterframeGap (Time t);
109
  void SetInterframeGap (Time t);
96
110
97
  /**
111
  /**
98
   * Attach the device to a channel.
112
   * Attach the device to a channel.
99
   *
113
   *
100
   * @param ch Ptr to the channel to which this object is being attached.
114
   * \param ch Ptr to the channel to which this object is being attached.
115
   * \return true if the operation was successfull (always true actually)
101
   */
116
   */
102
  bool Attach (Ptr<PointToPointChannel> ch);
117
  bool Attach (Ptr<PointToPointChannel> ch);
103
118
 Lines 107-122   public: Link Here 
107
   * The PointToPointNetDevice "owns" a queue that implements a queueing 
122
   * The PointToPointNetDevice "owns" a queue that implements a queueing 
108
   * method such as DropTail or RED.
123
   * method such as DropTail or RED.
109
   *
124
   *
110
   * @see Queue
125
   * \see Queue
111
   * @see DropTailQueue
126
   * \see DropTailQueue
112
   * @param queue Ptr to the new queue.
127
   * \param queue Ptr to the new queue.
113
   */
128
   */
114
  void SetQueue (Ptr<Queue> queue);
129
  void SetQueue (Ptr<Queue> queue);
115
130
116
  /**
131
  /**
117
   * Get a copy of the attached Queue.
132
   * Get a copy of the attached Queue.
118
   *
133
   *
119
   * @returns Ptr to the queue.
134
   * \returns Ptr to the queue.
120
   */
135
   */
121
  Ptr<Queue> GetQueue (void) const;
136
  Ptr<Queue> GetQueue (void) const;
122
137
 Lines 126-133   public: Link Here 
126
   * The PointToPointNetDevice may optionally include an ErrorModel in
141
   * The PointToPointNetDevice may optionally include an ErrorModel in
127
   * the packet receive chain.
142
   * the packet receive chain.
128
   *
143
   *
129
   * @see ErrorModel
144
   * \see ErrorModel
130
   * @param em Ptr to the ErrorModel.
145
   * \param em Ptr to the ErrorModel.
131
   */
146
   */
132
  void SetReceiveErrorModel (Ptr<ErrorModel> em);
147
  void SetReceiveErrorModel (Ptr<ErrorModel> em);
133
148
 Lines 139-146   public: Link Here 
139
   * used by the channel to indicate that the last bit of a packet has 
154
   * used by the channel to indicate that the last bit of a packet has 
140
   * arrived at the device.
155
   * arrived at the device.
141
   *
156
   *
142
   * @see PointToPointChannel
157
   * \see PointToPointChannel
143
   * @param p Ptr to the received packet.
158
   * \param p Ptr to the received packet.
144
   */
159
   */
145
  void Receive (Ptr<Packet> p);
160
  void Receive (Ptr<Packet> p);
146
161
 Lines 186-198   public: Link Here 
186
  virtual bool SupportsSendFrom (void) const;
201
  virtual bool SupportsSendFrom (void) const;
187
202
188
protected:
203
protected:
204
  /**
205
   * \brief Handler for MPI receive event
206
   *
207
   * \param p Packet received
208
   */
189
  void DoMpiReceive (Ptr<Packet> p);
209
  void DoMpiReceive (Ptr<Packet> p);
190
210
191
private:
211
private:
192
212
193
  PointToPointNetDevice& operator = (const PointToPointNetDevice &);
213
  /**
194
  PointToPointNetDevice (const PointToPointNetDevice &);
214
   * \brief Assign operator
215
   *
216
   * The method is private, so it is DISABLED.
217
   *
218
   * \param o Other NetDevice
219
   * \return New instance of the NetDevice
220
   */
221
  PointToPointNetDevice& operator = (const PointToPointNetDevice &o);
195
222
223
  /**
224
   * \brief Copy constructor
225
   *
226
   * The method is private, so it is DISABLED.
227
   
228
   * \param o Other NetDevice
229
   */
230
  PointToPointNetDevice (const PointToPointNetDevice &o);
231
232
  /**
233
   * \brief Dispose of the object
234
   */
196
  virtual void DoDispose (void);
235
  virtual void DoDispose (void);
197
236
198
private:
237
private:
 Lines 231-240   private: Link Here 
231
   * started sending signals.  An event is scheduled for the time at which
270
   * started sending signals.  An event is scheduled for the time at which
232
   * the bits have been completely transmitted.
271
   * the bits have been completely transmitted.
233
   *
272
   *
234
   * @see PointToPointChannel::TransmitStart ()
273
   * \see PointToPointChannel::TransmitStart ()
235
   * @see TransmitCompleteEvent ()
274
   * \see TransmitCompleteEvent ()
236
   * @param p a reference to the packet to send
275
   * \param p a reference to the packet to send
237
   * @returns true if success, false on failure
276
   * \returns true if success, false on failure
238
   */
277
   */
239
  bool TransmitStart (Ptr<Packet> p);
278
  bool TransmitStart (Ptr<Packet> p);
240
279
 Lines 246-251   private: Link Here 
246
   */
285
   */
247
  void TransmitComplete (void);
286
  void TransmitComplete (void);
248
287
288
  /**
289
   * \brief Make the link up and running
290
   *
291
   * It calls also the linkChange callback.
292
   */
249
  void NotifyLinkUp (void);
293
  void NotifyLinkUp (void);
250
294
251
  /**
295
  /**
 Lines 258-285   private: Link Here 
258
  };
302
  };
259
  /**
303
  /**
260
   * The state of the Net Device transmit state machine.
304
   * The state of the Net Device transmit state machine.
261
   * @see TxMachineState
305
   * \see TxMachineState
262
   */
306
   */
263
  TxMachineState m_txMachineState;
307
  TxMachineState m_txMachineState;
264
308
265
  /**
309
  /**
266
   * The data rate that the Net Device uses to simulate packet transmission
310
   * The data rate that the Net Device uses to simulate packet transmission
267
   * timing.
311
   * timing.
268
   * @see class DataRate
312
   * \see class DataRate
269
   */
313
   */
270
  DataRate       m_bps;
314
  DataRate       m_bps;
271
315
272
  /**
316
  /**
273
   * The interframe gap that the Net Device uses to throttle packet
317
   * The interframe gap that the Net Device uses to throttle packet
274
   * transmission
318
   * transmission
275
   * @see class Time
319
   * \see class Time
276
   */
320
   */
277
  Time           m_tInterframeGap;
321
  Time           m_tInterframeGap;
278
322
279
  /**
323
  /**
280
   * The PointToPointChannel to which this PointToPointNetDevice has been
324
   * The PointToPointChannel to which this PointToPointNetDevice has been
281
   * attached.
325
   * attached.
282
   * @see class PointToPointChannel
326
   * \see class PointToPointChannel
283
   */
327
   */
284
  Ptr<PointToPointChannel> m_channel;
328
  Ptr<PointToPointChannel> m_channel;
285
329
 Lines 287-294   private: Link Here 
287
   * The Queue which this PointToPointNetDevice uses as a packet source.
331
   * The Queue which this PointToPointNetDevice uses as a packet source.
288
   * Management of this Queue has been delegated to the PointToPointNetDevice
332
   * Management of this Queue has been delegated to the PointToPointNetDevice
289
   * and it has the responsibility for deletion.
333
   * and it has the responsibility for deletion.
290
   * @see class Queue
334
   * \see class Queue
291
   * @see class DropTailQueue
335
   * \see class DropTailQueue
292
   */
336
   */
293
  Ptr<Queue> m_queue;
337
  Ptr<Queue> m_queue;
294
338
 Lines 431-455   private: Link Here 
431
   */
475
   */
432
  TracedCallback<Ptr<const Packet> > m_promiscSnifferTrace;
476
  TracedCallback<Ptr<const Packet> > m_promiscSnifferTrace;
433
477
434
  Ptr<Node> m_node;
478
  Ptr<Node> m_node;         //!< Node owning this NetDevice
435
  Mac48Address m_address;
479
  Mac48Address m_address;   //!< Address of this NetDevice
436
  NetDevice::ReceiveCallback m_rxCallback;
480
  NetDevice::ReceiveCallback m_rxCallback;   //!< Receive callback
437
  NetDevice::PromiscReceiveCallback m_promiscCallback;
481
  NetDevice::PromiscReceiveCallback m_promiscCallback;  //!< Receive callback
438
  uint32_t m_ifIndex;
482
                                                        //   (promisc data)
439
  bool m_linkUp;
483
  uint32_t m_ifIndex; //!< Index of the interface
440
  TracedCallback<> m_linkChangeCallbacks;
484
  bool m_linkUp;      //!< Identify if the link is up or not
485
  TracedCallback<> m_linkChangeCallbacks;  //!< Callback for the link change event
441
486
442
  static const uint16_t DEFAULT_MTU = 1500;
487
  static const uint16_t DEFAULT_MTU = 1500; //!< Default MTU
443
488
444
  /**
489
  /**
445
   * The Maximum Transmission Unit.  This corresponds to the maximum 
490
   * \brief The Maximum Transmission Unit
491
   *
492
   * This corresponds to the maximum 
446
   * number of bytes that can be transmitted as seen from higher layers.
493
   * number of bytes that can be transmitted as seen from higher layers.
447
   * This corresponds to the 1500 byte MTU size often seen on IP over 
494
   * This corresponds to the 1500 byte MTU size often seen on IP over 
448
   * Ethernet.
495
   * Ethernet.
449
   */
496
   */
450
  uint32_t m_mtu;
497
  uint32_t m_mtu;
451
498
452
  Ptr<Packet> m_currentPkt;
499
  Ptr<Packet> m_currentPkt; //!< Current packet processed
453
500
454
  /**
501
  /**
455
   * \brief PPP to Ethernet protocol number mapping
502
   * \brief PPP to Ethernet protocol number mapping
(-)i/src/point-to-point/model/point-to-point-remote-channel.h (-2 / +32 lines)
 Lines 31-46   namespace ns3 { Link Here 
31
31
32
/**
32
/**
33
 * \ingroup point-to-point
33
 * \ingroup point-to-point
34
 *
35
 * \brief A Remote Point-To-Point Channel
36
 * 
37
 * This object connects two point-to-point net devices where at least one
38
 * is not local to this simulator object. It simply override the transmit
39
 * method and uses an MPI Send operation instead.
34
 */
40
 */
35
class PointToPointRemoteChannel : public PointToPointChannel
41
class PointToPointRemoteChannel : public PointToPointChannel
36
{
42
{
37
public:
43
public:
44
  /**
45
   * \brief Get the TypeId
46
   *
47
   * \return The TypeId for this class
48
   */
38
  static TypeId GetTypeId (void);
49
  static TypeId GetTypeId (void);
50
51
  /** 
52
   * \brief Constructor
53
   */
39
  PointToPointRemoteChannel ();
54
  PointToPointRemoteChannel ();
55
56
  /** 
57
   * \brief Deconstructor
58
   */
40
  ~PointToPointRemoteChannel ();
59
  ~PointToPointRemoteChannel ();
41
  virtual bool TransmitStart (Ptr<Packet> p, Ptr<PointToPointNetDevice> src, Time txTime);
60
61
  /**
62
   * \brief Transmit the packet
63
   *
64
   * \param p Packet to transmit
65
   * \param src Source PointToPointNetDevice
66
   * \param txTime Transmit time to apply
67
   * \returns true if successful (currently always true)
68
   */
69
  virtual bool TransmitStart (Ptr<Packet> p, Ptr<PointToPointNetDevice> src,
70
                              Time txTime);
42
};
71
};
43
}
72
73
} // namespace ns3
44
74
45
#endif
75
#endif
46
76
(-)i/src/point-to-point/model/ppp-header.h (-1 / +14 lines)
 Lines 45-51   namespace ns3 { Link Here 
45
 * to the packet.  The ns-3 way to do this is via a class that inherits from
45
 * to the packet.  The ns-3 way to do this is via a class that inherits from
46
 * class Header.
46
 * class Header.
47
 */
47
 */
48
class PppHeader : public Header 
48
class PppHeader : public Header
49
{
49
{
50
public:
50
public:
51
51
 Lines 59-66   public: Link Here 
59
   */
59
   */
60
  virtual ~PppHeader ();
60
  virtual ~PppHeader ();
61
61
62
  /**
63
   * \brief Get the TypeId
64
   *
65
   * \return The TypeId for this class
66
   */
62
  static TypeId GetTypeId (void);
67
  static TypeId GetTypeId (void);
68
69
  /**
70
   * \brief Get the TypeId of the instance
71
   *
72
   * \return The TypeId for this instance
73
   */
63
  virtual TypeId GetInstanceTypeId (void) const;
74
  virtual TypeId GetInstanceTypeId (void) const;
75
76
64
  virtual void Print (std::ostream &os) const;
77
  virtual void Print (std::ostream &os) const;
65
  virtual void Serialize (Buffer::Iterator start) const;
78
  virtual void Serialize (Buffer::Iterator start) const;
66
  virtual uint32_t Deserialize (Buffer::Iterator start);
79
  virtual uint32_t Deserialize (Buffer::Iterator start);
(-)i/src/point-to-point/test/point-to-point-test.cc (-2 / +25 lines)
 Lines 6-19    Link Here 
6
6
7
using namespace ns3;
7
using namespace ns3;
8
8
9
/**
10
 * \brief Test class for PointToPoint model
11
 *
12
 * It tries to send one packet from one NetDevice to another, over a
13
 * PointToPointChannel.
14
 */
9
class PointToPointTest : public TestCase
15
class PointToPointTest : public TestCase
10
{
16
{
11
public:
17
public:
18
  /**
19
   * \brief Create the test
20
   */
12
  PointToPointTest ();
21
  PointToPointTest ();
13
22
23
  /**
24
   * \brief Run the test
25
   */
14
  virtual void DoRun (void);
26
  virtual void DoRun (void);
15
27
16
private:
28
private:
29
  /**
30
   * \brief Send one packet to the device specified
31
   *
32
   * \param device NetDevice to send to
33
   */
17
  void SendOnePacket (Ptr<PointToPointNetDevice> device);
34
  void SendOnePacket (Ptr<PointToPointNetDevice> device);
18
};
35
};
19
36
 Lines 55-64   PointToPointTest::DoRun (void) Link Here 
55
72
56
  Simulator::Destroy ();
73
  Simulator::Destroy ();
57
}
74
}
58
//-----------------------------------------------------------------------------
75
76
/**
77
 * \brief TestSuite for PointToPoint module
78
 */
59
class PointToPointTestSuite : public TestSuite
79
class PointToPointTestSuite : public TestSuite
60
{
80
{
61
public:
81
public:
82
  /**
83
   * \brief Constructor
84
   */
62
  PointToPointTestSuite ();
85
  PointToPointTestSuite ();
63
};
86
};
64
87
 Lines 68-71   PointToPointTestSuite::PointToPointTestSuite () Link Here 
68
  AddTestCase (new PointToPointTest, TestCase::QUICK);
91
  AddTestCase (new PointToPointTest, TestCase::QUICK);
69
}
92
}
70
93
71
static PointToPointTestSuite g_pointToPointTestSuite;
94
static PointToPointTestSuite g_pointToPointTestSuite; //!< The testsuite

Return to bug 938