Return the port added to allow helper to pass meaningful routing table
authorRichard Whitehouse <github@richardwhiuk.com>
Sun, 20 Feb 2011 02:09:00 +0000 (02:09 +0000)
committerRichard Whitehouse <github@richardwhiuk.com>
Sun, 20 Feb 2011 02:09:00 +0000 (02:09 +0000)
code/src/devices/bridge/model/bridge-net-device.cc
code/src/devices/bridge/model/bridge-net-device.h

index 14d8d8108f240e2555f06728d00130440479dca6..100fa1bfe92bf1f2d339660495970df37abe868d 100644 (file)
@@ -223,7 +223,7 @@ BridgeNetDevice::GetBridgePort (uint32_t n) const
   return m_ports[n]->GetDevice();
 }
 
-void 
+Ptr<BridgePortNetDevice>  
 BridgeNetDevice::AddBridgePort (Ptr<NetDevice> device)
 {
   NS_LOG_FUNCTION_NOARGS ();
@@ -242,6 +242,8 @@ BridgeNetDevice::AddBridgePort (Ptr<NetDevice> device)
   m_ports.push_back(port);
   m_channel->AddChannel (device->GetChannel ());
 
+  return port;
+
 }
 
 Ptr<BridgePortNetDevice>
index 6fe9e99745102b39479b520b6f3ecf0f6371e74b..1b63ff9ab9a5b58db1f9d30466da46cf519cb08b 100644 (file)
@@ -86,7 +86,7 @@ public:
    * bridging node you must enable IP on the BridgeNetDevice itself,
    * never on its port netdevices.
    */
-  void AddBridgePort (Ptr<NetDevice> bridgePort);
+  Ptr<BridgePortNetDevice> AddBridgePort (Ptr<NetDevice> bridgePort);
 
   uint32_t GetNBridgePorts (void) const;