Some DTR handling was still inside of such #ifdefs, and thus
I was unable to make a modem work on a serial port. I believe
this code is portable to OSX, Linux, FreeBSD, and Solaris.
As it was in the real world, especially with dialup ports, it is possible
for an emulator AMLC line to get blocked by stray flow control characters.
The blocked port may appear dead to the next user to connect, if they are
not "serial savvy" enough to try sending an XON character.
A large number of vulnerability scanners have found and have been hitting
the public emulators, injecting HTTP transactions or worse into the AMLC
ports and often locking all of them daily.
This workaround injects an XON (DC1, 0221) and a line kill character as
extracted from the DEFKIL field in FIGCOM, into the AMLC line when a new
connection is received.
There is a -dolineclear command line switch to enable the behavior.
On linux, keepalive defaults off. The default timer on linux
is 7200 seconds. Do we need to make a note in the docs about
setting /proc/sys/net/ipv4/tcp_keepalive_time?
Solaris (SmartOS) build needs alternative solutions to two termios
things, plus makefile support for additional link libraries. PNC
support is untested and is likely _very_ slow, since Solaris doesn't
have O_ASYNC. The usual suggestion is to rewrite such code to use
poll().
Incidental: utilities makefile needed tabs to make `make` happy
on FreeBSD. Which make? Don't remember now.
37.5 Prime MIPS on Linode VM to 42.5 MIPS. gvp-> was faster on the
PowerPC architecture when gvp was kept in a dedicated register, but
that does not apply to Intel.
Old:
Timing CPU, 20.0 ticks per second...
35.3 Prime MIPS for 16-bit ADD loop
40.0 Prime MIPS for 16-bit MPY loop
42.1 Prime MIPS for 16-bit DIV loop
21.4 Prime MIPS for 32-bit ADD loop
30.8 Prime MIPS for 32-bit MPY loop
28.6 Prime MIPS for 32-bit DIV loop
57.1 Prime MIPS for 16-bit X=0 loop
44.4 Prime MIPS for 32-bit X=0 loop
37.5 average Prime MIPS
New:
Timing CPU, 20.0 ticks per second...
42.9 Prime MIPS for 16-bit ADD loop
53.3 Prime MIPS for 16-bit MPY loop
47.1 Prime MIPS for 16-bit DIV loop
24.0 Prime MIPS for 32-bit ADD loop
38.1 Prime MIPS for 32-bit MPY loop
32.0 Prime MIPS for 32-bit DIV loop
57.1 Prime MIPS for 16-bit X=0 loop
44.4 Prime MIPS for 32-bit X=0 loop
42.4 average Prime MIPS
- Remove long integers so x86_64, where long is 8 bytes, is like i686
compile, where long is 4 bytes.
- Dont' handle xon/xoff on sys console in full duplex
- Add geom hash for DEMO emulator
- Add -mmacosx-version-min=10.4 option for DEMO emulator
- Add 1-line AMLC and 2-node PNC to DEMO emulator
- Kermit/telnet negotiations work now: fd var was not being set, so
write() was not actually working
- with many controllers, Primos would halt with tumble table overflow:
you can't do read processing until lines are enabled
- only look for new connections when handling the clock line
controller; there is no sense doing this more than 10x per second, and
it probably should still have a timer in case polls are being sped up
- use buf[] for tty message, not another static buf
- when a new connection occurs, set devpoll for the controller. The
first connection to a controller was taking 5 seconds when more than 1
controller was present
- when status is read and an eor occurred, do read processing again
rather than waiting for the next poll
- divide tumble table space up by # of connected lines. The old way
read MAXREAD (64) chars from each line until the tumble table was
full. But with 8 AMLC boards configured, there is only 53 words of TT
space in each double buffer. A select() on connected fd's would be
better.
- allow # as first character of amlc.cfg for comment lines
- turn on TCP/IP NODELAY (disable Nagle) to improve character echo
for serial device servers connected to a serial printer for example,
where the SDS initiates the telnet connect to the Prime when the
printer is turned on.