Bugzilla – Attachment #1691: Modified patch for bug #1778
//
CreateTap ();
// Declare the link up
NotifyLinkUp ();
// Now spin up a read thread to read packets from the tap device.
return m_mtu;
}
void
TapBridge::NotifyLinkUp (void)
{
NS_LOG_FUNCTION_NOARGS ();
if (!m_linkUp)
m_linkUp = true;
m_linkChangeCallbacks ();
bool
TapBridge::IsLinkUp (void) const
return true;
return m_linkUp;
TapBridge::AddLinkChangeCallback (Callback<void> callback)
m_linkChangeCallbacks.ConnectWithoutContext (callback);
*/
Ptr<Packet> Filter (Ptr<Packet> packet, Address *src, Address *dst, uint16_t *type);
void NotifyLinkUp (void);
/**
* \internal
*
* multithreaded apps is not a good thing.
uint32_t m_nodeId;
* Flag indicating whether or not the link is up. In this case,
* whether or not ns-3 is connected to the underlying TAP device
* with a file descriptor.
bool m_linkUp;
* Callbacks to fire if the link changes state (up or down).
TracedCallback<> m_linkChangeCallbacks;
};
} // namespace ns3