Left: | ||
Right: |
OLD | NEW |
---|---|
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 11 matching lines...) Expand all Loading... | |
22 #define NET_DEVICE_H | 22 #define NET_DEVICE_H |
23 | 23 |
24 #include <string> | 24 #include <string> |
25 #include <stdint.h> | 25 #include <stdint.h> |
26 #include "ns3/callback.h" | 26 #include "ns3/callback.h" |
27 #include "ns3/object.h" | 27 #include "ns3/object.h" |
28 #include "ns3/ptr.h" | 28 #include "ns3/ptr.h" |
29 #include "address.h" | 29 #include "address.h" |
30 #include "ns3/ipv4-address.h" | 30 #include "ns3/ipv4-address.h" |
31 #include "ns3/ipv6-address.h" | 31 #include "ns3/ipv6-address.h" |
32 #include "queue-state.h" | |
32 | 33 |
33 namespace ns3 { | 34 namespace ns3 { |
34 | 35 |
35 class Node; | 36 class Node; |
36 class Channel; | 37 class Channel; |
37 class Packet; | 38 class Packet; |
38 | 39 |
39 /** | 40 /** |
40 * \ingroup network | 41 * \ingroup network |
41 * \defgroup netdevice NetDevice | 42 * \defgroup netdevice NetDevice |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
324 * sensed by the netdevice but which are intended to be received by | 325 * sensed by the netdevice but which are intended to be received by |
325 * other hosts. | 326 * other hosts. |
326 */ | 327 */ |
327 virtual void SetPromiscReceiveCallback (PromiscReceiveCallback cb) = 0; | 328 virtual void SetPromiscReceiveCallback (PromiscReceiveCallback cb) = 0; |
328 | 329 |
329 /** | 330 /** |
330 * \return true if this interface supports a bridging mode, false otherwise. | 331 * \return true if this interface supports a bridging mode, false otherwise. |
331 */ | 332 */ |
332 virtual bool SupportsSendFrom (void) const = 0; | 333 virtual bool SupportsSendFrom (void) const = 0; |
333 | 334 |
335 /** | |
336 * \param index index of the queue that is queried. | |
337 * \return State of the queue addressed by index. | |
338 */ | |
339 virtual QueueState GetQueueState (uint32_t index) = 0; | |
Tom Henderson
2011/07/26 14:30:00
I think it would help to explain a bit in the doxy
| |
340 /** | |
341 * \return Number of queues contained by the underlying netdevice | |
342 */ | |
343 virtual uint32_t GetNQueues (void) = 0; | |
344 /** | |
345 * \return Whether the underlying netdevice can accept any more | |
346 * packet | |
347 */ | |
Tom Henderson
2011/07/26 14:30:00
Why is this needed? Can't GetNQueues() and GetQue
Mathieu Lacage
2011/09/14 06:47:43
+1
| |
348 virtual bool IsTxPathBlocked (void) = 0; | |
349 /** | |
350 * \param callback the callback to invoke | |
351 * | |
352 * Sets a callback invoked whenever a queue changes state. reports | |
353 * queue index. | |
Tom Henderson
2011/07/26 14:30:00
Why not return the QueueState also in the callback
Mathieu Lacage
2011/09/14 06:47:43
In general, I think that it is better to make such
| |
354 */ | |
355 virtual void SetQueueStateChangeCallback (Callback<void,uint32_t> callback) = 0; | |
356 | |
334 }; | 357 }; |
335 | 358 |
336 } // namespace ns3 | 359 } // namespace ns3 |
337 | 360 |
338 #endif /* NET_DEVICE_H */ | 361 #endif /* NET_DEVICE_H */ |
OLD | NEW |