From owner-freebsd-current@FreeBSD.ORG Fri Apr 3 02:44:19 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CF45106566B for ; Fri, 3 Apr 2009 02:44:19 +0000 (UTC) (envelope-from lists.br@gmail.com) Received: from mail-gx0-f176.google.com (mail-gx0-f176.google.com [209.85.217.176]) by mx1.freebsd.org (Postfix) with ESMTP id D69368FC1A for ; Fri, 3 Apr 2009 02:44:18 +0000 (UTC) (envelope-from lists.br@gmail.com) Received: by gxk24 with SMTP id 24so2534375gxk.19 for ; Thu, 02 Apr 2009 19:44:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to:references :subject:date:mime-version:content-type:content-transfer-encoding :x-priority:x-msmail-priority:x-mailer:x-mimeole; bh=POUUBiZcV/deoq9DpuhokZ8HgbpWREf8lXpWNHQF7hM=; b=gY0zHkmKzwhpT96HU27kFnj4QReqm4G+5kvhY/51hT0OygEzT56RnXWy0B5aYoCxua oRlptluOs3C/Lm5hJ3AU0Y7GVgbfWsPIPHRDfJEPqyuAJy//6XMTLtbxo0CYbbCF10oY 2yvFpTVWMDYWLZu3PREonJv9MFTYx1uE4Bq4Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:references:subject:date:mime-version :content-type:content-transfer-encoding:x-priority:x-msmail-priority :x-mailer:x-mimeole; b=PVMh4w9hKCxXqHujqOy7yiQdv7VZVq8Ligqk1kGqqbdTaZFQ5o9h29eY3Jc9VN4G9n 2U8MI1xsERYa4noK7UWnGfgEYAraqGDfUwgS2yasWtW5ESJvZkfzKooCmAiYdkfh1TN8 RRwJrSuME39RgRL0Z2Z2DAPUq8kFTVCQgQb5I= Received: by 10.90.117.17 with SMTP id p17mr416991agc.5.1238725350979; Thu, 02 Apr 2009 19:22:30 -0700 (PDT) Received: from adnote989 (201-42-156-231.dsl.telesp.net.br [201.42.156.231]) by mx.google.com with ESMTPS id 7sm2531663agd.1.2009.04.02.19.22.28 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 02 Apr 2009 19:22:30 -0700 (PDT) Message-ID: From: "Luiz Otavio O Souza" To: "Thomas Wahyudi" , References: <3FD46C21A487490FB15B89E890790121@adnote989><49D4C9A0.9000804@freebsdbrasil.com.br> <49D56212.1000702@sanbe-farma.com> Date: Thu, 2 Apr 2009 23:22:05 -0300 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5512 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Mailman-Approved-At: Fri, 03 Apr 2009 03:10:20 +0000 Cc: Subject: Re: Setting the mss for socket X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Apr 2009 02:44:19 -0000 > Patrick Tracanelli wrote: >> 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. >>> > you mean sysctl -w net.inet.tcp.mssdflt=512 ? Not really... I don't want this to be a system wide option, i need this to be able to generate some traffic under a certain pattern of packet sizes. I really should read the code for more than 30 minutes... it's simple than i first think, i already have a simple patch for this, but it is too ugly for anything more than get iperf running... This is the patch (just for reference - may work for someone else): http://pastebin.com/m706da25b And the iperf patch: http://pastebin.com/m2f8f1100 Luiz