From owner-freebsd-net@FreeBSD.ORG Sun May 5 16:40:44 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 3EB8DD0C for ; Sun, 5 May 2013 16:40:44 +0000 (UTC) (envelope-from realrichardsharpe@gmail.com) Received: from mail-wg0-x235.google.com (mail-wg0-x235.google.com [IPv6:2a00:1450:400c:c00::235]) by mx1.freebsd.org (Postfix) with ESMTP id D309233D for ; Sun, 5 May 2013 16:40:43 +0000 (UTC) Received: by mail-wg0-f53.google.com with SMTP id y10so2980468wgg.32 for ; Sun, 05 May 2013 09:40:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=nTmvVYhanR+u17ZrGXdjALNFBh8pYLnCcRgiR2S4oUc=; b=jcUV5csSe/kuIzpt0OV0lB1KAkWPlbsBKczyIc6bgv1RSO87EhhEEgTSXQIDVHzfiL JP8IYI2synusEPPsFXJFv8WRYCB1ij4vySqNbhawZrXnPLPH67qvODR7KHxKmqHhiHap nzJJ0+aLJUr4ES4yxVisEfW89YlckyPVWRiEXBgIar1vw6SU3PhTvVr/5QV86TEH70FQ U4KUQp5JmLYNnshDTmQcklp+adeNVpp40QIN/rNSlneqmK+oxLZcpnoHrkzwQ+hfGsK2 L8gszxWjakb1DOKvrwSXwFljA73V2H20NsEw5twKTs8pZ5fCqrukT4t4ajU5x9G+6Z8E 2Ykw== MIME-Version: 1.0 X-Received: by 10.180.82.74 with SMTP id g10mr5272590wiy.10.1367772042266; Sun, 05 May 2013 09:40:42 -0700 (PDT) Received: by 10.194.179.194 with HTTP; Sun, 5 May 2013 09:40:42 -0700 (PDT) Date: Sun, 5 May 2013 09:40:42 -0700 Message-ID: Subject: TCP_KEEPIDLE vs TCPTV_KEEP_IDLE From: Richard Sharpe To: FreeBSD Net Content-Type: text/plain; charset=Big5 Content-Transfer-Encoding: quoted-printable 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: Sun, 05 May 2013 16:40:44 -0000 Samba currently has a way to set socket parameters from the smb.conf. This works fine for things like SO_SNDBUF etc, but not so well for the TCP KeepAlive parameters. In this area Samba has a Linux bias. I am looking at adding support for this under FreeBSD. The simplest way, it seems to me, is to enhance configure to find the appropriate symbols under FreeBSD (and it might be extendable to NetBSD etc) and then map them to the Linux symbols: #ifdef THIS_IS_SOME_SORT_OF_BSD #define TCP_KEEPIDLE TCPTV_KEEP_IDLE #endif However, that does mean that *BSD types would have to know that this happening because the names you would use in the smb.conf file would be Linux-specific, and documentation is often woefully incomplete. Is there a better method? --=20 Regards, Richard Sharpe (=A6=F3=A5H=B8=D1=BC~=A1H=B0=DF=A6=B3=A7=F9=B1d=A1C--=B1=E4=BE=DE)