Added ability to output Ethernet Bridge status
authorRichard Whitehouse <github@richardwhiuk.com>
Sat, 7 May 2011 17:16:45 +0000 (18:16 +0100)
committerRichard Whitehouse <github@richardwhiuk.com>
Sat, 7 May 2011 17:16:45 +0000 (18:16 +0100)
src/devices/bridge/model/bridge-net-device.cc
src/devices/bridge/model/bridge-net-device.h

index faa125cec27d34b81518125940fdab2747ddd9da..933130417e7277b788cfd1a65019ea216c0359db 100644 (file)
@@ -450,4 +450,11 @@ Address BridgeNetDevice::GetMulticast (Ipv6Address addr) const
   return Mac48Address::GetMulticast (addr);
 }
 
+std::ostream& operator<<(std::ostream& file, BridgeNetDevice& dev){
+       file << 1 << std::endl;
+       file << dev.m_address << std::endl;
+       file << *(dev.m_state);
+       return file;
+}
+
 } // namespace ns3
index 8b0c1868d1a3dd496b7197d838bcb6bf8039dc89..47e6d61e7bac85351b9f7da666a5cbb7d3d9f358 100644 (file)
@@ -153,8 +153,12 @@ private:
   uint16_t m_mtu;
   bool m_enableLearning;
 
+  friend std::ostream& operator<<(std::ostream&, BridgeNetDevice&);
+
 };
 
+std::ostream& operator<<(std::ostream&, BridgeNetDevice&);
+
 } // namespace ns3
 
 #endif /* BRIDGE_NET_DEVICE_H */