Date: Fri, 27 Feb 2004 08:30:09 -0500 (EST) From: Donald McLachlan <don@mainframe.dgrc.crc.ca> To: jinmei@isl.rdc.toshiba.co.jp Cc: freebsd-net@freebsd.org Subject: Re: IPv6 multicast sendto() 'operation not supported' Message-ID: <200402271330.i1RDU9f02740@janus.dgrc.crc.ca>
next in thread | raw e-mail | index | archive | help
Hi,
Yes, the bind() succeeded, and in fact the receiver side was able to receive
packets. Only sendto() failed.
Don
> From jinmei@isl.rdc.toshiba.co.jp Thu Feb 26 21:54:52 2004
>
> >>>>> On Thu, 26 Feb 2004 11:27:31 -0500 (EST),
> >>>>> Donald McLachlan <don@mainframe.dgrc.crc.ca> said:
>
> > In preparation for writing an IPv6 multicast application I wrote a little
> > test program (shown below). This program worked on linux (RedHat), but
> > when I try it on a FreeBSD box (5.0, running zebra router and pim6dd)
> > sendto() fails with "Operation not supported" ... ???
>
> > To verify my app was OK, I installed a solaris box on the LAN beside the
> > linux box and the app compiled and worked fine.
>
> > Thinking it might be a bug in 5.0 or an interaction with zebra/pim6dd I
> > installed a FreeBSD 5.2 box on the lan beside the other 2 app boxes and
> > I get the same error again. Anyone know what is missing/wrong in my test app?
>
> > [ I'm guessing FreeBSD wants some extra socket options set, but I don't know
> > which ones. ]
>
> Did your code really succeed the bind(2) call in the main function?
>
> > bzero((char *)&sin, (int)sizeof(sin)); /* setup address info */
> > bcopy(the_addr, (char *)&sin.sin6_addr, sizeof(the_addr));
> > sin.sin6_family = AF_INET6;
> > sin.sin6_port = htons(3000);
> > /* bind addr to sock */
> > if(bind(sock, (struct sockaddr *)&sin, sizeof(sin)) < 0)
> > {
> > perror("bind");
> > exit(errno);
> > }
>
> FreeBSD should require a valid sin6_len (which should be
> sizeof(sockaddr_in6)), so the program should have stopped here.
>
> JINMEI, Tatuya
> Communication Platform Lab.
> Corporate R&D Center, Toshiba Corp.
> jinmei@isl.rdc.toshiba.co.jp
>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200402271330.i1RDU9f02740>
