A2osX/BIN/IPCONFIG.S.txt

564 lines
12 KiB
Plaintext
Raw Normal View History

NEW
2019-12-11 13:14:56 +00:00
AUTO 3,1
.LIST OFF
.OP 65C02
.OR $2000
2019-12-11 13:14:56 +00:00
.TF bin/ipconfig
*--------------------------------------
2020-08-09 19:47:42 +00:00
.INB inc/macros.i
.INB inc/a2osx.i
.INB inc/kernel.i
.INB inc/mli.e.i
.INB inc/nic.i
.INB inc/eth.i
.INB inc/lib.net.i
.INB inc/libtcpip.i
.INB inc/net.tcpip.i
2020-08-09 19:47:42 +00:00
.INB inc/net.dhcp.i
2019-01-05 20:33:08 +00:00
*--------------------------------------
TIMEOUT.MAX .EQ 200 20 sec.
*--------------------------------------
2018-12-06 16:39:53 +00:00
.DUMMY
.OR ZPBIN
ZS.START
pIPCFG .BS 2
2019-01-05 20:33:08 +00:00
ZPTmpPtr1 .BS 2
ZPTmpPtr2 .BS 2
ZPTmpPtr3 .BS 2
2020-08-09 19:47:42 +00:00
ArgIndex .BS 1
TimeOut .BS 1
hSocket .BS 1
hFrame .BS 1
ZPFrameBase .BS 2
ZPFramePtr .BS 2
RetryCount .BS 1
2020-08-09 19:47:42 +00:00
bDHCP .BS 1
bETC .BS 1
bSET .BS 1
CFG.hBuf1 .BS 1
CFG.hBuf2 .BS 1
CFG.hBuf3 .BS 1
CFG.hCfgFile .BS 1
ZS.END .ED
*--------------------------------------
* File Header (16 Bytes)
*--------------------------------------
CS.START cld
jmp (.1,x)
.DA #$61 6502,Level 1 (65c02)
.DA #1 BIN Layout Version 1
2019-01-15 16:37:32 +00:00
.DA #S.PS.F.EVENT
.DA #0
.DA CS.END-CS.START Code Size (without Constants)
2019-07-22 06:31:01 +00:00
.DA DS.END-DS.START Data Segment Size
.DA #64 Stack Size
2018-12-06 16:39:53 +00:00
.DA #ZS.END-ZS.START Zero Page Size
.DA 0
*--------------------------------------
* Relocation Table
2019-10-03 06:25:27 +00:00
*--------------------------------------
.1 .DA CS.INIT
.DA CS.RUN
.DA CS.DOEVENT
.DA CS.QUIT
L.LIBTCPIP .DA LIBTCPIP
2018-12-06 16:39:53 +00:00
L.MSG.USAGE .DA MSG.USAGE
2019-01-14 16:37:56 +00:00
L.MSG.NODEV .DA MSG.NODEV
L.MSG1.DEV .DA MSG1.DEV
L.MSG1.DEV.ARP .DA MSG1.DEV.ARP
2016-04-18 20:17:28 +00:00
L.MSG1.DEV.IP .DA MSG1.DEV.IP
L.MSG1.LINK.OK .DA MSG1.LINK.OK
L.MSG1.LINK.KO .DA MSG1.LINK.KO
L.MSG1.LINKSPEED .DA MSG1.LINKSPEED
L.MSG1.DPLX.FD .DA MSG1.DPLX.FD
L.MSG1.DPLX.HD .DA MSG1.DPLX.HD
L.MSG2 .DA MSG2
L.MSG2.C .DA MSG2.C
L.MSG2.U .DA MSG2.U
L.MSG2.DHCPSRVR .DA MSG2.DHCPSRVR
2020-02-14 07:21:56 +00:00
L.MSG2.IPMASK .DA MSG2.IPMASK
L.MSG2.GW .DA MSG2.GW
L.MSG2.DNS .DA MSG2.DNS
L.MSG2.HOSTNAME .DA MSG2.HOSTNAME
2018-12-06 16:39:53 +00:00
L.MSG.CFG .DA MSG.CFG
L.MSG.CFG.KO .DA MSG.CFG.KO
L.MSG.CFG.OK .DA MSG.CFG.OK
L.HOSTNAME .DA HOSTNAME
L.TCPIP.CONF .DA TCPIP.CONF
L.HOSTS .DA HOSTS
2019-01-05 20:33:08 +00:00
L.IPCFG .DA IPCFG
2019-01-15 16:37:32 +00:00
L.IPCFG.HOSTNAME .DA IPCFG+S.IPCFG.HOSTNAME
2019-01-16 14:37:21 +00:00
L.IPCFG.DOMAIN .DA IPCFG+S.IPCFG.DOMAIN
2019-01-05 20:33:08 +00:00
L.CFG.IP .DA CFG.IP
2019-01-15 16:37:32 +00:00
L.CFG.IP.SScanF .DA CFG.IP.SScanF
L.CFG.HOST.SScanF .DA CFG.HOST.SScanF
2019-01-14 16:37:56 +00:00
L.CFG.DefaultHost .DA CFG.DefaultHost
2019-01-05 20:33:08 +00:00
L.CFG.Keywords .DA CFG.Keywords
J.CFG.Keywords .DA CFG.Read.address
.DA CFG.Read.netmask
.DA CFG.Read.gateway
.DA CFG.Read.nameserver
.DA CFG.Read.dnsdomain
*--------------------------------------
2019-01-05 20:33:08 +00:00
* DHCP
*--------------------------------------
L.SA.LOCAL .DA SA.LOCAL
L.SA.REMOTE .DA SA.REMOTE
2019-07-07 20:48:57 +00:00
L.SA.DEST .DA SA.DEST
2019-01-05 20:33:08 +00:00
L.MSG.DHCP.CFG1 .DA MSG.DHCP.CFG1
L.MSG.DHCP.CFG2 .DA MSG.DHCP.CFG2
L.MSG.DHCP.KO .DA MSG.DHCP.KO
L.MSG.DHCP.OK .DA MSG.DHCP.OK
L.MSG.DHCP.NA .DA MSG.DHCP.NA
L.DHCP.DISC .DA DHCP.DISC
L.DHCP.REQ .DA DHCP.REQ
2019-01-14 16:37:56 +00:00
.DA 0
2019-01-05 20:33:08 +00:00
*--------------------------------------
CS.INIT >LDYA L.LIBTCPIP
2018-07-19 15:33:55 +00:00
>SYSCALL LoadLib
bcs .9
sta hLIBTCPIP
2018-11-09 13:29:23 +00:00
.9 rts
*--------------------------------------
2019-01-14 16:37:56 +00:00
CS.RUN >LIBCALL hLIBTCPIP,LIBTCPIP.GETCFG
>STYA pIPCFG
2019-01-16 14:37:21 +00:00
ldy #S.IPCFG-1
2021-06-30 19:09:07 +00:00
2019-01-16 14:37:21 +00:00
.1 lda (pIPCFG),y
sta IPCFG,y
dey
bpl .1
2019-01-17 15:05:48 +00:00
lda IPCFG+S.NETCFG.DevID
2019-01-16 14:37:21 +00:00
bne CS.RUN.SETUP
2021-06-30 19:09:07 +00:00
2019-01-14 16:37:56 +00:00
>LDYA L.MSG.NODEV
2020-02-28 07:21:46 +00:00
>SYSCALL PutS
2021-06-30 19:09:07 +00:00
2019-01-14 16:37:56 +00:00
lda #MLI.E.NODEV
sec
rts
2021-06-30 19:09:07 +00:00
*--------------------------------------
2021-05-19 12:44:47 +00:00
CS.RUN.SETUP
2020-08-09 19:47:42 +00:00
.1 inc ArgIndex
lda ArgIndex
2018-12-06 16:39:53 +00:00
>SYSCALL ArgV
2019-01-14 16:37:56 +00:00
bcs .4
2019-01-15 16:37:32 +00:00
>STYA ZPTmpPtr1
lda (ZPTmpPtr1)
2018-12-06 16:39:53 +00:00
cmp #'-'
bne .99
2021-05-19 12:44:47 +00:00
ldy #1
2019-01-15 16:37:32 +00:00
lda (ZPTmpPtr1),y
2018-12-06 16:39:53 +00:00
ldx #OptionVars-OptionList-1
2021-05-19 12:44:47 +00:00
2018-12-06 16:39:53 +00:00
.2 cmp OptionList,x
beq .3
2021-05-19 12:44:47 +00:00
2018-12-06 16:39:53 +00:00
dex
bpl .2
2020-02-14 07:21:56 +00:00
.99 >PUSHW L.MSG.USAGE
>PUSHBI 0
2020-02-28 07:21:46 +00:00
>SYSCALL PrintF
2018-12-06 16:39:53 +00:00
lda #E.SYN
sec
rts
.3 ldy OptionVars,x
2020-08-09 19:47:42 +00:00
lda #$ff
sta $0,y
2018-12-06 16:39:53 +00:00
bra .1
*--------------------------------------
2020-08-09 19:47:42 +00:00
.4 lda bSET
bne .41 Force ...
2018-12-06 16:39:53 +00:00
lda IPCFG+S.NETCFG.STATUS
2019-01-16 14:37:21 +00:00
bne .5
.41 lda #$ff no config, force all
2020-08-09 19:47:42 +00:00
sta bETC
sta bDHCP
2020-08-09 19:47:42 +00:00
.5 lda bETC
ora bDHCP
2019-01-16 14:37:21 +00:00
beq CS.RUN.DUMP
2020-08-09 19:47:42 +00:00
lda bETC
2019-01-15 16:37:32 +00:00
bpl .6
2021-06-30 19:09:07 +00:00
2020-09-03 15:19:25 +00:00
jsr ETC.ReadFiles
2020-08-09 19:47:42 +00:00
.6 lda bDHCP
2019-01-15 16:37:32 +00:00
bpl .8
2019-01-16 14:37:21 +00:00
2019-01-15 16:37:32 +00:00
jsr DHCP.INIT
bcs .8
2019-01-15 07:36:21 +00:00
2019-01-15 16:37:32 +00:00
jsr DHCP.RUN
2019-01-15 07:36:21 +00:00
2019-01-15 16:37:32 +00:00
jsr DHCP.QUIT
2019-01-15 07:36:21 +00:00
2019-01-17 15:05:48 +00:00
.8 lda #0
2019-01-16 14:37:21 +00:00
sec
CS.RUN.SETUP.RTS
2019-01-16 14:37:21 +00:00
rts
*--------------------------------------
CS.RUN.DUMP >LEA.G DCB.NIC
ldx #S.IOCTL.S.GETDCB
jsr CS.RUN.IOCTL
bcs CS.RUN.SETUP.RTS
2018-07-23 15:28:42 +00:00
>LEA.G DIB
ldx #S.IOCTL.S.GETDIB
jsr CS.RUN.IOCTL
bcs CS.RUN.SETUP.RTS
2020-02-14 07:21:56 +00:00
CS.RUN.DUMPNIC >PUSHW L.MSG1.DEV
lda IPCFG+S.NETCFG.DevID
>PUSHA
2019-01-14 20:34:37 +00:00
2021-07-24 20:42:23 +00:00
>SYSCALL GetMemPtr
pha
tya
2019-01-14 07:11:50 +00:00
clc
adc #S.FD.DEV
tay
2021-07-24 20:42:23 +00:00
pla
2019-01-14 07:11:50 +00:00
adc /S.FD.DEV
>PUSHYA
2020-02-14 07:21:56 +00:00
2021-05-19 12:44:47 +00:00
>PUSHEA.G DIB+S.DIB.IDS
2020-02-14 07:21:56 +00:00
ldy #DCB.NIC+S.DCB.NIC.MAC
ldx #6
2021-06-30 19:09:07 +00:00
2020-02-14 07:21:56 +00:00
.1 lda (pData),y
2019-01-14 07:11:50 +00:00
>PUSHA
2020-02-14 07:21:56 +00:00
iny
2021-05-19 12:44:47 +00:00
dex
2020-02-14 07:21:56 +00:00
bne .1
2018-08-23 15:16:20 +00:00
>PUSHBI 11
2021-05-19 12:44:47 +00:00
2020-02-28 07:21:46 +00:00
>SYSCALL PrintF
2020-02-14 07:21:56 +00:00
>PUSHW L.MSG1.DEV.ARP
2021-05-19 12:44:47 +00:00
2018-10-29 08:41:10 +00:00
>LDA.G DCB.NIC+S.DCB.NIC.FLAGS
2018-07-23 15:28:42 +00:00
and #S.DCB.NIC.FLAGS.ARPOFFLOAD
beq .2
2021-06-30 19:09:07 +00:00
lda #1
2021-06-30 19:09:07 +00:00
2018-08-23 15:16:20 +00:00
.2 >PUSHA
2021-05-19 12:44:47 +00:00
>PUSHBI 1
2020-02-28 07:21:46 +00:00
>SYSCALL PrintF
2021-05-19 12:44:47 +00:00
2020-02-14 07:21:56 +00:00
>PUSHW L.MSG1.DEV.IP
2021-05-19 12:44:47 +00:00
2018-10-29 08:41:10 +00:00
>LDA.G DCB.NIC+S.DCB.NIC.FLAGS
2018-07-23 15:28:42 +00:00
and #S.DCB.NIC.FLAGS.IPOFFLOAD
2016-04-18 20:17:28 +00:00
beq .3
2018-07-23 15:28:42 +00:00
2016-04-18 20:17:28 +00:00
lda #1
2021-06-30 19:09:07 +00:00
.3 >PUSHA
2021-05-19 12:44:47 +00:00
>PUSHBI 1
2020-02-28 07:21:46 +00:00
>SYSCALL PrintF
2018-07-24 16:00:24 +00:00
2018-10-29 08:41:10 +00:00
>LDA.G DCB.NIC+S.DCB.NIC.LINK
2018-07-23 15:28:42 +00:00
and #S.DCB.NIC.LINK.OK
bne CS.RUN.LINK
2021-06-30 19:09:07 +00:00
2018-07-24 16:00:24 +00:00
>LDYA L.MSG1.LINK.KO
2020-02-28 07:21:46 +00:00
>SYSCALL PutS
bra CS.RUN.DUMPIP
2021-06-30 19:09:07 +00:00
*--------------------------------------
2018-07-24 16:00:24 +00:00
CS.RUN.LINK >LDYA L.MSG1.LINK.OK
2020-02-28 07:21:46 +00:00
>SYSCALL PutS
2021-05-19 12:44:47 +00:00
2020-02-14 07:21:56 +00:00
>PUSHW L.MSG1.LINKSPEED
2018-08-23 15:16:20 +00:00
>PUSHBI 0
2020-02-28 07:21:46 +00:00
>SYSCALL PrintF
2021-05-19 12:44:47 +00:00
2018-10-29 08:41:10 +00:00
>LDA.G DCB.NIC+S.DCB.NIC.SPEED
and #$0F
tax
2021-06-30 19:09:07 +00:00
.4 phx
lda #'0'
2018-07-18 15:30:42 +00:00
>SYSCALL PutChar
plx
dex
bne .4
2021-06-30 19:09:07 +00:00
2018-10-29 08:41:10 +00:00
>LDA.G DCB.NIC+S.DCB.NIC.LINK
2018-07-23 15:28:42 +00:00
and #S.DCB.NIC.LINK.FD
bne .5
2021-06-30 19:09:07 +00:00
>LDYA L.MSG1.DPLX.HD
bra .6
2021-06-30 19:09:07 +00:00
.5 >LDYA L.MSG1.DPLX.FD
2021-06-30 19:09:07 +00:00
2020-02-28 07:21:46 +00:00
.6 >SYSCALL PutS
2020-02-14 07:21:56 +00:00
CS.RUN.DUMPIP >PUSHW L.MSG2
>PUSHBI 0
2020-02-28 07:21:46 +00:00
>SYSCALL PrintF
2020-02-14 07:21:56 +00:00
2019-01-17 15:05:48 +00:00
lda IPCFG+S.NETCFG.STATUS
and #S.IPCFG.STATUS.OK
beq .11
2021-06-30 19:09:07 +00:00
>LDYA L.MSG2.C
bra .10
2021-06-30 19:09:07 +00:00
.11 >LDYA L.MSG2.U
2021-06-30 19:09:07 +00:00
2020-02-28 07:21:46 +00:00
.10 >SYSCALL PutS
2020-02-14 07:21:56 +00:00
>PUSHW L.MSG2.DHCPSRVR
2021-05-19 12:44:47 +00:00
2020-02-14 07:21:56 +00:00
ldx #0
2021-06-30 19:09:07 +00:00
2019-01-16 14:37:21 +00:00
.2 >PUSHB IPCFG+S.IPCFG.DHCPSRVR,x
2020-02-14 07:21:56 +00:00
inx
cpx #4
bne .2
2021-05-19 12:44:47 +00:00
2018-08-23 15:16:20 +00:00
>PUSHBI 4
2021-05-19 12:44:47 +00:00
2020-02-28 07:21:46 +00:00
>SYSCALL PrintF
2021-05-19 12:44:47 +00:00
2020-02-14 07:21:56 +00:00
>PUSHW L.MSG2.IPMASK
2021-05-19 12:44:47 +00:00
2020-02-14 07:21:56 +00:00
ldx #0 IP/MASK
2021-06-30 19:09:07 +00:00
2019-01-16 14:37:21 +00:00
.3 >PUSHB IPCFG+S.IPCFG.IP,x
2020-02-14 07:21:56 +00:00
inx
cpx #8
bne .3
2021-06-30 19:09:07 +00:00
2018-08-23 15:16:20 +00:00
>PUSHBI 8
2021-05-19 12:44:47 +00:00
2020-02-28 07:21:46 +00:00
>SYSCALL PrintF
2021-05-19 12:44:47 +00:00
2020-02-14 07:21:56 +00:00
>PUSHW L.MSG2.GW
2021-05-19 12:44:47 +00:00
2020-02-14 07:21:56 +00:00
ldx #0
2021-06-30 19:09:07 +00:00
2019-01-16 14:37:21 +00:00
.4 >PUSHB IPCFG+S.IPCFG.GW,x
2020-02-14 07:21:56 +00:00
inx
cpx #4
bne .4
2021-06-30 19:09:07 +00:00
2018-08-23 15:16:20 +00:00
>PUSHBI 4
2020-02-28 07:21:46 +00:00
>SYSCALL PrintF
2021-05-19 12:44:47 +00:00
2020-02-14 07:21:56 +00:00
>PUSHW L.MSG2.DNS
2021-05-19 12:44:47 +00:00
2020-02-14 07:21:56 +00:00
ldx #0
2021-06-30 19:09:07 +00:00
2019-01-16 14:37:21 +00:00
.5 >PUSHB IPCFG+S.IPCFG.DNS1,x
2020-02-14 07:21:56 +00:00
inx
cpx #8
bne .5
2021-06-30 19:09:07 +00:00
2018-08-23 15:16:20 +00:00
>PUSHBI 8
2021-05-19 12:44:47 +00:00
2020-02-28 07:21:46 +00:00
>SYSCALL PrintF
2021-05-19 12:44:47 +00:00
2020-02-14 07:21:56 +00:00
>PUSHW L.MSG2.HOSTNAME
2019-01-16 14:37:21 +00:00
>PUSHW L.IPCFG.HOSTNAME
2020-02-14 07:21:56 +00:00
>PUSHW L.IPCFG.DOMAIN
2021-05-19 12:44:47 +00:00
2018-08-23 15:16:20 +00:00
>PUSHBI 4
2020-02-28 07:21:46 +00:00
>SYSCALL PrintF
2021-06-30 19:09:07 +00:00
2021-05-19 12:44:47 +00:00
lda #0 tell TSKMGR that all done ok, but
sec we do not want to stay in memory
rts
*--------------------------------------
CS.RUN.IOCTL >STYA.G DEV.IOCTL+S.IOCTL.BUFPTR
txa
>STA.G DEV.IOCTL+S.IOCTL.S
>PUSHB IPCFG+S.NETCFG.DevID
>PUSHBI IOCTL.STATUS
>PUSHEA.G DEV.IOCTL
>SYSCALL IOCTL
rts
*--------------------------------------
2019-01-05 20:33:08 +00:00
CS.DOEVENT lda (pEvent)
bpl .9 is it a TIMER event?
2020-08-09 19:47:42 +00:00
lda TimeOut
2019-01-05 20:33:08 +00:00
beq .9
2020-08-09 19:47:42 +00:00
dec TimeOut
2019-01-05 20:33:08 +00:00
.9 sec do not discard TIMER event
rts
*--------------------------------------
CS.QUIT lda hLIBTCPIP
beq .8
2020-08-09 19:47:42 +00:00
2018-07-20 14:10:10 +00:00
>SYSCALL UnloadLib
2020-08-09 19:47:42 +00:00
.8 clc
rts
2019-01-05 20:33:08 +00:00
*--------------------------------------
2020-08-09 19:47:42 +00:00
.INB usr/src/bin/ipconfig.s.dhcp
.INB usr/src/bin/ipconfig.s.etc
*--------------------------------------
CS.END
2019-12-03 15:42:17 +00:00
LIBTCPIP .AZ "libtcpip"
2019-01-14 16:37:56 +00:00
hLIBTCPIP .BS 1
*--------------------------------------
OptionList .AS "DdEeSs"
OptionVars .DA #bDHCP,#bDHCP,#bETC,#bETC,#bSET,#bSET
2018-12-06 16:39:53 +00:00
*--------------------------------------
MSG.USAGE .AS "Usage : IPCONFIG <switches>\r\n"
.AS " -D : Try to get IP address from DHCP\r\n"
.AS " -E : Read ETC files\r\n"
.AZ " -S : Set/Reset TCPIP configuration (-E, then -D if required)\r\n"
*--------------------------------------
2019-01-14 16:37:56 +00:00
MSG.NODEV .AZ "TCP/IP not bound to any device."
*--------------------------------------
MSG1.DEV .CS "NIC Device Configuration :\r\n"
.CS " Device ID : $%h\r\n"
.CS " Device Name : %s\r\n"
.CS " Device Type : %S\r\n"
.CZ " HW Address : %02h:%02h:%02h:%02h:%02h:%02h\r\n"
MSG1.DEV.ARP .CZ " ARP Offload : %d\r\n"
MSG1.DEV.IP .CS " IP Offload : %d\r\n"
.CZ " Link Status : "
MSG1.LINK.OK .CZ "OK"
MSG1.LINK.KO .CZ "Media Disconnected"
MSG1.LINKSPEED .CZ " Link Speed : 1"
MSG1.DPLX.FD .CZ " Mbit/s,Full Duplex"
MSG1.DPLX.HD .CZ " Mbit/s,Half Duplex"
*--------------------------------------
MSG2 .CZ "IP Configuration : "
MSG2.C .CZ "Configured"
MSG2.U .CZ "Not Configured"
MSG2.DHCPSRVR .CZ " DHCP Server : %d.%d.%d.%d\r\n"
MSG2.IPMASK .CZ " IP/Mask : %d.%d.%d.%d/%d.%d.%d.%d\r\n"
MSG2.GW .CZ " Gateway : %d.%d.%d.%d\r\n"
MSG2.DNS .CZ " DNS : %d.%d.%d.%d,%d.%d.%d.%d\r\n"
MSG2.HOSTNAME .CZ " Hostname : %s.%s\r\n"
*--------------------------------------
MSG.CFG .CZ "IPCONFIG:Reading %s..."
MSG.CFG.KO .CZ "Not Found. [%h]\r\n"
MSG.CFG.OK .CZ "OK."
2018-12-06 16:39:53 +00:00
*--------------------------------------
2019-12-11 13:14:56 +00:00
HOSTNAME .AZ "${ROOT}etc/hostname"
TCPIP.CONF .AZ "${ROOT}etc/tcpip.conf"
HOSTS .AZ "${ROOT}etc/hosts"
2018-12-06 16:39:53 +00:00
*--------------------------------------
2019-01-14 16:37:56 +00:00
CFG.DefaultHost .AZ "a2osx-%H"
CFG.Keywords .PS "address"
.PS "netmask"
.PS "gateway"
.PS "nameserver"
.PS "dnsdomain"
2018-12-06 16:39:53 +00:00
.DA #0
2019-01-16 14:37:21 +00:00
*--------------------------------------
2019-01-15 16:37:32 +00:00
CFG.IP.SScanF .AZ "%d.%d.%d.%d"
CFG.HOST.SScanF .AZ "%d.%d.%d.%d %s %s"
2019-01-05 20:33:08 +00:00
*--------------------------------------
MSG.DHCP.CFG1 .CZ "IPCONFIG:Searching for DHCP servers..."
MSG.DHCP.CFG2 .CZ "IPCONFIG:Reply from DHCP Server at %d.%d.%d.%d, requesting...\r\n"
MSG.DHCP.KO .CZ "IPCONFIG:Time Out [%h].\r\n"
MSG.DHCP.OK .CZ "IPCONFIG:Success:[IP=%d.%d.%d.%d/%d.%d.%d.%d]\r\n"
MSG.DHCP.NA .CZ "IPCONFIG:TCPIP Already configured, exiting."
2019-01-05 20:33:08 +00:00
*--------------------------------------
2019-01-16 14:37:21 +00:00
IPCFG .BS S.IPCFG
CFG.IP .BS 4
*--------------------------------------
2019-01-05 20:33:08 +00:00
SA.LOCAL .DA #AF.INET S.SOCKADDR.AF
.BS 1
.HS 00.00.00.00 S.SOCKADDR.ADDR
.DA UDP.PORT.DHCPC S.SOCKADDR.PORT
*--------------------------------------
SA.REMOTE .DA #AF.INET S.SOCKADDR.AF
2019-07-07 20:48:57 +00:00
.BS 1
.HS 00.00.00.00 S.SOCKADDR.ADDR
.DA UDP.PORT.DHCPS S.SOCKADDR.PORT
*--------------------------------------
SA.DEST .DA #AF.INET S.SOCKADDR.AF
2019-01-05 20:33:08 +00:00
.BS 1
.HS FF.FF.FF.FF S.SOCKADDR.ADDR
.DA UDP.PORT.DHCPS S.SOCKADDR.PORT
*--------------------------------------
DHCP.DISC .HS 01010600 OP,HTYPE,HLEN,HOPS
DHCP.DISC.XID .BS 4
.HS 0000 SECS
.DA S.DHCP.FLAGS.BRDCST
.HS 00000000 CIADDR
DHCP.DISC.YIADDR .HS 00000000
.HS 00000000 SIADDR
2021-05-19 12:44:47 +00:00
DHCP.DISC.GIADDR .HS 00000000
2019-01-05 20:33:08 +00:00
DHCP.DISC.CHADDR .HS 00000000.00000000.00000000.00000000
.BS 64 SNAME
.BS 128 FILE
.HS 63825363 COOKIE
.HS 3501 OPT
.DA #S.DHCP.OPTIONS.DHCPDiscover
.HS 37040103060FFF
DHCP.DISC.LEN .EQ *-DHCP.DISC
*--------------------------------------
DHCP.REQ .HS 01010600 OP,HTYPE,HLEN,HOPS
DHCP.REQ.XID .BS 4
.HS 0000 SECS
.DA S.DHCP.FLAGS.BRDCST
.HS 00000000 CIADDR
DHCP.REQ.YIADDR .HS 00000000
.HS 00000000 SIADDR
2019-01-17 15:05:48 +00:00
.HS 00000000 GIADDR
2019-01-05 20:33:08 +00:00
DHCP.REQ.CHADDR .HS 00000000.00000000.00000000.00000000
.BS 64 SNAME
.BS 128 FILE
.HS 63825363 COOKIE
.HS 3501 OPT
.DA #S.DHCP.OPTIONS.DHCPRequest
.HS 3204
DHCP.REQ.OPT.REQIP .BS 4
.HS 3604
DHCP.REQ.OPT.SVRIP .BS 4
.HS FF
DHCP.REQ.LEN .EQ *-DHCP.REQ
*--------------------------------------
.DUMMY
.OR 0
DS.START
2018-07-23 15:28:42 +00:00
DIB .BS S.DIB
DEV.IOCTL .BS S.IOCTL
2018-07-23 15:28:42 +00:00
DCB.NIC .BS S.DCB.NIC
DS.END .ED
*--------------------------------------
MAN
2020-08-09 19:47:42 +00:00
SAVE usr/src/bin/ipconfig.s
ASM