www.a00.de > tcpgroup > 1994 > msg00131

TCP-group 1994

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RTT cache storage

Phil Karn <karn@unix.ka9q.ampr.org> writes:
> For most Internet paths, the 5 second starting value is more than enough,
> but I guess ham packet radio is different.

One of the complaints I had about 2 meter TCP/IP, was that if you wanted to
send mail regularly to Florida from Oklahoma, you had to have a 100 second
IRTT.  Then when you exchanged IP's locally, and missed a packet, this 100
second would slow things down to a crawl.  The solution to just use 5 seconds
and bang the ROSE path until it crashed (congestion time-out) was not elegant.
Then JNOS somewhere along the line picked up an RTT cache and stored
information on each IP address.  But then shutting down for any reason just
dumped all this "valuable" information.

In email with Joe Buswell (k5jb) he mentions that my short snippet contains
a bug.  Jeez, I thought anything that small would be good to go...

Here's the meat of his message:

I noticed an error in the rtt cache process.  When it reads in the file
it doesn't put the stuff in the array where the other routines expect
to find them.  [Solution - write the whole cache - in tcpsubr.c]:

        extern char *Rttfile;
        FILE *stream;

        if ((stream = fopen(Rttfile, "wb+")) == NULL)   /* truncate if found - K5JB */


        extern char *Rttfile;
        FILE *stream;

        if ((stream = fopen(Rttfile, "rb")) == NULL)

        fread(Tcp_rtt, sizeof(Tcp_rtt), 1, stream);

This is the way I modified mine.  If you do this, delete the rttcache file
before starting this one because if you don't it will get garbage in the

Notice that the array isn't real swift because it stores things in modulo
16 by address. is the same as so there will be cases where
new entries will overwrite old ones that have different addresses.

Thanks Joe, that's better thought out then my hack.

Document URL : http://www.a00.de/tcpgroup/1994/msg00131.php
Ralf D. Kloth, Ludwigsburg, DE (QRQ.software). < hostmaster at a00.de > [don't send spam]
Created 2004-10-04. Last modified 2004-10-04. Your visit 2020-10-28 01:56.11. Page created in 0.028 sec.
[Go to the top of this page]   [... to the index page]