From owner-freebsd-emulation@FreeBSD.ORG Mon Jan 21 19:57:09 2013 Return-Path: Delivered-To: emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id C402CF71; Mon, 21 Jan 2013 19:57:09 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id 4C9B4A16; Mon, 21 Jan 2013 19:57:09 +0000 (UTC) Received: from outgoing.leidinger.net (p57A388D2.dip.t-dialin.net [87.163.136.210]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id B834784409A; Mon, 21 Jan 2013 20:56:59 +0100 (CET) Received: from unknown (IO.Leidinger.net [192.168.1.12]) by outgoing.leidinger.net (Postfix) with ESMTPS id 1C8AC4938; Mon, 21 Jan 2013 20:56:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=leidinger.net; s=outgoing-alex; t=1358798217; bh=P7Cy1PCJ8dnxT6seLRGcNRbr3qRSIvBs260ZjOyC4M4=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=ZFVgpygVM2bdWsezMXFlQrEkJMIwTfSOynipMY7IWQcb717w7I1qqxWGIr2czMNew yb85vflkWT9q+9V0YyaFQPjRGk93+lA6Qj8hg/iOBBFegsBSi8i5Rsz+nI8cMdMPUs h5fUqmRe6XvQfbGeSwa3nZBgfJvqNzFH4FlT2Kamy3bjn54AzUMnBY57OFbOZ5vweN S/s6yz+7l1GausNgj8mtcaqpAc7Mo6P4k0yyV+Q1E5uSId0dDZpKoZHsXof20amBNb yisaFMPMsqp3y+hwR7/1YJGfwRNz0ov6nH7ANA9UakfXwetuHOfguBHW5m6HvyvqpN wNCY0x0OelWvw== Date: Mon, 21 Jan 2013 20:55:22 +0100 From: Alexander Leidinger To: John Baldwin Subject: Re: [PATCH] Properly handle Linux TCP socket options Message-ID: <20130121205522.00006f38@unknown> In-Reply-To: <201301191126.13257.jhb@freebsd.org> References: <201301191126.13257.jhb@freebsd.org> X-Mailer: Claws Mail 3.8.0cvs30 (GTK+ 2.24.10; i586-pc-mingw32msvc) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: B834784409A.A260F X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=-1.121, required 6, autolearn=disabled, ALL_TRUSTED -1.00, AWL -0.23, DKIM_SIGNED 0.10, T_DKIM_INVALID 0.01, T_FRT_STOCK2 0.01, T_RP_MATCHES_RCVD -0.01) X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1359403020.53432@QDO5VQ/jkXV9JDceHFgSgQ X-EBL-Spam-Status: No Cc: emulation@freebsd.org, net@freebsd.org X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jan 2013 19:57:09 -0000 On Sat, 19 Jan 2013 11:26:13 -0500 John Baldwin wrote: > The current setsockopt() wrapper for the Linux ABI claims that Linux > and FreeBSD use the same values for TCP socket options. This is true > for TCP_NODELAY and TCP_MAXSEG but not for any other options. This > patch adds a mapping routine for TCP options similar to that used for > other socket option levels. I believe this mapping to be correct in > terms of which FreeBSD options have the same semantics as Linux > options based on comparing code in the two kernels, but I'm not 100% > certain about TCP_MD5SIG since the Linux code that it maps to is not > as clear (it calls some function pointer and it is not clear if it is > accepting a simple boolean value similar to FreeBSD's). What about a message for unknown options? > Also, almost all of the socket stuff in the linux.h headers appears > to be identical and at least some of it are in MI headers in Linux > (such as the TCP options). It seems to me that a lot of that should > move into linux_socket.h instead. Yes, at least for the newly added ones (I haven't looked at the other ones). Bye, Alexander. -- http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137