If Forth is being used on top of an operating system that already provides TCP/IP networking, then it is only necessary to provide a Forth interface to the network stack in order to write network applications.
I described an implmentation of this type of interface for
Wil Baden's
ThisForth
and Dirk Zoller's
PFE
at the
1994 FORML Conference
( Carter, 1994, Internetworking with Forth,
Proceedings of the 1994 FORML Conference, pp. 50-71).
If there is no underlying TCP/IP stack available or Forth is being used in
an embedded environment, then a native Forth TCP/IP protocol stack is
desired.
Taygeta Scientific has developed a native Forth TCP/IP protocol stack that is written entirely in ANS Forth. This implementation includes IP, TCP, UDP, and ICMP. It uses SLIP or PPP interface layers and provides an API based upon the BSD socket interface. It is designed to be easily subsettable, by setting some compiletime switches, so that only a portion of the full protocol can be used if that is desired.
The compiled size of the TCP/IP stack depends upon the subsets that are compiled into your applications. An example for 32-bit Forth system with standard buffers sizes gave the following sizes in bytes,
Protocol | SLIP | PPP |
---|---|---|
IP only | 30,836 | 38,628 |
ICMP,IP | 35,052 | 42,844 |
UDP,IP | 34,076 | 41,868 |
UDP,ICMP,IP | 39,036 | 46,828 |
TCP,IP | 42,312 | 50,104 |
TCP,ICMP,IP | 46,928 | 54,720 |
TCP,UDP,IP | 45,552 | 53,344 |
TCP,UDP.ICMP,IP | 50,912 | 58,704 |
This software is currently undergoing final testing and documentation. It will be available for licensing in the near future. Contact us for details.
|
|