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,2006 INRIA | 3 * Copyright (c) 2005,2006 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 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 /** | 333 /** |
334 * \return true if this interface supports a bridging mode, false otherwise. | 334 * \return true if this interface supports a bridging mode, false otherwise. |
335 */ | 335 */ |
336 virtual bool SupportsSendFrom (void) const = 0; | 336 virtual bool SupportsSendFrom (void) const = 0; |
337 | 337 |
338 ·· | 338 ·· |
339 /** | 339 /** |
340 * Callback invoked when device wants to tell the higher layer that it | 340 * Callback invoked when device wants to tell the higher layer that it |
341 * may send a packet | 341 * may send a packet |
342 */ | 342 */ |
343 typedef Callback < void, Ptr<NetDevice> > DeviceReadyCallback; | 343 typedef Callback < void, uint8_t > WakeCallback; |
344 | 344 |
345 virtual void SetDeviceReadyCallback (DeviceReadyCallback cb) { m_deviceReadyCa
llback = cb; } | 345 virtual void SetWakeCallback (WakeCallback cb) { m_wakeCallback = cb; } |
346 | 346 |
347 /** | 347 /** |
348 * \return true if the specified queue of this interface is not ready for a pa
cket from | 348 * \return true if the specified queue of this interface is not ready for a pa
cket from |
349 * the higher layer | 349 * the higher layer |
350 */ | 350 */ |
351 virtual bool IsStopped (uint8_t queue) const = 0; | 351 virtual bool IsStopped (uint8_t queue) const = 0; |
352 | 352 |
353 /** | 353 /** |
354 * \return the number of transmission queues | 354 * \return the number of transmission queues |
355 */ | 355 */ |
356 virtual uint8_t GetNumTxQueues (void) const = 0; | 356 virtual uint8_t GetNumTxQueues (void) const = 0; |
357 | 357 |
358 /** | 358 /** |
359 * \return the id of the transmission queue selected for the given packet | 359 * \return the id of the transmission queue selected for the given packet |
360 */ | 360 */ |
361 virtual uint8_t GetSelectedQueue (Ptr<Packet> packet) const { return 0; } | 361 virtual uint8_t GetSelectedQueue (Ptr<Packet> packet) const { return 0; } |
362 | 362 |
363 private: | 363 private: |
364 DeviceReadyCallback m_deviceReadyCallback; | 364 WakeCallback m_wakeCallback; |
365 }; | 365 }; |
366 | 366 |
367 } // namespace ns3 | 367 } // namespace ns3 |
368 | 368 |
369 #endif /* NET_DEVICE_H */ | 369 #endif /* NET_DEVICE_H */ |
LEFT | RIGHT |