Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Feb 2004 11:55:10 +0900
From:      JINMEI Tatuya / =?ISO-2022-JP?B?GyRCP0BMQEMjOkgbKEI=?= <jinmei@isl.rdc.toshiba.co.jp>
To:        Donald McLachlan <don@mainframe.dgrc.crc.ca>
Cc:        freebsd-net@freebsd.org
Subject:   Re: IPv6 multicast sendto() 'operation not supported'
Message-ID:  <y7vsmgxjkoh.wl@ocean.jinmei.org>
In-Reply-To: <200402261627.i1QGRVT02174@janus.dgrc.crc.ca>
References:  <200402261627.i1QGRVT02174@janus.dgrc.crc.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
>>>>> 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?y7vsmgxjkoh.wl>