1
0
mirror of https://github.com/PDP-10/klh10.git synced 2026-01-13 07:19:32 +00:00

162 Commits

Author SHA1 Message Date
Olaf Seibert
d0f53b8cc9 Replace CENV_SYSF_SIGSET with HAVE_SIGACTION 2016-01-21 21:19:46 +01:00
Olaf Seibert
e3e86227de Replace CENV_SYSF_BSDTIMEVAL with HAVE_SETITIMER and HAVE_GETTIMEOFDAY 2016-01-21 19:52:40 +01:00
Olaf Seibert
14ba9636cd Eliminate CENV_SYSF_NANOSLEEP and use HAVE_NANOSLEEP instead 2016-01-21 00:42:41 +01:00
Olaf Seibert
2b48b63e74 Eliminate CENV_SYS_STRERROR, use configure checks instead 2016-01-21 00:02:22 +01:00
Olaf Seibert
8d683650f7 Let configure check for Large File Support 2016-01-20 23:10:42 +01:00
Olaf Seibert
0ac7cd4cdb Attempt a replacement for pcap_set_immediate_mode() if missing. 2016-01-20 20:17:31 +01:00
Olaf Seibert
334719e73a Make it build on MacOS X.
I only compile-tested it, I didn't run it.
The main effect is to make hardware tape support ~optional, since OSX
has no <sys/mtio.h>.
2016-01-20 17:51:31 +01:00
Olaf Seibert
2ac5184ff2 Add a configure script and remove a tangle of frail #if conditions
This only uses autoconf, not automake or libtool or intltool or whatever.
This also allows easy building of different emulators in different build directories.

