From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 3 16:02:02 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 181B3106566C for ; Fri, 3 Apr 2009 16:02:02 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outU.internet-mail-service.net (outu.internet-mail-service.net [216.240.47.244]) by mx1.freebsd.org (Postfix) with ESMTP id F144C8FC19 for ; Fri, 3 Apr 2009 16:02:01 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id 83CE45BA7E; Fri, 3 Apr 2009 09:02:25 -0700 (PDT) X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (home.elischer.org [216.240.48.38]) by idiom.com (Postfix) with ESMTP id 651832D6080; Fri, 3 Apr 2009 09:01:58 -0700 (PDT) Message-ID: <49D63315.6050108@elischer.org> Date: Fri, 03 Apr 2009 09:02:29 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.21 (Macintosh/20090302) MIME-Version: 1.0 To: Luiz Otavio O Souza References: <3FD46C21A487490FB15B89E890790121@adnote989> <49d5c0de.E5bkeKr+p+fg4K00%perryh@pluto.rain.com> <64D5D9E633734200A603D067ED5A81E9@adnote989> In-Reply-To: <64D5D9E633734200A603D067ED5A81E9@adnote989> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Lawrence Stewart 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: Fri, 03 Apr 2009 16:02:02 -0000 Luiz Otavio O Souza wrote: >>> 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. >> >> Depending on exactly what you need to accomplish, you may >> find something useful in this thread from last August in >> freebsd-questions@ >> >> setting the other end's TCP segment size > > Very informative thread, thanks. > > This thread show me that TCP_MAXSEG is implemented in freebsd but don't > work. You can set the setsockopt(IPPROTO_TCP, TCP_MAXSEG), wich will set > the > tp->t_maxseg, but this value is recalculated at tcp_input, so in short, you > cannot set the max segment size for a socket. > > I've posted a completly wrong patch (from style point-of-view - and using > SOL_SOCKET instead of IPPROTO_TCP), but with that patch i'm able to set the > mss in iperf. this thread shoud be in FreeBSD-net@ so tha the right people see it many developers do not read hackers every day as it tends to overload them. > > Many thanks, > Luiz > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"