From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 2 14:47:04 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2399D106566B for ; Thu, 2 Apr 2009 14:47:04 +0000 (UTC) (envelope-from eksffa@freebsdbrasil.com.br) Received: from capeta.freebsdbrasil.com.br (capeta.freebsdbrasil.com.br [201.48.151.3]) by mx1.freebsd.org (Postfix) with SMTP id 4E7EA8FC17 for ; Thu, 2 Apr 2009 14:47:03 +0000 (UTC) (envelope-from eksffa@freebsdbrasil.com.br) Received: (qmail 9150 invoked from network); 2 Apr 2009 11:20:20 -0300 Received: from unknown (HELO claire.bh.freebsdbrasil.com.br) (201.48.151.226) by capeta.freebsdbrasil.com.br with SMTP; 2 Apr 2009 11:20:20 -0300 Message-ID: <49D4C9A0.9000804@freebsdbrasil.com.br> Date: Thu, 02 Apr 2009 11:20:16 -0300 From: Patrick Tracanelli Organization: FreeBSD Brasil LTDA User-Agent: Thunderbird 2.0.0.0 (X11/20070612) MIME-Version: 1.0 To: Luiz Otavio O Souza References: <3FD46C21A487490FB15B89E890790121@adnote989> In-Reply-To: <3FD46C21A487490FB15B89E890790121@adnote989> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Setting the mss for socket X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Apr 2009 14:47:04 -0000 Luiz Otavio O Souza escreveu: > Hello hackers, > > Is there a way to set the mss for a socket ? Like you can do in linux > with setsockopt(TCP_MAXSEG) ? > > So i can set the maximum size of packets (or sort of) from a simple > userland program. > > I've read the code and i cannot find by myself (at least from a 30minute > reading) a single point to change this. It looks like it is dynamic > calculated with interface/path mtu. Someone has a simple approach to > deal with this ? Any ideas ? > > Thanks in advance, > Luiz Good point. With something like that it could be possible to make --mss switch from iperf work properly on FreeBSD. -- Patrick Tracanelli