closing half-open connections


mar@ATHENA.MIT.EDU
Wed, 30 Sep 87 15:37:49 EDT


I assume that Pyramid release 3.1 has the Berkeley 4.2 network layer.
In this case you can force the connections closed. I wrote a program
to do this a while back, but it's full of unix source I shouldn't
redistribute to someone without a source license...

To do it by hand, run
        netstat -A
and find the address of the PCB for the connection. This is the hex
number in the first column). Then start adb with
        adb -w -k /vmunix /dev/kmem

and zero out the short word 8 bytes past the address of the PCB (this
is the size of the offset on the vax, it may vary on the Pyramid. You
can check it by looking at struct tcpcb in <netinet/tcp_var.h>, and
finding the offset to t_state)
        address+8/w 0
this forces the state of this connection to CLOSED. The next time a
timer fires for that connection, it will notice that it is in the
closed state and deallocate it. You can exit adb with
        $q
I suspect that this would work on 4.3 based network layers also,
although the bug shouldn't exist there that requires it.
                                        -Mark



This archive was generated by hypermail 2.0b3 on Thu Mar 09 2000 - 14:39:34 GMT