1
0
mirror of https://github.com/PDP-10/its.git synced 2026-03-20 08:28:43 +00:00

WIP: Make gateway configurable.

This commit is contained in:
Adam Sampson
2018-08-16 21:09:46 +01:00
parent d5ef8b01fe
commit 190ffa27bd
4 changed files with 11 additions and 7 deletions

View File

@@ -110,7 +110,9 @@ $(OUT)/system/$(ITSCONFIG): build/$(EMULATOR)/$(ITSCONFIG)
cp=0; ca=0; \
$(TEST) $(CHAOS) != no && cp=1 && ca=$(CHAOS); \
x=`echo $(IP) | tr . ,`; \
g=`echo $(GW) | tr . ,`; \
$(SED) -e "s/%IP%/$$x/" \
-e "s/%GW%/$$g/" \
-e 's/%NETMASK%/$(NETMASK)/' \
-e "s/%CHAOSP%/$$cp/" \
-e "s/%CHAOSA%/$$ca/" < $< > $@

View File

@@ -830,6 +830,7 @@ DEFVKS ; Now uses standard virtual KS10 config
DEFOPT IMPUS==236. ; IMP net host number (old-style) (206 octal)
DEFOPT IMPUS3==<IPADDR 192,168,0,236> ; IP address
DEFOPT NM%IMP==<IPADDR 255,255,255,0> ; Subnet mask
DEFOPT GW%IMP==<IPADDR 139,185,5,1> ; Default gateway
DEFINE ITSIRP BODY ; No local companions
IRPS ITS,,[NX]
@@ -985,8 +986,10 @@ DEFSYM PMRCM==001777 ;2.1 - 1.1 Physical page number
; addresses.)
DEFSYM PMUNSD==146000 ;Unused bits
;FIXME maybe US%ETH as per others below?
DEFOPT ETHUS==<IPADDR %IP%> ; IP address
DEFOPT NM%ETH==<IPADDR %NETMASK%> ; Subnet mask
DEFOPT GW%ETH==<IPADDR %GW%> ; Default gateway
DEFOPT PKTTRC==-1 ;Packet tracing code enabled
DEFINE ITSIRP BODY

View File

@@ -237,7 +237,7 @@ ETHRX5: POP P,H
;A contains datagram struct.
;Clobbers A, B.
;
ETHTXI:
IPKSNE:
PUSH P,C
PUSH P,D
PUSH P,E

View File

@@ -1270,7 +1270,7 @@ IFN .-NIFIPN-NNIFS, .ERR Wrong size table - NIFIPN
NIFIPO: ; IP Output routine for network interface
IFN IMPP, IPKSNA ; Send IP dgm to IMP output
IFN CHAOSP, IPKSNC ; Send IP dgm to Chaos, may fragment
IFN ETHERP, ETHTXI ; Send IP dgm to Ethernet, may fragment
IFN ETHERP, IPKSNE ; Send IP dgm to Ethernet, may fragment
IFN .-NIFIPO-NNIFS, .ERR Wrong size table - NIFIPO
;NIFNAM: ; Interface name (in case of PEEKing someday?)
@@ -1309,10 +1309,7 @@ TERMIN
; Now define the prime & permanent gateways.
; Someday this really ought to be configurable either in CONFIG
; at assembly time, or from a file at runtime.
IFE ITSMCH-SIXBIT/NX/,[
GWDEF 0,<HOSTN 139,185,5,1>,IPKSNA ; NPD cisco router, use for all.
NIPMGW==NIPPGW ; Number of prime gateways
].ELSE [
IFN 0,[ ; Old MIT config disabled
IFN IMPP,[
IFE IPUNCP,[
GWDEF NW%LCS,<HOSTN 10,0,0,77>,IPKSNA ; MIT-GW
@@ -1325,8 +1322,10 @@ IFN IPUNCP,[
GWDEF NW%AI, <HOSTN 128,31,6,2>,IPKSNC ; ???
] ;IFN IPUNCP
] ;IFN CHAOSP
]
IFDEF GW%IMP, GWDEF 0,GW%IMP,IPKSNA ; Default gateway via IMP
IFDEF GW%ETH, GWDEF 0,GW%ETH,IPKSNE ; Default gateway via Ethernet
NIPMGW==NIPPGW ; Number of prime gateways
] ; IF NOT NX
BBLK