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

(-)a/src/devices/point-to-point/point-to-point-net-device.cc (+11 lines)
 Lines 200-205    Link Here 
200
//
200
//
201
// Got another packet off of the queue, so start the transmit process agin.
201
// Got another packet off of the queue, so start the transmit process agin.
202
//
202
//
203
  if (!m_sendReadyCallback.IsNull()) // signal callback when we pop.
204
    {
205
      m_sendReadyCallback();
206
    }
203
  TransmitStart(p);
207
  TransmitStart(p);
204
}
208
}
205
209
 Lines 481-486    Link Here 
481
  m_promiscCallback = cb;
485
  m_promiscCallback = cb;
482
}
486
}
483
487
488
void
489
PointToPointNetDevice::SetSendReadyCallback(NetDevice::SendReadyCallback cb)
490
{
491
  NS_LOG_FUNCTION_NOARGS();
492
  m_sendReadyCallback = cb;
493
}
494
484
  bool
495
  bool
485
PointToPointNetDevice::SupportsSendFrom (void) const
496
PointToPointNetDevice::SupportsSendFrom (void) const
486
{
497
{
(-)a/src/devices/point-to-point/point-to-point-net-device.h (+2 lines)
 Lines 265-270    Link Here 
265
  virtual void SetReceiveCallback (NetDevice::ReceiveCallback cb);
265
  virtual void SetReceiveCallback (NetDevice::ReceiveCallback cb);
266
266
267
  virtual void SetPromiscReceiveCallback (PromiscReceiveCallback cb);
267
  virtual void SetPromiscReceiveCallback (PromiscReceiveCallback cb);
268
  virtual void SetSendReadyCallback(NetDevice::SendReadyCallback cb);
268
  virtual bool SupportsSendFrom (void) const;
269
  virtual bool SupportsSendFrom (void) const;
269
270
270
private:
271
private:
 Lines 410-415    Link Here 
410
  Mac48Address m_address;
411
  Mac48Address m_address;
411
  NetDevice::ReceiveCallback m_rxCallback;
412
  NetDevice::ReceiveCallback m_rxCallback;
412
  NetDevice::PromiscReceiveCallback m_promiscCallback;
413
  NetDevice::PromiscReceiveCallback m_promiscCallback;
414
  NetDevice::SendReadyCallback m_sendReadyCallback;
413
  uint32_t m_ifIndex;
415
  uint32_t m_ifIndex;
414
  std::string m_name;
416
  std::string m_name;
415
  bool m_linkUp;
417
  bool m_linkUp;
(-)a/src/node/net-device.h (+11 lines)
 Lines 122-127    Link Here 
122
   * whenever the link goes up.
122
   * whenever the link goes up.
123
   */
123
   */
124
  virtual void SetLinkChangeCallback (Callback<void> callback) = 0;
124
  virtual void SetLinkChangeCallback (Callback<void> callback) = 0;
125
126
  /**
127
   * Signal that the NetDevice has removed a packet from the Queue.
128
   * params are TBD. return is TBD.
129
   */
130
  typedef Callback< void > SendReadyCallback;
131
  /**
132
   * Register a callback to be invoked whenever a packet is removed
133
   * from the Tx Queue.
134
   */
135
  virtual void SetSendReadyCallback(SendReadyCallback cb) {};
125
  /**
136
  /**
126
   * \return true if this interface supports a broadcast address,
137
   * \return true if this interface supports a broadcast address,
127
   *         false otherwise.
138
   *         false otherwise.

Return to bug 341