fix bug 122: get rid of duplicate argument to QueryInterface

This commit is contained in:
Mathieu Lacage
2008-01-02 09:25:31 +01:00
parent 6b0e717a19
commit f3e77eea3d
31 changed files with 128 additions and 121 deletions

View File

@@ -211,7 +211,7 @@ main (int argc, char *argv[])
// a fine time to find the interface indices on node two.
//
Ptr<Ipv4> ipv4;
ipv4 = n2->QueryInterface<Ipv4> (Ipv4::iid);
ipv4 = n2->QueryInterface<Ipv4> ();
uint32_t ifIndexLan0 = ipv4->FindInterfaceForAddr (n2Lan0Addr);
uint32_t ifIndexLan1 = ipv4->FindInterfaceForAddr (n2Lan1Addr);
@@ -261,7 +261,7 @@ main (int argc, char *argv[])
// interface to find the output interface index, and tell node zero to send
// its multicast traffic out that interface.
//
ipv4 = n0->QueryInterface<Ipv4> (Ipv4::iid);
ipv4 = n0->QueryInterface<Ipv4> ();
uint32_t ifIndexSrc = ipv4->FindInterfaceForAddr (multicastSource);
ipv4->SetDefaultMulticastRoute (ifIndexSrc);
//
@@ -269,7 +269,7 @@ main (int argc, char *argv[])
// multicast data. To enable forwarding bits up the protocol stack, we need
// to tell the stack to join the multicast group.
//
ipv4 = n4->QueryInterface<Ipv4> (Ipv4::iid);
ipv4 = n4->QueryInterface<Ipv4> ();
ipv4->JoinMulticastGroup (multicastSource, multicastGroup);
//
// Create an OnOff application to send UDP datagrams from node zero to the

View File

@@ -186,9 +186,9 @@ main (int argc, char *argv[])
// This will likely set by some global StaticRouting object in the future
NS_LOG_INFO ("Set Default Routes.");
Ptr<Ipv4> ipv4;
ipv4 = n0->QueryInterface<Ipv4> (Ipv4::iid);
ipv4 = n0->QueryInterface<Ipv4> ();
ipv4->SetDefaultRoute (Ipv4Address ("10.1.1.2"), 1);
ipv4 = n3->QueryInterface<Ipv4> (Ipv4::iid);
ipv4 = n3->QueryInterface<Ipv4> ();
ipv4->SetDefaultRoute (Ipv4Address ("10.1.3.1"), 1);
//
@@ -205,8 +205,7 @@ main (int argc, char *argv[])
NS_ASSERT (em != 0);
// Now, query interface on the resulting em pointer to see if a
// RateErrorModel interface exists. If so, set the packet error rate
Ptr<RateErrorModel> bem = em->QueryInterface<RateErrorModel>
(RateErrorModel::iid);
Ptr<RateErrorModel> bem = em->QueryInterface<RateErrorModel> ();
if (bem)
{
bem->SetRandomVariable (UniformVariable ());

View File

@@ -205,9 +205,9 @@ main (int argc, char *argv[])
// This will likely set by some global StaticRouting object in the future
NS_LOG_INFO ("Set Default Routes.");
Ptr<Ipv4> ipv4;
ipv4 = n0->QueryInterface<Ipv4> (Ipv4::iid);
ipv4 = n0->QueryInterface<Ipv4> ();
ipv4->SetDefaultRoute (Ipv4Address ("10.1.1.2"), 1);
ipv4 = n3->QueryInterface<Ipv4> (Ipv4::iid);
ipv4 = n3->QueryInterface<Ipv4> ();
ipv4->SetDefaultRoute (Ipv4Address ("10.1.3.1"), 1);
// Configure tracing of all enqueue, dequeue, and NetDevice receive events

View File

@@ -206,9 +206,9 @@ main (int argc, char *argv[])
// This will likely set by some global StaticRouting object in the future
NS_LOG_INFO ("Set Default Routes.");
Ptr<Ipv4> ipv4;
ipv4 = n0->QueryInterface<Ipv4> (Ipv4::iid);
ipv4 = n0->QueryInterface<Ipv4> ();
ipv4->SetDefaultRoute (Ipv4Address ("10.1.1.2"), 1);
ipv4 = n3->QueryInterface<Ipv4> (Ipv4::iid);
ipv4 = n3->QueryInterface<Ipv4> ();
ipv4->SetDefaultRoute (Ipv4Address ("10.1.3.1"), 1);
// Configure tracing of all enqueue, dequeue, and NetDevice receive events