Shoebill now has working Ethernet support!

Great news!  The excellent A/UX capable emulator Shoebill, now has working Ethernet support!  The sad news is that it only supports the TUN/TAP interface.  So Windows users are kind of left out in the fun.

Shoebill + Ethernet

Shoebill + Ethernet

Except, I’ve been here before with SIMH ages ago.  So I dusted off my source code, and injected it into Shoebill.  The first issue I had was that SLiRP was rejecting all the inputted frames, because of invalid frame length.  Even more weird is that ARP worked, and I could see the and virtual IP’s but TCP and UDP outbound wouldn’t work at all.

It took me longer than it should have but although this code worked great with GCC 2.7 and 3.0, 4.x breaks it.  And it’s the same reason why Shoebill originally didn’t work on Win32, the blasted packed structures!  So adding the ‘-mno-ms-bitfields’ flag to GCC is all it took, and now I could ping for about 5-7 pings until SLiRP would crash.  I tried all kinds of stuff trying to see if there was an issue with SLiRP, but I should have payed closer attention to the debugger, with all those threads flying around.  It turns out Shoebill was trying to read & write a the same time, which caused SLiRP to crash as it is not re-entrant.  I tried to place mutex’s on every SLiRP call but that ended up having SLiRP not process any packets.  Very strange.  I then reduced it to where I read the frame out of SLiRP and pass it to Shoebill, and where Shoebill write’s a frame out the SLiRP.  And much to my amazement I can run ‘worms’ just fine!

So after a minute of worming and pinging I called it ‘good enough’ and rebuilt a production binary, and packaged up my source code.

For anyone who want’s to play, my Win32 EXE is here, and the source code I am using is here.

15 thoughts on “Shoebill now has working Ethernet support!

    • I wsa thinking of hecnet with appletalk… I am pretty sure I can do both at the same time, shunt the appletalk over a bridge, and slirp the tcpip.. .. pcap should be easy too, I can uh ‘borrow’ the code from SIMH.

  1. DOSBox SVN builds also use PCap for its NE2000 emulation, it should be trivial to port. Will Appletalk/EtherTalk DDP work over a PCap interface without any additional code?

    If not, GSport 0.31 has some pretty nifty Appletalk support via the SCC emulation (since there was never any native EtherTalk devices for the platform). It has a LLAP stack that uses PCap to communicate with the outside world in addition to the Ethernet card emulation (which is TCP only).

    Also, I think OpenVPN comes with a TUN/TAP interface driver for Windows, although PCap is a bit more end user friendly.

    • Windows has a tuntap drive via the OpenVPN project but as a user I find it incredibly klunky, especially on *NIX with the need to bridge and all that… I know how to do it, but honestly it’s too much work!

      Ages ago I did a SIMH direct to hecnet, I’ll have to dig up that code and see if it works now that I know how to configure DecNET, and alter it.. I think an AppleTalk hecnet would be cool… no?

      • I don’t think A/UX supports the DECNet protocol at all.

        Ethertalk support would be cool. I like being able to access AFP file shares and printers from my emulated IIgs.

        • I doesn’t support decnet at all, I’m talking about running ethertalk on a hecnet like network. Although Im having issues getting ethertalk running for some reason.

          I’ve read that some ethernet adapters are TCP/IP only for some reason, and I have a feeling the ae0 interface is tcpip only.

  2. I can only say ‘hooray!’. I’m still amazed at this emulator, really. Out of nowhere and working so sweet.

    If its author is reading: I tip my hat to you, sir.

Leave a Reply