mirror of
https://github.com/PDP-10/its.git
synced 2026-02-26 17:03:20 +00:00
Make IP address configurable.
This commit is contained in:
committed by
Eric Swenson
parent
7d7cbc37de
commit
937387b853
2
.gitignore
vendored
2
.gitignore
vendored
@@ -2,5 +2,7 @@
|
||||
/out
|
||||
/start
|
||||
/build/*/stamp
|
||||
/build/klh10/dskdmp.ini
|
||||
/src/system/config.*
|
||||
/src/syshst/h3text.*
|
||||
/user/*/*
|
||||
|
||||
26
Makefile
26
Makefile
@@ -1,4 +1,7 @@
|
||||
EMULATOR ?= simh
|
||||
IP=192.168.1.100
|
||||
GW=192.168.0.45
|
||||
NETMASK=255,255,255,248
|
||||
|
||||
# The directores listed in SRC, DOC, and BIN are put on the sources tape.
|
||||
SRC = system syseng sysen1 sysen2 sysen3 sysnet kshack dragon channa \
|
||||
@@ -24,16 +27,14 @@ WRITETAPE=${PWD}/tools/tapeutils/tapewrite
|
||||
all: out/rp0.dsk tools/supdup/supdup
|
||||
|
||||
out/rp0.dsk: build/simh/init out/minsys.tape out/salv.tape out/dskdmp.tape build/build.tcl out/sources.tape build/$(EMULATOR)/stamp
|
||||
PATH=${PWD}/tools/simh/BIN:$$PATH expect -f build/$(EMULATOR)/build.tcl
|
||||
PATH=${PWD}/tools/simh/BIN:$$PATH expect -f build/$(EMULATOR)/build.tcl $(IP) $(GW)
|
||||
|
||||
out/minsys.tape: $(ITSTAR)
|
||||
mkdir -p out
|
||||
cd bin; $(ITSTAR) -cf ../$@ $(MINSYS)
|
||||
|
||||
out/sources.tape: $(ITSTAR)
|
||||
out/sources.tape: $(ITSTAR) build/$(EMULATOR)/stamp src/syshst/h3text.2012
|
||||
mkdir -p out
|
||||
rm -f src/system/config.*
|
||||
cp build/$(EMULATOR)/config.* src/system
|
||||
rm -f src/*/*~
|
||||
cd src; $(ITSTAR) -cf ../$@ $(SRC)
|
||||
cd doc; $(ITSTAR) -rf ../$@ $(DOC)
|
||||
@@ -48,18 +49,23 @@ out/dskdmp.tape: $(WRITETAPE) $(RAM) $(DSKDMP)
|
||||
mkdir -p out
|
||||
$(WRITETAPE) -n 2560 $@ $(RAM) $(DSKDMP)
|
||||
|
||||
build/$(EMULATOR)/stamp: start
|
||||
touch $@
|
||||
|
||||
start: build/$(EMULATOR)/start
|
||||
ln -s $< $*
|
||||
|
||||
build/klh10/stamp: $(KLH10)
|
||||
build/klh10/stamp: $(KLH10) start build/klh10/dskdmp.ini
|
||||
x=`echo $(IP) | tr . ,`; sed -e "s/%IP%/$$x/" -e 's/%NETMASK%/$(NETMASK)/' < build/klh10/config.203 > src/system/config.203
|
||||
touch $@
|
||||
|
||||
build/simh/stamp: $(SIMH)
|
||||
build/simh/stamp: $(SIMH) start
|
||||
cp build/simh/config.* src/system
|
||||
touch $@
|
||||
|
||||
build/klh10/dskdmp.ini: build/klh10/dskdmp.txt Makefile
|
||||
sed -e 's/%IP%/$(IP)/' -e 's/%GW%/$(GW)/' < $< > $@
|
||||
|
||||
src/syshst/h3text.2012: build/h3text.2012
|
||||
sed -e 's/%IP%/$(IP)/' < $< > $@
|
||||
|
||||
$(KLH10):
|
||||
cd tools/klh10; \
|
||||
./autogen.sh; \
|
||||
@@ -83,4 +89,4 @@ tools/supdup/supdup:
|
||||
cd tools/supdup; make
|
||||
|
||||
clean:
|
||||
rm -rf out start build/*/stamp
|
||||
rm -rf out start build/*/stamp src/system/config.* src/syshst/h3text.*
|
||||
|
||||
12
README.md
12
README.md
@@ -269,12 +269,6 @@ matches the address configured in SYSTEM; CONFIG > (as IMPUS3). Finally,
|
||||
the HOST table source (SYSHST; H3TEXT >) and binary (SYSBIN; HOSTS3 >)
|
||||
defined a host called DB-ITS.EXAMPLE.COM at the IP address 192.168.1.100.
|
||||
|
||||
In order to change the IP address of the host, you must update multiple
|
||||
places and rebuild ITS and the host table. You will also have to modify
|
||||
dskdmp.ini. Here are the places where the IP address is configured (and all
|
||||
of these must agree):
|
||||
|
||||
dskdmp.ini (in build/klh10 directory on the host)
|
||||
SYSTEM; CONFIG > (ITS configuration file)
|
||||
SYSHST; H3TEXT > (host table source file)
|
||||
SYSBIN; HOSTS3 > (binary file compiled from SYSHST; H3TEXT >)
|
||||
In order to change the IP address of the host, you can edit the
|
||||
top-level Makefile variables IP, GW, and NETMASK. After that, a full
|
||||
rebuild (e.g. `make clean all`) is required.
|
||||
|
||||
@@ -67,9 +67,21 @@ proc shutdown {} {
|
||||
respond "NOW IN DDT" $emulator_escape
|
||||
}
|
||||
|
||||
proc ip_address {string} {
|
||||
set x 0
|
||||
set octets [lreverse [split $string .]]
|
||||
for {set i 0} {$i < 4} {incr i} {
|
||||
incr x [expr {256 ** $i * [lindex $octets $i]}]
|
||||
}
|
||||
format "%o" $x
|
||||
}
|
||||
|
||||
set timeout 100
|
||||
expect_before timeout abort
|
||||
|
||||
set ip [ip_address [lindex $argv 0]]
|
||||
set gw [ip_address [lindex $argv 1]]
|
||||
|
||||
start_nsalv
|
||||
|
||||
respond "\n" "mark\033g"
|
||||
@@ -644,9 +656,9 @@ expect ":KILL"
|
||||
|
||||
respond "*" "comsat\033j"
|
||||
respond "*" "\033l.mail.;comsat bin\r"
|
||||
respond "*" "bughst/<<192.\033_24.>+<168.\033_16.>+<1.\033_8.>+100.>\r"
|
||||
type "domgat/<<192.\033_24.>+<168.\033_16.>+<0.\033_8.>+45.>\r"
|
||||
type "tcpgat/<<192.\033_24.>+<168.\033_16.>+<0.\033_8.>+45.>\r"
|
||||
respond "*" "bughst/$ip\r"
|
||||
type "domgat/$gw\r"
|
||||
type "tcpgat/$gw\r"
|
||||
type "debug/0\r"
|
||||
type "xvers/0\r"
|
||||
type "purify\033g"
|
||||
|
||||
@@ -178,6 +178,6 @@ HOST : 36.21.0.103 : Hamlet.Stanford.EDU,LOTSC : DEC-2060 : TOPS20 : :
|
||||
|
||||
;;; KLH: All of the rest of this stuff was flushed... see older versions
|
||||
;;; of H3TEXT for the cruft.
|
||||
HOST : 192.168.1.100 : DB-ITS.EXAMPLE.COM : Linux : Linux : :
|
||||
HOST : %IP% : DB-ITS.EXAMPLE.COM : Linux : Linux : :
|
||||
|
||||
|
||||
@@ -986,8 +986,8 @@ DEFSYM PMRCM==001777 ;2.1 - 1.1 Physical page number
|
||||
DEFSYM PMUNSD==146000 ;Unused bits
|
||||
|
||||
DEFOPT IMPUS==100. ; IMP net host number (old-style) (100 octal)
|
||||
DEFOPT IMPUS3==<IPADDR 192,168,1,100> ; IP address
|
||||
DEFOPT NM%IMP==<IPADDR 255,255,255,248> ; Subnet mask
|
||||
DEFOPT IMPUS3==<IPADDR %IP%> ; IP address
|
||||
DEFOPT NM%IMP==<IPADDR %NETMASK%> ; Subnet mask
|
||||
DEFOPT PKTTRC==-1 ;Packet tracing code enabled
|
||||
|
||||
DEFINE ITSIRP BODY
|
||||
|
||||
@@ -15,7 +15,7 @@ devdef mta0 rh1.0 tm02 fmtr=tm03 type=tu45
|
||||
set clk_ithzfix=60
|
||||
|
||||
; Define IMP for PI on ITS.JOSS.COM
|
||||
devdef imp ub3 lhdh addr=767600 br=6 vec=250 ipaddr=192.168.1.100 gwaddr=192.168.0.45
|
||||
devdef imp ub3 lhdh addr=767600 br=6 vec=250 ipaddr=%IP% gwaddr=%GW%
|
||||
|
||||
; Dummy definitions. Only one DZ is still (apparently) needed.
|
||||
devdef dz0 ub3 dz11 addr=760010 br=5 vec=340
|
||||
Reference in New Issue
Block a user