From owner-freebsd-net@FreeBSD.ORG Fri Feb 27 05:30:24 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7BC1116A4CE for ; Fri, 27 Feb 2004 05:30:24 -0800 (PST) Received: from mercury.dgim.crc.ca (mercury.dgim.crc.ca [142.92.39.129]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1A5A943D2F for ; Fri, 27 Feb 2004 05:30:24 -0800 (PST) (envelope-from don@mainframe.dgrc.crc.ca) Received: from janus.dgrc.crc.ca (janus.dgrc.crc.ca [142.92.34.101]) i1RDUN5N032480; Fri, 27 Feb 2004 08:30:23 -0500 Received: (from don@localhost) by janus.dgrc.crc.ca (8.11.6+Sun/8.11.6) id i1RDU9f02740; Fri, 27 Feb 2004 08:30:09 -0500 (EST) Date: Fri, 27 Feb 2004 08:30:09 -0500 (EST) From: Donald McLachlan Message-Id: <200402271330.i1RDU9f02740@janus.dgrc.crc.ca> To: jinmei@isl.rdc.toshiba.co.jp X-Sun-Charset: US-ASCII cc: freebsd-net@freebsd.org Subject: Re: IPv6 multicast sendto() 'operation not supported' X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Feb 2004 13:30:24 -0000 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 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 >