Re: Elks networking

Jody Bruchon
2016-05-29T06:31:47Z

On 2016-05-28 16:17, Derek Johansen wrote:
> Do sockets/networking work in elks and if so to what extent and in
> what environment. In my environment of elks on qemu on Ubuntu on Vbox
> on win8.1 when I try to run telnet I get a system crash.

As far as I am aware, ELKS only supports SLIP connections via a serial
port. The networking code has gone untested for a very long time. Most
of us don't have an 8086-era machine connected to a modern PC via serial
port with a SLIP server configured.

The TCP/IP/SLIP stack is in a binary called 'ktcp'. Given the fact that
various annoying kernel and core utilities bugs still exist, most of the
development focus has been on correcting those first. The lack of memory
protection on the 8086 platform means any program has 'root'-level
access to the entire system and situations that would cause a
segmentation fault on Linux-i386 can easily take down the entire system
on ELKS; this combined with the ease with which C lets you shoot
yourself in the foot plus the severely limited program + data + stack
space in the ELKS memory model makes "crashing" bugs more difficult to
find and more important to catch.

If you want to start somewhere, look in the elks/Documentation
directory. There should be info on how to use ktcp and SLIP to connect
ELKS to an IP network. On the emulator side of things, you need to
emulate a serial port and forward that serial port to a SLIP server in
some roundabout manner, which is almost certainly the hard part these
days since SLIP was outdated and mostly superseded by PPP in the mid-1990s.

Ideally, it would be better if we had an NE2000 Ethernet card driver; I
once bought an NE2000-compatible 8-bit ISA card but the 8086 PC I had
picked up (free) to put it in refused to boot from any media of any
sort, so I unfortunately had to give up. My understanding is that the
NE2000 is emulated by practically every single popular x86 emulation
platform in existence and its interface is used by a huge variety of
older network adapters; if someone feels like making ktcp talk NE2000,
it would probably help on the networking side.

-Jody