[Coco] IP stack for NitrOS9
Chuck Youse
cyouse at serialtechnologies.com
Sat Jul 19 13:10:07 EDT 2008
Good morning folks,
Next project on my list is an Ethernet card for the Coco; hardware-wise,
this will be pretty straightforward. The software is by far the more
complex part of the problem, and I've got two approaches. I wonder if
anyone has got any comments.
There are three approaches to take; one is to simply provide the
hardware and leave the rest to user-space processing, a la uIP or
something. Personally, while I think this is a good approach on a
memory/cycle-hungry microcontroller, this is a cop-out under OS-9.
So I'm left with kernel solutions. Two main approaches:
1. Implement as an SCF/SBF file manager to attempt to maintain the
unified I/O system of OS-9;
2. Create kernel extensions to implement a separate set of system calls
for network I/O.
I'm leaning towards #2. Essentially this will take the form of a module
that's a 'peer' (rather than a client) of IOMan ("NetMan", maybe?) that
implements extra system calls to manipulate sockets. There will also be
a new kind of OS-9 system module for a 'network device'. The network
devices can take the form of serial drivers that implement [C]SLIP/PPP,
or Ethernet. (Don't expect NetMAn to handle ARP; ezch Ethernet device
will do this itself. The redundancy doesn't bother me since an OS-9 box
isn't likely to have more than one interface anyway..)
This means that read/write to network connections will differ from
read/write to files. In practice, this doesn't affect much; especially
the lack of a sort of 'select' system call under OS-9 means the lack of
unification isn't really a consideration. (May be able to implement
some sort of async socket I/O with signals.)
Along with the network-stack proper, we should implement a pseudo-tty
SCF driver/devices, so that when the stack is ready, things like
'telnet' can be implemented in a straightforward manner. It's not part
of the network stack, but it most useful for network-related things.
Thoughts?
C.
More information about the Coco
mailing list