Bugzilla – Full Text Bug Listing |
Summary: | wifi and multicast routing reportedly wrong | ||
---|---|---|---|
Product: | ns-3 | Reporter: | Tom Henderson <tomh> |
Component: | routing | Assignee: | Tom Henderson <tomh> |
Status: | RESOLVED INVALID | ||
Severity: | normal | CC: | francesco.malandrino, mathieu.lacage |
Priority: | P1 | ||
Version: | ns-3-dev | ||
Hardware: | All | ||
OS: | All | ||
Attachments: | testcase |
Description
Tom Henderson
2009-02-11 02:51:51 EST
Created attachment 375 [details]
testcase
see thread on users ML: http://groups.google.com/group/ns-3-users/browse_thread/thread/7fab0e43aff536f1/86a155fea4ed3374?lnk=gst&q=multicast#86a155fea4ed3374 Sorry, it took a long time for me to look at this one. I am going to mark it as invalid since there is existing API to fix it. The below makes it work for me: //intermediate node - ip=wifiApNode.Get(1)->GetObject<Ipv4>(); - ip->SetDefaultMulticastRoute(2); //0 loopback, 1 p2p, 2 wifi + StaticMulticastRouteHelper multicast; + Ptr<Node> multicastRouter = wifiApNode.Get(0); + Ptr<NetDevice> inputIf = multicastRouter->GetDevice (0); // The input NetDevice + NetDeviceContainer outputDevices; // A container of output NetDevices + outputDevices.Add (multicastRouter->GetDevice (1)); + multicast.AddMulticastRoute (multicastRouter, Ipv4Address ("10.1.1.2"), mcast_addr, inputIf, outputDevices); Basically, SetDefaultMulticastRoute() is used for locally originated packets; to add a multicast route to the intermediate node, use AddMulticastRoute() The API for the StaticMulticastRouteHelper and static multicast routing will be improved with the IPv4 rework. |