From: Laurent Deniel <deniel@worldnet.fr>
Subject: Re: Multicast problem using virtual addresses
Date: 1999/06/03 [thread overview]
Message-ID: <3756F53B.A076DB6B@worldnet.fr> (raw)
In-Reply-To: 7j36nr$hus$1@nnrp1.deja.com
pacr99@my-deja.com wrote:
>
> We now define our multicast address:
> mcastaddr.s_addr=inet_addr(?239.255.0.0?)
>
> Finally, we try to add the IP addresses to the multicast group using:
> mreq.imr_multiaddr=mcastaddr;
> mreq.imr_interface.s_addr = ipnumber; (ipnumber is a s_addr where
> xxx.xxx.xxx.xxx has been stored)
> setsockopt(*UDPFD,IPPROTO_IP,IP_ADD_MEMBERSHIP,((const void *) &mreq,
> sizeof(mreq))
>
> The same is done for the other IP address, zzz.zzz.zzz.zzz (changing
> the content of s_addr to zzz.zzz.zzz.zzz)
>
> The problem is that the last setsockopt returns -1, e.g does not
> succeed.
The IP address specified in imr_interface is just there to choose the
desired interface. AFAIK, you can not become a member of the same
multicast group two times on the same interface (i.e. on xxx and zzz
when zzz in an alias on the same interface as xxx (but it is possible
to join the same group on more than one interface).
Laurent.
--
Laurent DENIEL | E-mail: deniel@worldnet.fr
Paris, FRANCE | deniel@fr.airsysatm.thomson-csf.com
| WWW : http://www.worldnet.fr/~deniel
All above opinions are personal, unless stated otherwise.
prev parent reply other threads:[~1999-06-03 4:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-06-02 4:00 Multicast problem using virtual addresses pacr99
1999-06-03 4:00 ` Laurent Deniel [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox