home .. forth .. colorforth mail list archive ..

RE: [colorforth] TCP State Engine



On Wed, 14 Apr 2004 howerd.oakford@xxxxxxxxxxxx wrote:

> Hi Oninshiko,
HI Howard ^_^
> 
> I took a look at net.blk - there is some interesting stuff there!
> I presume that tftpd is a TFTP daemon. Nice...
> Which bits are yours?
> I could only find -tcp . Is there any more yet?

the significance of the BLK file, is that it has been reworked to change 
the structure and exicution of the network code (that is my work) i have 
nothing acculy done on the TCP itself. The TFTP was written by Tim Neitz, 
and does not presently work on that disk. (i really dont know the ins and 
outs of that section of code, so he said he'd take a look at it)

the other file which i was really pointing out is the state-engine 
flowchart, i have tried to simplify the RFC a little, i also (prevously) 
posted the TCB structure which i plan to use.

> 
> When I looked at TCP a few years ago I decided that it needed to be
> simplified down to a useful subset.

really there is not much you can remove (unfourtnatly). the state-engine, 
deals with all of the states required to connect and disconnect. a 
connection sould stay in the ESTAB state for most of its life, everything 
above ESTAB is a condition required for the handshake (cant get rid of 
that) and everything after has to do with shutting down the connection 
(you might be able to argue simplification here, but there are alot of 
contigincies that need to be taken into account.

> The state machine covers all manner of situations most of which could
> probably be ignored.
> The problem I have in doing this is that TCP tries to be a generic "file
> over IP" system, but all of the applications that use, except for ones that
> transfer arbitrarily large files, only use packets.
> For example, Telnet ( in one form ) collects characters then sends them as a
> TCP packet when you hit <enter>.
> For this you only need to implement TCP packet transfer, without retries,
> sliding windows, packet re-ordering etc.
> The simple packet transfer would be similar to UDP, and would probably not
> require the usual state machine.

the state-engine has nothing to do with transfering packets or files, it 
has to do with establishing and distroing a connection. you sould note 
that CLOSED is not so much a state as a non-state. i suppose you could 
drop CLOSE-WAIT and between ESTAB & LAST-ACK it would read "rcv FIN { snd 
ACK, FIN }; but i doubt the speed/size gain would be worth the loss in 
versitility
 
> One day I hope to configure a Linux box as a PPP/TCP daemon to allow me to
> test my code on it.
> You may find PPP.com ( http://www.inventio.co.uk/PPPcom.htm )useful reading
> ( blocks 684 and 780 - "LOC TCP" and "LOC .TCP" ) for the structure of TCP
> packets.

thank you for the sudjustion. ive been studing the RFC which gets into it 
in detail. it also covers alot of why it is the way it is, and how it 
works. be warned, it is heady reading, and ive built up multiple headaches 
sifing threw it.
 
> Best wishes & good luck!
> 
> Howerd
> 
> 


^_^ Oninoshiko

"A Pax, a pax, a pax upon thee"



---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
Main web page - http://www.colorforth.com