Skip site navigation (1)Skip section navigation (2)
Date:      10 Sep 2001 00:49:25 +0200
From:      Kent Boortz <kent@erix.ericsson.se>
To:        freebsd-hackers@freebsd.org
Subject:   How to force small TCP packets?
Message-ID:  <d2y9nogetm.fsf@erix.ericsson.se>

next in thread | raw e-mail | index | archive | help

I want to run an application with the OS set to send small TCP packets
to spot programming errors like assuming that a write of 100 bytes on
a socket can be read in a single read operation. It may work most of
the time but break at some point. So if I could configure FreeBSD to
use small packets I can spot these programming errors faster.

How can I do this?  I can't just set the MTU on the interface right?
Can I use sysctl "net.inet.tcp.sendspace" or some other configuration?
Can I set it as low as sending one byte of data in each packet?  Will
this still not help, i.e. if we are not reading fast enough we will
get all 100 bytes we wrote in a single read even if the packets were
small? Is there another way to force the behaviour that read() on a
socket just return a few bytes at the time?

Sorry if this is a stupid question, I haven't gone deep enough in
Stevens "TCP/IP Illustrated" to understand things like this yet,
 
kent

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




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