LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 11-30-2005, 02:03 PM   #1
gperrow
LQ Newbie
 
Registered: Nov 2005
Posts: 2

Rep: Reputation: 0
IPv6 multicast


I'm trying to write a C++ program to do IPv6 multicasting. On Windows, I can listen on the local IPv6 address and receive multicasts sent to ff02::1, but with the same program on Unix, nothing is received. Here's the pseudocode:

Code:
s = socket( AF_INET6, SOCK_DGRAM, IPPROTO_UDP );
a1 = getaddrinfo( "<local IP address>" );
a2 = getaddrinfo( "ff02::1" );
setsockopt( s, IPV6_JOIN_GROUP, a2 );
bind( s, a1 );
while( 1 ) {
   if( select( s ) ) {
      if( recv( s, buf ) > 0 ) {
         printf( "Received %s\n", buf );
      }
   }
}
I can send or post the real code if it would help. Can anyone tell me what I'm missing? As I said, when running on Windows (XP), the code works, but on Linux (SuSE 9.1, Red Hat 7.3), no data is ever received.

TIA
 
Old 12-01-2005, 09:02 PM   #2
jcliburn
Member
 
Registered: Dec 2003
Location: Mississippi, USA
Distribution: Fedora
Posts: 435

Rep: Reputation: 33
Can you ping6 the multicast address and get a response from the group?

ping6 -I eth0 ff02::1
PING ff02::1(ff02::1) from fe80::250:8dff:feef:9069 eth0: 56 data bytes
64 bytes from fe80::250:8dff:feef:9069: icmp_seq=0 ttl=64 time=0.043 ms
64 bytes from fe80::250:8dff:fed3:7b0d: icmp_seq=0 ttl=64 time=0.139 ms (DUP!)
64 bytes from fe80::2b0:d0ff:fe82:6ddb: icmp_seq=0 ttl=64 time=0.218 ms (DUP!)
64 bytes from fe80::2b0:d0ff:fe82:6dda: icmp_seq=0 ttl=64 time=0.295 ms (DUP!)
64 bytes from fe80::250:8dff:feef:9069: icmp_seq=1 ttl=64 time=0.041 ms
64 bytes from fe80::250:8dff:fed3:7b0d: icmp_seq=1 ttl=64 time=0.113 ms (DUP!)
64 bytes from fe80::2b0:d0ff:fe82:6ddb: icmp_seq=1 ttl=64 time=0.197 ms (DUP!)
64 bytes from fe80::2b0:d0ff:fe82:6dda: icmp_seq=1 ttl=64 time=0.220 ms (DUP!)
 
Old 12-02-2005, 10:34 AM   #3
gperrow
LQ Newbie
 
Registered: Nov 2005
Posts: 2

Original Poster
Rep: Reputation: 0
Yes, ping6 ff02::1 gives almost the same output as you posted. When I try to send UDP packets to ff02::1, or either of the addresses of the machine (one fe80:: and one fd77, I receive nothing.
 
Old 12-02-2005, 04:48 PM   #4
jcliburn
Member
 
Registered: Dec 2003
Location: Mississippi, USA
Distribution: Fedora
Posts: 435

Rep: Reputation: 33
Send me your code. I'll have a go at it. Send it to j c l i b u r n AT g m a i l DOT c o m. (Remove the spaces, obviously.)
 
Old 08-01-2012, 06:44 AM   #5
justme89
LQ Newbie
 
Registered: Aug 2012
Posts: 1

Rep: Reputation: Disabled
Solved?

Have you solved this problem?
It seems like I have the same problem.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create IPv6 multicast groups? jrodola Linux - Newbie 0 02-11-2005 12:27 PM
Multicast groups in Ipv6?? Please, help me!! jrodola Linux - Networking 0 02-11-2005 12:02 PM
Linux IPv6 multicast prtscr Linux - Networking 0 04-14-2004 11:44 AM
IPv6 Link Local Multicast wirelessman Programming 1 11-20-2002 12:32 AM
IPv6 Link Local Multicast wirelessman Linux - Networking 0 11-19-2002 04:55 PM


All times are GMT -5. The time now is 01:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration