Reply 100 of 109, by superfury
davidrg wrote on 2023-09-01, 22:15:superfury wrote on 2023-08-31, 10:40:Although I can't seem to find a PPP IPX driver for MS-DOS anywhere. Anyone knows of any (to use with etherppp and friends)?
There are certainly IPX over PPP solutions for MS-DOS but the ones I'm aware of aren't free and I doubt they'd work with etherppp, etc. The ones I'm aware of are built to work with Novells 16bit NetWare DOS Client (IPXODI.COM, LSL.COM, etc) as that was the main reason you'd want to run IPX over PPP - to remotely connect to a NetWare server at work. Probably much easier to just run IPX over TCP/IP - this is what Novell ended up doing in the mid-90s.
Well, UniPCemu has a PPP server (when compiled with it enabled, as the server builds that are released currently are). You can connect to it using Dosbox-style dial-up. Said PPP protocol is implemented over the real ethernet (using ethernet packets using the pcap library to send/receive) or internal(when not using pcap, basically just routing the sent packets over the internal network UniPCemu provides) networks.
The PPP-based networking UniPCemu provides both IPv4 and IPX support (they can even be used simultaneously!). When networking over the real network using pcap, it's simply wrapping the packets sent with just a ethernet header to select a destination (direct or broadcast using IPv4 packets, always broadcasting using IPX packets(EtherType 0x8137, see Ethernet II encapsulation (https://en.wikipedia.org/wiki/Internetwork_Packet_Exchange))). Allocation of IPX addresses is simply done using IPX echo request and reply (if an address replies, it's assumed to be allocated). So it can theoretically communicate with Dosbox-style IPX (provided that the Dosbox server converts between the ethernet and it's own UDP-based protocols, perhaps even supporting it directly (as a passthrough).
UniPCemu itself, when using IPX over PPP, simply sends the packets to the ethernet interface as a broadcast. When receiving, it will filter to just accept broadcasts and the client's own IPX node number and network number, then send those to the connected client (routing it there).
IPv4 is simply applied to use broadcasts and directed MAC addresses (each client has one assigned from a range in the settings), using basic ARP to determine used addresses (when allocating) and filtering incoming IPv4 packets based on the MAC address (broadcast vs client itself) and IPv4 destination address (broadcast vs client itself), combining those for the correct results (filtering out packets that don't apply to the client).
One nice thing I even did was using a properly configured COM0COM driver to connect to UniPCemu's virtual Hayes-compatible modem and connect Windows 10 to said network that way (by dialing UniPCemu's PPP server just like a Dosbox client would) to get Windows 10 connected to Windows 9x clients that were connected the same way.
Multiple Windows 9x clients properly communicated to each other using both IPv4 and IPX using said PPP server. IPv4 internet access worked as well. I even played Doom95 over (MS-DOS) IPX using Windows 9x that way! 😁 You just need to connect to the PPP server as usual (although Windows 9x has a bug using IPX together with IPv4 somehow, sending invalid, corrupted, PPP IPX packets, so just disable IPv4 in that case. UniPCemu tries to handle those, but other Windows 9x clients won't properly understand those packets received if used that way. It has something to do with using IPv4 and IPX on the same PPP connection in Windows 95.). Although with Doom95, you need to select the MS-DOS IPX method and not the Windows one (the Windows one (DirectX one if I remember correctly) won't be used properly it seems, for some reason, not using the PPP connection at all).
So UniPCemu does try to implement PPP SNAP if detected (and will change IPX to use that once a packet has been received from the client using that method), but it doesn't work 100% afaik.
So it runs just fine with Windows 9x using IPX over PPP, just bare MS-DOS doesn't have proper drivers to do that.
Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io