23 #include "ns3/packet.h"
25 #include "ns3/pointer.h"
26 #include "ns3/mesh-point-device.h"
27 #include "ns3/wifi-net-device.h"
28 #include "ns3/mesh-wifi-interface-mac.h"
41 .AddConstructor<MeshPointDevice> ()
42 .AddAttribute (
"Mtu",
"The MAC-level Maximum Transmission Unit",
46 MakeUintegerChecker<uint16_t> ())
47 .AddAttribute (
"RoutingProtocol",
48 "The mesh routing protocol used by this mesh point.",
61 m_channel = CreateObject<BridgeChannel> ();
100 uint16_t& realProtocol = protocol;
112 Forward (incomingPort, packet, protocol, src48, dst48);
131 Forward (incomingPort, packet->
Copy (), protocol, src48, dst48);
174 NS_LOG_WARN (
"Manual changing mesh point address can cause routing errors.");
259 uint16_t protocolNumber)
331 if ((*i)->GetIfIndex () == n)
339 std::vector<Ptr<NetDevice> >
352 NS_FATAL_ERROR (
"Device does not support eui 48 addresses: cannot be used as a mesh point interface.");
356 NS_FATAL_ERROR (
"Device does not support SendFrom: cannot be used as a mesh point interface.");
367 NS_FATAL_ERROR (
"Device is not a WiFi NIC: cannot be used as a mesh point interface.");
373 "WiFi device doesn't have correct MAC installed: cannot be used as a mesh point interface.");
393 "Routing protocol must be installed on mesh point to be useful.");
405 uint16_t protocol, uint32_t outIface)
428 if (outIface != 0xffffffff)
436 (*i)->SendFrom (packet->
Copy (), src, dst, protocol);
441 unicastData (0), unicastDataBytes (0), broadcastData (0), broadcastDataBytes (0)
448 os <<
"<Statistics" << std::endl <<