A2osX/LIB/LIBTCPIP.S.CFG.txt

84 lines
1.5 KiB
Plaintext
Raw Normal View History

2017-12-22 21:24:30 +00:00
NEW
2019-05-05 17:15:37 +00:00
AUTO 3,1
*--------------------------------------
2019-01-14 07:11:50 +00:00
CFG.SET >PULLW ZPTmpPtr1 IPCFG
2019-12-18 20:49:41 +00:00
2019-01-16 14:37:21 +00:00
ldy #S.IPCFG-1
2019-12-18 20:49:41 +00:00
2018-07-26 15:26:39 +00:00
.1 lda (ZPTmpPtr1),y
sta IPCFG,y
2019-01-16 14:37:21 +00:00
dey
bpl .1
2019-12-18 20:49:41 +00:00
2018-08-08 15:13:37 +00:00
ldx #5
2019-01-17 15:05:48 +00:00
.2 lda IPCFG+S.NETCFG.MAC,x
2018-08-08 15:13:37 +00:00
sta ARP.REQ.SRCMAC,x
sta ARP.REQ.SHA,x
sta ARP.REP.SRCMAC,x
sta ARP.REP.SHA,x
dex
2019-01-17 15:05:48 +00:00
bpl .2
2019-10-23 09:34:25 +00:00
2018-08-08 15:13:37 +00:00
ldx #3
2019-10-23 09:34:25 +00:00
2019-01-17 15:05:48 +00:00
.3 lda IPCFG+S.IPCFG.IP,x
2018-10-09 15:47:06 +00:00
sta SA.LOCAL+S.SOCKADDR.ADDR,x
2018-08-08 15:13:37 +00:00
sta ARP.REQ.SPA,x
sta ARP.REP.SPA,x
dex
2019-01-17 15:05:48 +00:00
bpl .3
2019-10-23 09:34:25 +00:00
2019-01-17 15:05:48 +00:00
lda IPCFG+S.NETCFG.DevFlags
2018-07-26 15:26:39 +00:00
and #S.DCB.NIC.FLAGS.ARPOFFLOAD
2019-01-17 15:05:48 +00:00
beq .5
2019-10-23 09:34:25 +00:00
2019-01-17 15:05:48 +00:00
>LDYA L.DCB.NIC
>STYA IOCTL+S.IOCTL.BUFPTR
2019-10-23 09:34:25 +00:00
2021-05-04 17:31:21 +00:00
lda #S.IOCTL.S.GETDCB
sta IOCTL+S.IOCTL.S
2019-10-23 09:34:25 +00:00
2020-03-23 07:08:27 +00:00
ldx #IOCTL.STATUS
jsr CFG.SET.IOCTL
2020-09-05 13:38:04 +00:00
bcs .9
2021-05-19 12:44:47 +00:00
2019-01-17 15:05:48 +00:00
ldx #11 IP/MASK/GW
2019-10-23 09:34:25 +00:00
2019-01-17 15:05:48 +00:00
.4 lda IPCFG+S.IPCFG.IP,x
2018-07-23 06:28:47 +00:00
sta DCB.NIC+S.DCB.NIC.IP,x
dex
2019-01-17 15:05:48 +00:00
bpl .4
2019-10-23 09:34:25 +00:00
2021-05-04 17:31:21 +00:00
lda #S.IOCTL.C.SETDCB
sta IOCTL+S.IOCTL.C
2018-07-23 06:28:47 +00:00
2020-03-23 07:08:27 +00:00
ldx #IOCTL.CONTROL
jsr CFG.SET.IOCTL
2018-07-26 15:26:39 +00:00
bcs .9
2019-10-23 09:34:25 +00:00
2020-10-29 12:55:55 +00:00
.5 stz SA.LOCAL+S.SOCKADDR.PORT
2018-10-09 15:47:06 +00:00
stz SA.LOCAL+S.SOCKADDR.PORT+1
2019-12-18 20:49:41 +00:00
2021-05-19 12:44:47 +00:00
>PUSHB hDNSSocket
2018-10-09 15:47:06 +00:00
>PUSHW L.SA.LOCAL
2020-09-05 13:38:04 +00:00
jmp SKT.Bind
2019-12-18 20:49:41 +00:00
.9 rts
*--------------------------------------
2020-03-23 07:08:27 +00:00
CFG.SET.IOCTL >PUSHB IPCFG+S.NETCFG.DevID
txa
>PUSHA
>PUSHW L.IOCTL
>SYSCALL2 IOCTL
rts
*--------------------------------------
2019-01-14 07:11:50 +00:00
CFG.GET >LDYA L.IPCFG
clc
rts
*--------------------------------------
MAN
2020-06-07 08:06:51 +00:00
SAVE usr/src/lib/libtcpip.s.cfg
LOAD usr/src/lib/libtcpip.s
ASM