diff --git a/Makefile b/Makefile index aefaeed2..4ca453ed 100644 --- a/Makefile +++ b/Makefile @@ -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/" < $< > $@ diff --git a/build/simh/config.202 b/build/simh/config.202 index 10b21820..829546af 100644 --- a/build/simh/config.202 +++ b/build/simh/config.202 @@ -830,6 +830,7 @@ DEFVKS ; Now uses standard virtual KS10 config DEFOPT IMPUS==236. ; IMP net host number (old-style) (206 octal) DEFOPT IMPUS3== ; IP address DEFOPT NM%IMP== ; Subnet mask +DEFOPT GW%IMP== ; 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== ; IP address DEFOPT NM%ETH== ; Subnet mask +DEFOPT GW%ETH== ; Default gateway DEFOPT PKTTRC==-1 ;Packet tracing code enabled DEFINE ITSIRP BODY diff --git a/src/system/ether.1 b/src/system/ether.1 index 28f1b8d8..8a055cea 100644 --- a/src/system/ether.1 +++ b/src/system/ether.1 @@ -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 diff --git a/src/system/inet.139 b/src/system/inet.139 index 9984d87e..98dcb054 100644 --- a/src/system/inet.139 +++ b/src/system/inet.139 @@ -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,,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,,IPKSNA ; MIT-GW @@ -1325,8 +1322,10 @@ IFN IPUNCP,[ GWDEF NW%AI, ,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