23 #include "ns3/address.h"
24 #include "ns3/net-device.h"
26 #include "ns3/callback.h"
27 #include "ns3/packet.h"
28 #include "ns3/traced-callback.h"
29 #include "ns3/event-id.h"
30 #include "ns3/nstime.h"
31 #include "ns3/data-rate.h"
33 #include "ns3/mac48-address.h"
34 #include "ns3/unix-fd-reader.h"
186 virtual void SetIfIndex (
const uint32_t index);
191 virtual bool SetMtu (
const uint16_t mtu);
192 virtual uint16_t
GetMtu (
void)
const;
virtual Ptr< Channel > GetChannel(void) const
virtual void DoDispose(void)
keep track of time values and allow control of global simulation resolution
virtual void SetNode(Ptr< Node > node)
virtual Ptr< Node > GetNode(void) const
A structure representing data read.
smart pointer class similar to boost::intrusive_ptr
virtual Address GetMulticast(Ipv4Address multicastGroup) const
Make and return a MAC multicast address using the provided multicast group.
void SetBridgedNetDevice(Ptr< NetDevice > bridgedDevice)
Set the ns-3 net device to bridge.
void SetMode(TapBridge::Mode mode)
Set the operating mode of this device.
virtual bool SetMtu(const uint16_t mtu)
a class to represent an Ipv4 address mask
ns-3 uses a pre-created tap, without configuring it
forward calls to a chain of CallbackAn ns3::TracedCallback has almost exactly the same API as a norma...
void StartTapDevice(void)
void Start(Time tStart)
Set a start time for the device.
bool DiscardFromBridgedDevice(Ptr< NetDevice > device, Ptr< const Packet > packet, uint16_t protocol, Address const &src)
void Stop(Time tStop)
Set a stop time for the device.
static TypeId GetTypeId(void)
a polymophic address class
A class that asynchronously reads from a file descriptor.
virtual bool IsPointToPoint(void) const
Return true if the net device is on a point-to-point link.
uint8_t * m_packetBuffer
A 64K buffer to hold packet data while it is being sent.
virtual void AddLinkChangeCallback(Callback< void > callback)
virtual void SetIfIndex(const uint32_t index)
virtual bool IsBridge(void) const
Return true if the net device is acting as a bridge.
virtual bool Send(Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber)
A bridge to make it appear that a real host process is connected to an ns-3 net device.
Ptr< NetDevice > GetBridgedNetDevice(void)
Get the bridged net device.
Mode
Enumeration of the operating modes supported in the class.
FdReader::Data DoRead(void)
The read implementation.
bool ReceiveFromBridgedDevice(Ptr< NetDevice > device, Ptr< const Packet > packet, uint16_t protocol, Address const &src, Address const &dst, PacketType packetType)
virtual bool SendFrom(Ptr< Packet > packet, const Address &source, const Address &dest, uint16_t protocolNumber)
virtual uint16_t GetMtu(void) const
virtual bool NeedsArp(void) const
TracedCallback m_linkChangeCallbacks
Ptr< NetDevice > m_bridgedDevice
virtual void SetAddress(Address address)
Set the address of this interface.
void ReadCallback(uint8_t *buf, ssize_t len)
ns-3 creates and configures tap device
std::string m_tapDeviceName
Ptr< TapBridgeFdReader > m_fdReader
ns-3 uses a pre-created tap, and bridges to a bridging net device
NetDevice::PromiscReceiveCallback m_promiscRxCallback
bool m_ns3AddressRewritten
virtual void SetReceiveCallback(NetDevice::ReceiveCallback cb)
virtual void SetPromiscReceiveCallback(NetDevice::PromiscReceiveCallback cb)
virtual Address GetAddress(void) const
virtual Address GetBroadcast(void) const
Describes an IPv6 address.
Ptr< Packet > Filter(Ptr< Packet > packet, Address *src, Address *dst, uint16_t *type)
Ipv4 addresses are stored in host order in this class.
TapBridge::Mode GetMode(void)
Get the operating mode of this device.
virtual bool IsMulticast(void) const
virtual bool IsLinkUp(void) const
an identifier for simulation events.
Network layer to device interface.
virtual uint32_t GetIfIndex(void) const
PacketType
Packet types are used as they are in Linux.
virtual bool IsBroadcast(void) const
void ForwardToBridgedDevice(uint8_t *buf, ssize_t len)
a unique identifier for an interface.
NetDevice::ReceiveCallback m_rxCallback
virtual bool SupportsSendFrom() const