|
Lines 94-107
main (int argc, char *argv[])
|
Link Here
|
|---|
|
| 94 |
|
94 |
|
| 95 |
// Create the bridge netdevice, which will do the packet switching |
95 |
// Create the bridge netdevice, which will do the packet switching |
| 96 |
Ptr<Node> switchNode = csmaSwitch.Get (0); |
96 |
Ptr<Node> switchNode = csmaSwitch.Get (0); |
| 97 |
Ptr<BridgeNetDevice> bridgeDevice = CreateObject<BridgeNetDevice> (); |
97 |
BridgeHelper bridge; |
| 98 |
switchNode->AddDevice (bridgeDevice); |
98 |
bridge.Install (switchNode, switchDevices); |
| 99 |
|
|
|
| 100 |
for (NetDeviceContainer::Iterator portIter = switchDevices.Begin (); |
| 101 |
portIter != switchDevices.End (); portIter++) |
| 102 |
{ |
| 103 |
bridgeDevice->AddBridgePort (*portIter); |
| 104 |
} |
| 105 |
|
99 |
|
| 106 |
// Add internet stack to the terminals |
100 |
// Add internet stack to the terminals |
| 107 |
InternetStackHelper internet; |
101 |
InternetStackHelper internet; |