List Info

Thread: Multicast sending




Multicast sending
country flaguser name
India
2007-06-11 00:57:25
Hi,
  I am using the send program from this example:
http://ntrg.cs.tcd.ie/undergrad/4ba2/mu
lticast/antony/example.html#sender

The only modification is the use of setsockopt() to
set the interface from which I want to send the
packet.
The setsockopt() succeeds but sendto() fails with
"host is down" message. Any clues?. 
The program works fine on a Linux machine.

regards
Praveen


       
____________________________________________________________
________________________
Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now
(it's updated for today's economy) at Yahoo! Games.
http://get.games.yahoo.com/proddesc?gamekey=monopolyh
erenow  


Re: Multicast sending
country flaguser name
Australia
2007-06-11 04:05:07
On Sun, 10 Jun 2007, Praveen wrote:

> Hi,
>   I am using the send program from this example:
> http://ntrg.cs.tcd.ie/undergrad/4ba2/mu
lticast/antony/example.html#sender
> 
> The only modification is the use of setsockopt() to
> set the interface from which I want to send the
> packet.
> The setsockopt() succeeds but sendto() fails with
> "host is down" message. Any clues?. 
> The program works fine on a Linux machine.

The test program doesn't set sin_len. Try adding
"addr.sin_len = sizeof(addr);". 

Also ensure that you have set up multicast on your host.
Some notes
are in /etc/netstart.

-d


Re: Multicast sending
user name
2007-06-11 04:42:17
On 6/11/07, Damien Miller <djmmindrot.org> wrote:
...
> The test program doesn't set sin_len. Try adding
> "addr.sin_len = sizeof(addr);".

I don't believe that's necessary.  According to Stevens's
"UNIX
Network Programming", the only time a user-space
program needs to set
the sin_len member is when using routing sockets.  Indeed,
an
examination of sys_connect(), sys_bind(), and sys_sendto()
show that
they all use sockargs() to copy the supplied socket address
into the
kernel address space and that routine sets the sin_len
member to the
supplied length argument.


Philip Guenther


[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )