[Oberon] AosTCPServices on WinAos

Felix Friedrich friedrich at gsf.de
Mon Aug 11 16:18:54 CEST 2003

Hello Dan,

>I'm new in area, and I'm discovering the wonderful world of Oberon. I like 
>it so much, that I intend to switch here all me future projects. I should 
>like to write some server code running on both Aos and WinAos. I'm trying 
>to run this on WinAos (it runs fine on Aos) but it fails on 
Cool, I like Oberon/Aos very much, too.

The network modules contained in the WinAos system are to be handled with a 
lot of care. They are coded quick and very dirty the following way:

- moved Win32.NetSystem.Mod to Win32.AosWinsock.Mod,
- new modules Win32.AosTCP.Mod, Win32.AosDNS.Mod, 
Win32.AosUDP.Mod,  Win32.AosDHCP.Mod available,
         they use the pseudo network driver module AosWinsock.
         AosWinsock needs module Oberon, this is a temporary patch to make 
AosTCP etc. running.
- Win32.NetSystem.Mod replaced by Aos.NetSystem.Mod

i.e. a lot of code from the "old" PlugIn Oberon system has been reused to 
make the basic network drivers in WinAos running. Actually, that's the 
wrong way round and a need for completely newly coded network modules in 
the WinAos system is more than obvious. But, unfortunately, I don't have 
the time (and a lack of experience regarding network stuff) to clean up the 

Nevertheless I have a patch for the reported problem.

In Module Win32.AosTCP.Mod replace the method Connection.Accept by the 
following (the first line had been misssing):

PROCEDURE Accept*( VAR client: Connection;  VAR res: LONGINT );
         IF client=NIL THEN NEW(client) END;
         AosWinsock.Accept( c, client.c, resi );
         IF resi = 0 THEN res := Ok ELSE res := unknown END;
         IF trace THEN
         AosOut.Enter;  AosOut.String( "AosTCP.Accept :" );  AosOut.String( 
"(" );  AosOut.Int( res, 1 );
         AosOut.String( ")" );  AosOut.Exit
END Accept;

With the modified method, your module compiles and runs without the TRAP. 
But I can't tell if the connections really run.

If you are deeply interested in the Aos network system, I recommend you to 
have a look at the modules AosNet, AosTCP, AosUDP and one of the network 
drivers, for example AosIntel8255x.Mod in the (native) distribution of Aos 
(see http://www.bluebottle.ethz.ch/dllatest.html) . Having understood how 
these module work you might have a second look at the construction in the 
WinAos system, where the network facilities are more or less subsumed in 
Win32.AosWinsock.Mod and only accessed via Win32.AosTCP.Mod, 
Win32.AosDNS.Mod, Win32.AosUDP.Mod etc.



Felix Friedrich

Institut für Biomathematik und Biometrie
GSF - Forschungszentrum für Umwelt und Gesundheit, GmbH
Ingolstädter Landstraße 1, D-85764 Neuherberg

Tel:      ++49 89 3187 2436
email:  friedrich at gsf.de


More information about the Oberon mailing list