First post, by mike_canada
I have a computer running linux that can download the google homepage in like a couple of seconds using an ordinary web browser. I have slightly modified the steps I took in the DOSBOX networking how-to to achieve internet in DOSBOX. My script to start DOSBOX with networking enabled is below:
#!/bin/bash#turn on IP forwardingecho 1 > /proc/sys/net/ipv4/ip_forward#force-close apps in case dosbox got terminated prematurelykill -9 $(pidof socat) > /dev/nullkill -9 $(pidof slattach) > /dev/nullkill -9 $(pidof dosbox) > /dev/nullkillall socat > /dev/nullkillall slattach > /dev/nullkillall dosbox > /dev/null#make a linesocat -4 PTY,link="/tmp/dbnet",raw,echo=0 TCP4-LISTEN:8001 &sleep 1slattach -vdL -s 9600 -p slip "/tmp/dbnet" &sleep 1ifconfig sl0 192.168.7.1 dstaddr 192.168.7.2 netmask 255.255.255.252 mtu 576 txqueuelen 576 up#empty IPtables. My PC is not a real server.iptables -t nat -F#last param here = local ip address to my internet routeriptables -t nat -A POSTROUTING -s 192.168.7.0/30 -j SNAT --to-source 192.168.0.102dosboxsleep 1kill -9 $(pidof slattach) > /dev/nullkill -9 $(pidof socat) > /dev/null
I attached my DOSBOX config file relevant to the problem.
So DosBox runs fine. Host PC reports:
slattach: tty_open: looking for lockslattach: tty_open: trying to open /tmp/dbnetslattach: tty_open: /tmp/dbnet (fd=4)slattach: tty_set_speed: 9600slattach: tty_set_databits: 8slattach: tty_set_stopbits: 1slattach: tty_set_parity: Nslip started on /tmp/dbnet interface sl0DOSBox version 0.74Copyright 2002-2010 DOSBox Team, published under GNU GPL.---CONFIG:Loading primary settings from config file /root/.dosbox/dosbox-0.74.confMIXER:Got different values from SDL: freq 22050, blocksize 705MIDI:Opened device:ossSerial2: Connected to 127.0.0.1DOS keyboard layout loaded with main language code US for layout usMAPPER: Loading mapper settings from /root/.dosbox/mapper-0.74.map
And client reports:
But when I try to use the internet (with mTCP's HTGET) in DOSBOX, ping works fine but trying to download a webpage takes forever at best. Here's another screenshot:
So it takes 1 second to load the first part (what you see), then about 30 seconds for the rest of the content to appear, then another 20 seconds to supposedly close the connection. then I get:
"NULL assignment detected"
and the program closes.
Why would the internet take so long in DOSBOX?
I tried maximum priority settings, and even played with CPU cycles. and the only difference I noticed with CPU cycles is the timings from mTCP's ping utility. When I make the cycles down to the low hundreds, ping reported higher response times in the 100 mS instead of 60mS.
This is mTCP for dos here: http://www.brutman.com/mTCP/
and I am using the latest version.