Equivalent to JoinMulticast() function in ns3.19

198 views
Skip to first unread message

crazynet...@gmail.com

unread,
Jun 7, 2014, 10:23:44 AM6/7/14
to ns-3-...@googlegroups.com
I was trying to do csma multicast according to csma-multicast.cc present in src folder.I am using ns3.19 version.But I couldn't find JoinMulticast() function in this version.According to the example given in this link https://code.google.com/p/ns-3/source/browse/examples/csma-multicast.cc?r=54cb46af8003a3245ae5f6e83cf96d33d79ced2e there is JoinMulticast() function.But I couldn't use this function.Can anyone help me.If I use a different version of ns3 ,can it be solved?

Konstantinos

unread,
Jun 7, 2014, 10:58:16 AM6/7/14
to ns-3-...@googlegroups.com
Hi,

The same example with CSMA multicast exists in NS-3.19 under /src/csma/examples/ folder.
Use that as a base of your work.

Regards,
K.

network crazy

unread,
Jun 9, 2014, 2:14:10 AM6/9/14
to ns-3-...@googlegroups.com
Hi,I checked the example given in src/csma/csma-multicast.cc.But the problem is that I couldnt

 find the code to join a node to a multicast group.Is there any different way to join a node to a multicast group other than JoinMulticastGroup() Function.I checked so many versions of ns3.But I couldnt find code to join a multicast group.Even though they mentioned it as a step.But the original code is not present in anywhere


--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/C6JpzjLbtjA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.

Tommaso Pecorella

unread,
Jun 9, 2014, 3:37:14 AM6/9/14
to ns-3-...@googlegroups.com
LMOtSfY (Let Me Open the Source for You)

src/csma/examples/csma-multicast.cc
Line 92 and following, I'll cite:
  NS_LOG_INFO ("Configure multicasting.");
 
//
 
// Now we can configure multicasting.  As described above, the multicast  
 
// source is at node zero, which we assigned the IP address of 10.1.1.1  
 
// earlier.  We need to define a multicast group to send packets to.  This
 
// can be any multicast address from 224.0.0.0 through 239.255.255.255
 
// (avoiding the reserved routing protocol addresses).

and then the multicast is set up. It's not user-friendly (i.e., there is no JoinMulticastGroup), but mind that using multicast isn't just joining a group. It is also setting up the multicast routers (and this is the hard part).
At the moment there is no multicast routing protocol (e.g., MLD, PIM) in ns-3.

T.

network crazy

unread,
Jun 22, 2014, 4:53:38 AM6/22/14
to ns-3-...@googlegroups.com
@Tommaso Pecorella
I found what I was looking for.UDPSocket->MulticastJoinGroup (0,multicastGroup);
Thanks for the help
Reply all
Reply to author
Forward
0 new messages