First post, by mike_canada
I made a bit of progress in rolling out my own PING server and even an ARP server for DOS as a TSR and I use DOSBOX for testing but its not working well. I'll break my problem down into a few parts because I'm now thinking its a driver/dosbox issue more than anything else.
The main problem
When I run my ping server, I run tests with the linux ping tool. If I dont run a networking tool, then my TSR runs fine and DOSBOX runs normal.
If I make ping send a small set of data of under 2000-ish bytes, to the server in DOSBOX, it runs fine and the data is collected at the server end once in one piece and I do not notice a slowdown.
BUT. if I send a relatively large amount of data in one go (between about 4000 to 6000-ish bytes), the server (based on my observations) is forced to collect the data at a high speed in multiple pieces, and eventually this will cause DOSBOX to crash even if after I stop the linux ping program.
My driver/linux/dosbox setup
I followed a method similar to this:
This is my linux script to start DOSBOX:
#turn on IP forwarding
echo 1 > /proc/sys/net/ipv4/ip_forward
#setup tcp port
socat -4 PTY,link="/tmp/dbnet",raw,echo=0 TCP4-LISTEN:8001 &
#convert port to high speed serial line
slattach -v -s 115200 -p adaptive "/tmp/dbnet" &
#setup IP address
ifconfig sl0 192.168.7.1 dstaddr 192.168.7.2 netmask 255.255.255.252 mtu 1524 txqueuelen 15240 up
#flush nat tables (I have nothing else in them)
iptables -t nat -F
#add ip as masquerade
iptables -t nat -A POSTROUTING -s 192.168.7.0/30 -j MASQUERADE
and this is my serial line in dosbox config:
serial2=nullmodem server:127.0.0.1 port:8001 transparent:1
And I use this in my DOSBOX autoexec.bat to load the packet driver on startup and I get a MAC address (not FF:FF:FF:FF:FF:FF). So I thought my network setup is good unless I'm doing something wrong.
ethersl -p 0x60 3 0x2F8 115200
Before I fret further about my code, am I taking the wrong steps to make networking efficient in a DOSBOX environment? Could I do something better like change the linux utilities that I should load and/or the packet driver program in DOS from within DOSBOX?