I have tested TOPS-20 with pcap|tap+bridge, ITS with pcap|tun|tap+bridge, both on NetBSD and Linux
and hopefully everything still works after the fine-tuning.
2016-01-19 23:41:49 +01:00
Olaf Seibert
9312579251 clang-suggested changes, mostly wrt -Wparentheses
warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
2016-01-11 00:24:46 +01:00
Olaf Seibert
1105dd0c69 Build on FreeBSD 10.2.
Not tested further.
2016-01-10 23:40:37 +01:00
Olaf Seibert
447155ef02 Remove bridge creating code for Linux, since it's useless.
If $KLH_NET_BRIDGE is set, does bridge it to that bridge.
Use $KLH_NET_DEFAULT_IF as default interface, if given.
2016-01-10 22:54:03 +01:00
Olaf Seibert
e23aaab39a Add a few dependencies. 2016-01-08 01:12:33 +01:00
Olaf Seibert
10023a5e18 Added Linux tap+bridge, plus other cleanups.
However it turns out that Linux bridges are useless, since they freeze
the network when they are actually used (see http://www.microhowto.info/troubleshooting/troubleshooting_ethernet_bridging_on_linux.html#idp86992 )
"The machine appears to freeze
As noted above, adding an interface to a bridge causes it to
stop acting as an Internet Protocol endpoint. This could result
in the machine appearing to freeze.

"The underlying issue is that when an interface is attached to
a bridge then any network addresses need to be bound to the
bridge, not to the interface."

That makes them useless to configure temporarily without disturbing
the rest of the network traffic.
2016-01-08 01:11:43 +01:00
Olaf Seibert
01dffdb412 Small cleanups. 2016-01-07 20:38:22 +01:00
Olaf Seibert
41d8c908b9 Add some IMP usage hints in config file. 2016-01-06 00:53:44 +01:00
Olaf Seibert
ff6747d034 Intermediate state.
Tested with ITS and ifmeth=pcap, tun, and tap+bridge.
2016-01-06 00:52:37 +01:00
Olaf Seibert
6f1f3b4758 Add some NI20 usage hints in config file. 2016-01-05 22:53:27 +01:00
Olaf Seibert
d23813a1dd Intermediate state.
Tested with NetBSD host and TOPS-20 guest only: ifmeth=pcap and ifmeth=tap+bridge work.
Not tested wit ITS guest or Linux host.
Not cleaned up.
2016-01-03 17:07:58 +01:00
Olaf Seibert
3586d96356 Small changes in helper files. 2016-01-03 17:02:46 +01:00
Olaf Seibert
f6eed67799 Use ea_set(). 2015-12-30 17:29:10 +01:00
Olaf Seibert
aa498e3e1f Actually copy name. 2015-12-30 17:28:49 +01:00
Olaf Seibert
9aee94ee3d Avoid crash if an interface has no addresses. 2015-12-22 22:35:07 +01:00
Olaf Seibert
f7761c466a Add ifmeth=string as parameter for NI20 and IMP. 2015-12-22 21:03:27 +01:00
Olaf Seibert
27c1e41d9c Remove even more DPLI stuff. 2015-12-22 18:14:52 +01:00
Olaf Seibert
77aa001e3f Remove lots of now-unneeded code. 2015-12-22 18:06:27 +01:00
Olaf Seibert
89be604190 Add libpcap for receiving and sending ethernet frames.
The goal is to retire KLH10_NET_BPF, _PFLT, _DLPI and _LNX as much as possible.
However where ethernet addresses are manipulated, such operating system dependent methods still need to be used, since libpcap does not handle that.

Code for the other packet filters is still included but most likely does not work.
To use the new code, add -DKLH10_NET_PCAP to the Makefile(s).
2015-12-20 17:56:51 +01:00
Olaf Seibert
6bc3ecd739 Add .gitignore file. 2015-12-18 14:14:36 +01:00
Olaf Seibert
34559748e5 Remove SIOCGIFCONF in favour of getifaddrs(3) or pcap_findalldevs(3).
Use the result from those functions in preference to looking it up again.
Looking up of ethernet addresses remains unportable.
2015-12-18 14:06:28 +01:00
Olaf Seibert
79658f9bf8 Compiler suggested cleanups (mostly declarations). 2015-12-16 00:52:52 +01:00
Olaf Seibert
639a0cbe4e Eliminate essentially unused fields
ife_pinet, ife_plink and ife_pother.
2015-12-15 20:33:43 +01:00
Olaf Seibert
0f3d110a2d dvtm03.patch Avoid incorrect "offline" message when mounting tape on TOPS-20 the first time.
from http://home.comcast.net/~mmcm/klh10/dvtm03.patch
2015-07-28 23:46:27 +02:00
Olaf Seibert
bb543c2994 Fix confusing typo in ini file
(if one wants to keep track of which installations are configured for
which IP addresses)
2015-07-28 23:42:32 +02:00
Olaf Seibert
37cbb5150b Merge branch 'mmcm-tuntap' because it didn't break on NetBSD. 2015-07-27 23:06:42 +02:00
Olaf Seibert
60a4cd1c9a Just a newline on the quit [confirm] prompt should not quit.
That is just too easy to type by accident. Only accept y, Y and EOF
(EOF for when there is an error).
2015-07-22 01:22:28 +02:00
Olaf Seibert
c9f494a3df EOF on the prompt should not loop infinitely 2015-07-22 01:20:34 +02:00
Olaf Seibert
75c47c9842 Rename the build executable for ITS to kn10-ks-its.
That should hopefully make it easier to install all versions in parallel
in the same directory, with less duplication.
2015-07-22 00:31:27 +02:00
Olaf Seibert
6cb2d40e2b Remove patch file. 2015-07-22 00:07:32 +02:00
Olaf Seibert
bdd48c5ea5 Move -DKLH10_NET_TUN=1 from 00build into Makefiles. 2015-07-22 00:06:14 +02:00
Olaf Seibert
13ec237e67 Merge branch 'master' into mmcm-tuntap
Merged these small conflicts:
	src/dpni20.c
	src/osdnet.c
	src/osdnet.h
Compile-tested on NetBSD and Linux, but not run-tested.
2015-07-22 00:02:26 +02:00
Olaf Seibert
0fdbb8f017 Patch applied. No conflicts.
klh10$ patch -p1 <tuntap.patch
Hmm...  Looks like a new-style context diff to me...
The text leading up to this was:
--------------------------
|*** klh10-2.0h/bld/lnx86/00build       2005-02-22 02:47:02.000000000
|-0500
|--- klh10-2.0i/bld/lnx86/00build       2005-09-10 01:05:48.000000000
|-0400
--------------------------
Patching file bld/lnx86/00build using Plan A...
Hunk #1 succeeded at 1.
Hmm...  The next patch looks like a new-style context diff to me...
The text leading up to this was:
--------------------------
|*** klh10-2.0h/src/dpimp.c     2003-02-23 13:07:35.000000000 -0500
|--- klh10-2.0i/src/dpimp.c     2005-09-11 10:14:55.000000000 -0400
--------------------------
Patching file src/dpimp.c using Plan A...
Hunk #1 succeeded at 279.
Hunk #2 succeeded at 501.
Hunk #3 succeeded at 563.
Hunk #4 succeeded at 573.
Hunk #5 succeeded at 637.
Hunk #6 succeeded at 695.
Hunk #7 succeeded at 709.
Hunk #8 succeeded at 1755.
Hmm...  The next patch looks like a new-style context diff to me...
The text leading up to this was:
--------------------------
|*** klh10-2.0h/src/dpimp.h     2001-11-19 05:45:49.000000000 -0500
|--- klh10-2.0i/src/dpimp.h     2005-08-16 20:05:22.000000000 -0400
--------------------------
Patching file src/dpimp.h using Plan A...
Hunk #1 succeeded at 106.
Hmm...  The next patch looks like a new-style context diff to me...
The text leading up to this was:
--------------------------
|*** klh10-2.0h/src/dpni20.c    2003-02-23 13:07:50.000000000 -0500
|--- klh10-2.0i/src/dpni20.c    2005-09-09 20:50:47.000000000 -0400
--------------------------
Patching file src/dpni20.c using Plan A...
Hunk #1 succeeded at 177.
Hunk #2 succeeded at 388.
Hunk #3 succeeded at 456.
Hunk #4 succeeded at 491.
Hunk #5 succeeded at 506.
Hunk #6 succeeded at 1463.
Hunk #7 succeeded at 1531.
Hunk #8 succeeded at 1543.
Hmm...  The next patch looks like a new-style context diff to me...
The text leading up to this was:
--------------------------
|*** klh10-2.0h/src/dpni20.h    2001-11-10 16:29:01.000000000 -0500
|--- klh10-2.0i/src/dpni20.h    2005-08-16 20:05:22.000000000 -0400
--------------------------
Patching file src/dpni20.h using Plan A...
Hunk #1 succeeded at 52.
Hmm...  The next patch looks like a new-style context diff to me...
The text leading up to this was:
--------------------------
|diff -r -c --exclude='*.orig' --unidirectional-new-file
|klh10-2.0h/src/dvlhdh.c klh10-2.0i/src/dvlhdh.c
|*** klh10-2.0h/src/dvlhdh.c    2001-11-19 05:47:54.000000000 -0500
|--- klh10-2.0i/src/dvlhdh.c    2005-08-16 20:05:22.000000000 -0400
--------------------------
Patching file src/dvlhdh.c using Plan A...
Hunk #1 succeeded at 103.
Hunk #2 succeeded at 172.
Hunk #3 succeeded at 303.
Hunk #4 succeeded at 1066.
Hmm...  The next patch looks like a new-style context diff to me...
The text leading up to this was:
--------------------------
|*** klh10-2.0h/src/dvni20.c    2001-11-10 16:29:03.000000000 -0500
|--- klh10-2.0i/src/dvni20.c    2005-08-16 20:05:22.000000000 -0400
--------------------------
Patching file src/dvni20.c using Plan A...
Hunk #1 succeeded at 157.
Hunk #2 succeeded at 295.
Hunk #3 succeeded at 393.
Hunk #4 succeeded at 720.
Hmm...  The next patch looks like a new-style context diff to me...
The text leading up to this was:
--------------------------
|*** klh10-2.0h/src/Makefile.mk 2005-02-22 02:16:14.000000000 -0500
|--- klh10-2.0i/src/Makefile.mk 2005-08-16 20:05:22.000000000 -0400
--------------------------
Patching file src/Makefile.mk using Plan A...
Hunk #1 succeeded at 302.
Hmm...  The next patch looks like a new-style context diff to me...
The text leading up to this was:
--------------------------
|*** klh10-2.0h/src/osdnet.c    2005-04-28 18:01:04.000000000 -0400
|--- klh10-2.0i/src/osdnet.c    2005-09-11 11:12:41.000000000 -0400
--------------------------
Patching file src/osdnet.c using Plan A...
Hunk #1 succeeded at 812.
Hunk #2 succeeded at 1131.
Hunk #3 succeeded at 1162.
Hunk #4 succeeded at 1225.
Hunk #5 succeeded at 1616.
Hunk #6 succeeded at 1633.
Hunk #7 succeeded at 1691.
Hunk #8 succeeded at 1721.
Hunk #9 succeeded at 1817.
Hmm...  The next patch looks like a new-style context diff to me...
The text leading up to this was:
--------------------------
|*** klh10-2.0h/src/osdnet.h    2001-11-19 05:34:01.000000000 -0500
|--- klh10-2.0i/src/osdnet.h    2005-08-16 20:05:22.000000000 -0400
--------------------------
Patching file src/osdnet.h using Plan A...
Hunk #1 succeeded at 69.
Hunk #2 succeeded at 146.
Hunk #3 succeeded at 382.
done
klh10$
2015-07-21 23:37:45 +02:00
Olaf Seibert
fcd51e4ce0 Add MMcM's Linux tun/tap patch file
via http://victor.se/bjorn/its/
from http://home.comcast.net/~mmcm/klh10/tuntap.patch
2015-07-21 23:33:58 +02:00
Olaf Seibert
23378e1e9b Slightly update build instructions. 2015-07-19 16:18:35 +02:00
Olaf Seibert
06caf9770d Add a Linux AXP target (also usable for amd64 aka x86_64 hosts)
so that the USEINT memory model can be used, rather than the USEHWD model
that gets used for 32-bit i386.
2015-07-19 15:56:09 +02:00
Olaf Seibert
b03241657d Add two helper scripts to put xterms in a nice mood for ITS. 2015-07-18 03:14:59 +02:00
Olaf Seibert
6c0cbe0f91 Improve comment. 2015-07-18 02:40:46 +02:00
Olaf Seibert
800d799b34 Fix usage printing. 2015-07-18 02:21:37 +02:00
Olaf Seibert
dafe65141a Make sure printf() arguments are of the right size.
Apparently they have a different size on Linux.
2015-07-18 02:21:14 +02:00
Olaf Seibert
4a29858bbf Remove extra arguments to printf().
These are presumably block numbers but they get printed earlier anyway.
2015-07-18 02:20:29 +02:00
Olaf Seibert
5365b5845a Conditionalize a debug message that doesn't compile on Linux. 2015-07-18 02:18:43 +02:00
Olaf Seibert
c948e8efff <asm/io.h> moved to <sys/io.h>. 2015-07-18 02:18:05 +02:00