From owner-freebsd-net@FreeBSD.ORG Fri Aug 8 10:54:41 2003 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 2CB3937B401 for ; Fri, 8 Aug 2003 10:54:41 -0700 (PDT) Received: from shuttle.wide.toshiba.co.jp (shuttle.wide.toshiba.co.jp [202.249.10.124]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6DA0643FBD for ; Fri, 8 Aug 2003 10:54:40 -0700 (PDT) (envelope-from jinmei@isl.rdc.toshiba.co.jp) Received: from ocean.jinmei.org (unknown [2001:4f8:3:bb:f47f:35ff:7b72:437b]) by shuttle.wide.toshiba.co.jp (Postfix) with ESMTP id 492081525D; Sat, 9 Aug 2003 02:54:38 +0900 (JST) Date: Sat, 09 Aug 2003 02:54:34 +0900 Message-ID: From: JINMEI Tatuya / =?ISO-2022-JP?B?GyRCP0BMQEMjOkgbKEI=?= To: Maria Dolores Moral In-Reply-To: <200308081320.52456.yoyes@dif.um.es> References: <200308081320.52456.yoyes@dif.um.es> User-Agent: Wanderlust/2.10.0 (Venus) Emacs/21.3 Mule/5.0 (SAKAKI) Organization: Research & Development Center, Toshiba Corp., Kawasaki, Japan. MIME-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII cc: freebsd-net@freebsd.org Subject: Re: Setsockopt: Invalid argument 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, 08 Aug 2003 17:54:41 -0000 >>>>> On Fri, 8 Aug 2003 13:20:52 +0200, >>>>> Maria Dolores Moral said: > Hello. I am working in a kernel implementation. > I try to pass argument from the user to the kernel. > I use a socket and the option: > setsockopt(socket,IPPROTO_ICMPV6,ICMP6_REPORTAUTH,&ua,sizeof(ua)) > in my program Server.c. > I have defined ICMP6_REPORTAUTH in in6.h, and I have rebuil the kernel. > #> make && make install > But when I compile Serv: > gcc -DICMP6_REPORTAUTH Server.c -o Serv > I obtain Serv: setsockopt(ICMP6_REPORTAUTH): Invalid argument > I have read in a articule that it must set in the kernel the option ..., > IPPROTO_ICMPV6 in this case, but I do not how. Please show us more details about your implementation. Specifically, we need to know the corresponding kernel implementation (I guess you modified sys/netinet6/icmp6.c:icmp6_ctloutput) and the type of the socketoption argument (variable "ua" in the example above). JINMEI, Tatuya Communication Platform Lab. Corporate R&D Center, Toshiba Corp. jinmei@isl.rdc.toshiba.co.jp