From owner-freebsd-net@FreeBSD.ORG Tue Jan 22 17:15:00 2013 Return-Path: Delivered-To: net@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 137D7410; Tue, 22 Jan 2013 17:15:00 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id E59F76A8; Tue, 22 Jan 2013 17:14:59 +0000 (UTC) Received: from pakbsde14.localnet (unknown [38.105.238.108]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 63E2AB953; Tue, 22 Jan 2013 12:14:59 -0500 (EST) From: John Baldwin To: Alexander Leidinger Subject: Re: [PATCH] Properly handle Linux TCP socket options Date: Tue, 22 Jan 2013 12:14:15 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p22; KDE/4.5.5; amd64; ; ) References: <201301191126.13257.jhb@freebsd.org> <20130121205522.00006f38@unknown> In-Reply-To: <20130121205522.00006f38@unknown> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201301221214.15173.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 22 Jan 2013 12:14:59 -0500 (EST) Cc: emulation@freebsd.org, net@freebsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jan 2013 17:15:00 -0000 On Monday, January 21, 2013 2:55:22 pm Alexander Leidinger wrote: > 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? We do not do that now for any options (socket level or otherwise). You could easily add that in linux_setsockopt(), but that should be a separate commit. -- John Baldwin