This is the mail archive of the ecos-discuss@sourceware.cygnus.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

TCP/IP for eCos Porting


Hi all:

Prakash wrote:
> 1) Can somebody give me a very high level algorithm one can
> use to port a TCP/IP stack onto an OS?

1. Determine your reference implementation.
2. Determine your ethernet (or other) interface, one supported by the
reference
    implementation.
3. Port the ethernet driver:
    a. Identify the OS specific calls it uses.
    b. Translate them to eCos calls or create an emulation layer.
    c. Get the driver working (receives broadcasts, and can send to a
LAN analyzer).
4. Port the stack:
    a. Identify the OS specific calls it uses.  The number in the BSD
stack is low.
    b. Translate them to eCos calls or create an emulation layer.
    c. Port ping and test it.  This tests ARP, IP and ICMP.
    d. Port inetd and test the "echo" protocol with both UDP and TCP.
    e. Port higher level protocols as desired (telnet, ftp, etc.).

The main design choice is whether to translate calls to eCos or to
create an
emulation layer.  For the stack in particular, I would strongly
recommend an
emulation layer.  This allows future advances in the stack to be more
easily
incorporated.  The same is true to a lesser degree for the Ethernet
driver.

One this that is missing in the BSD stack (AFAIK, no flames if I'm
wrong,
please) is a decent multiplexing layer.  Other OSs (e.g. Linux, Windows,

System V) allow multiple ethernet drivers and network protocols to share

eachother.  Last time I looked (BSD 4.2), BSD couldn't do this.

> 2) What level of expertise is required? I've been involved in
> development of Protocol stacks for Telecom, and I've been a
> user of TCP/IP. But I've just started looking into the
> internals of TCP/IP. (TCP/IP Illustrated, Vol 2, Stevens).

Good place to look, and it sounds lie you've got the right background.
The
BSD code is really gross (the 4.3 code is alot better than the 4.2 code,
I
hear).  You will need to hone your C skills.  They used alot of macros
and
stuff.

Hope this helps - Jim.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]