VOGONS


First post, by superfury

User metadata
Rank l33t++
Rank
l33t++

I notice that, once UniPCemu's SLIP service is running and connected to(by a maximum of one client somehow), the connection that's connected will pretty much halt when the host is doing something on the same website. The reverse seems to happen when the host opens a website while the SLIP client is loading a website at the same time(with the SLIP client failing to load the webpage)?

The SLIP server itself just does a simple thing: filter out the IP address and MAC address packets, strip the ethernet header to obtain the IP packet and send it to the client over the TCP connection, encoded in SLIP encoding.
The reverse happens when sending packets using the SLIP server: the SLIP packet is decoded to obtain the raw IP packet, it's encoded inside a ethernet frame and send to the router (which will send it where it needs to be).

All the SLIP server does is check the MAC address (and filter IP address too for received IP packets on the pcap interface), filter those out and sending it to all connected and logged in TCP clients(which could be Dosbox sessions, UniPCemu sessions or whatever is connected using the TCP port (up to 256 clients in total)).
The clients on the other hand, all send their own packets to the SLIP server(buffered and automatically allocated in memory when receiving and freed when sending over pcap to receive the next packet from the client), which simply receives them and using the ethernet header (just adding the mac addresses of the SLIP server's host and the router as the destination) sends them using the pcap interface over the ethernet.

Anyone knows more about this? Why can only one client properly communicate with a website/DNS server at a time? Why will connections fail when the host itself (e.g. Windows 10 that's running the SLIP server, while a web browser under Windows 10 also requests a web page from the same server (like both requesting to load http://www.google.com/ )) connects to the same website as the SLIP server is accessing? The same with multiple SLIP server clients doing that at the same time?
It almost seems like everything slows to a crawl or completely stops while the SLIP server is communicating with the internet?
All received packets matching the IP address and MAC address of the host(as specified in the configuration file of UniPCemu's SLIP server) are buffered one packet at a time, sent to all connected clients before the next packet is received by the SLIP server... Should the SLIP server discard any other packets received while it's doing this (while a packet that's received is being sent to the clients)? Currently it won't receive any more packets until all connected clients have finished their receiving of the packet that's filtered out.

Source code: https://bitbucket.org/superfury/unipcemu/src/ … ardware/modem.c

Edit: Just modified the server to call pcap_next_ex when sending packets to the clients too, discarding the received packets themselves until the clients have received it (which will cause it to receive any packets that are received after those discarded packets).

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io