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) 2007, 2008 University of Washington | 3 * Copyright (c) 2007, 2008 University of Washington |
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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 | 188 |
189 virtual bool NeedsArp (void) const; | 189 virtual bool NeedsArp (void) const; |
190 | 190 |
191 virtual void SetReceiveCallback (NetDevice::ReceiveCallback cb); | 191 virtual void SetReceiveCallback (NetDevice::ReceiveCallback cb); |
192 | 192 |
193 virtual Address GetMulticast (Ipv6Address addr) const; | 193 virtual Address GetMulticast (Ipv6Address addr) const; |
194 | 194 |
195 virtual void SetPromiscReceiveCallback (PromiscReceiveCallback cb); | 195 virtual void SetPromiscReceiveCallback (PromiscReceiveCallback cb); |
196 virtual bool SupportsSendFrom (void) const; | 196 virtual bool SupportsSendFrom (void) const; |
197 | 197 |
198 void SetDeviceReadyCallback (DeviceReadyCallback cb); | 198 void SetWakeCallback (WakeCallback cb); |
199 virtual uint8_t GetNumTxQueues (void) const { return 1; } | 199 virtual uint8_t GetNumTxQueues (void) const { return 1; } |
200 | 200 |
201 protected: | 201 protected: |
202 /** | 202 /** |
203 * \brief Handler for MPI receive event | 203 * \brief Handler for MPI receive event |
204 * | 204 * |
205 * \param p Packet received | 205 * \param p Packet received |
206 */ | 206 */ |
207 void DoMpiReceive (Ptr<Packet> p); | 207 void DoMpiReceive (Ptr<Packet> p); |
208 | 208 |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 | 446 |
447 Ptr<Node> m_node; //!< Node owning this NetDevice | 447 Ptr<Node> m_node; //!< Node owning this NetDevice |
448 Mac48Address m_address; //!< Mac48Address of this NetDevice | 448 Mac48Address m_address; //!< Mac48Address of this NetDevice |
449 NetDevice::ReceiveCallback m_rxCallback; //!< Receive callback | 449 NetDevice::ReceiveCallback m_rxCallback; //!< Receive callback |
450 NetDevice::PromiscReceiveCallback m_promiscCallback; //!< Receive callback | 450 NetDevice::PromiscReceiveCallback m_promiscCallback; //!< Receive callback |
451 // (promisc data) | 451 // (promisc data) |
452 uint32_t m_ifIndex; //!< Index of the interface | 452 uint32_t m_ifIndex; //!< Index of the interface |
453 bool m_linkUp; //!< Identify if the link is up or not | 453 bool m_linkUp; //!< Identify if the link is up or not |
454 bool m_isReady; //!< Indicate whether can accept packet from higher layer | 454 bool m_isReady; //!< Indicate whether can accept packet from higher layer |
455 TracedCallback<> m_linkChangeCallbacks; //!< Callback for the link change eve
nt | 455 TracedCallback<> m_linkChangeCallbacks; //!< Callback for the link change eve
nt |
456 DeviceReadyCallback m_deviceReadyCallback; | 456 NetDevice::WakeCallback m_wakeCallback; |
457 | 457 |
458 static const uint16_t DEFAULT_MTU = 1500; //!< Default MTU | 458 static const uint16_t DEFAULT_MTU = 1500; //!< Default MTU |
459 | 459 |
460 /** | 460 /** |
461 * \brief The Maximum Transmission Unit | 461 * \brief The Maximum Transmission Unit |
462 * | 462 * |
463 * This corresponds to the maximum· | 463 * This corresponds to the maximum· |
464 * number of bytes that can be transmitted as seen from higher layers. | 464 * number of bytes that can be transmitted as seen from higher layers. |
465 * This corresponds to the 1500 byte MTU size often seen on IP over· | 465 * This corresponds to the 1500 byte MTU size often seen on IP over· |
466 * Ethernet. | 466 * Ethernet. |
(...skipping 13 matching lines...) Expand all Loading... |
480 * \brief Ethernet to PPP protocol number mapping | 480 * \brief Ethernet to PPP protocol number mapping |
481 * \param protocol An Ethernet protocol number | 481 * \param protocol An Ethernet protocol number |
482 * \return The corresponding PPP protocol number | 482 * \return The corresponding PPP protocol number |
483 */ | 483 */ |
484 static uint16_t EtherToPpp (uint16_t protocol); | 484 static uint16_t EtherToPpp (uint16_t protocol); |
485 }; | 485 }; |
486 | 486 |
487 } // namespace ns3 | 487 } // namespace ns3 |
488 | 488 |
489 #endif /* POINT_TO_POINT_NET_DEVICE_H */ | 489 #endif /* POINT_TO_POINT_NET_DEVICE_H */ |
OLD | NEW |