Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Apr 2009 23:22:05 -0300
From:      "Luiz Otavio O Souza" <lists.br@gmail.com>
To:        "Thomas Wahyudi" <thomas@sanbe-farma.com>, <freebsd-current@freebsd.org>
Subject:   Re: Setting the mss for socket
Message-ID:  <B57379C05A9B4BCB95E376C807735C02@adnote989>
References:  <3FD46C21A487490FB15B89E890790121@adnote989><49D4C9A0.9000804@freebsdbrasil.com.br> <49D56212.1000702@sanbe-farma.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> 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





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B57379C05A9B4BCB95E376C807735C02>