mirror of
https://github.com/A2osX/A2osX.git
synced 2025-01-12 17:30:23 +00:00
Kernel version 0.9 : TCP, bugfix in GetCA not ACKnoledging properly
This commit is contained in:
parent
6324272f4f
commit
4b37165b93
BIN
A2OSX.BOOT.po
BIN
A2OSX.BOOT.po
Binary file not shown.
BIN
A2OSX.SRC.po
BIN
A2OSX.SRC.po
Binary file not shown.
@ -553,7 +553,7 @@ SKT.GetCA stz bTextMode
|
||||
stx ZPDataOutPtr
|
||||
ldx L.TmpByte+1
|
||||
stx ZPDataOutPtr+1
|
||||
|
||||
|
||||
jsr SKT.Read.I
|
||||
bcs .9
|
||||
lda TmpByte
|
||||
@ -601,7 +601,7 @@ SKT.Read.I jsr SKT.GetA.I
|
||||
lda (ZPPtrSKT),y
|
||||
cmp #S.SOCKET.TCP.STATUS.ESTBLSH
|
||||
bne .91 IO err
|
||||
|
||||
|
||||
jsr SKT.GetDataFromSktIn
|
||||
rts if CS, No data...
|
||||
|
||||
@ -703,10 +703,10 @@ SKT.AckDataToSktOut
|
||||
SKT.AddDataToSktIn
|
||||
jsr SKT.GetTCB
|
||||
|
||||
ldx ZPDataInLen
|
||||
cpx SKT.TCBCache+S.TCB.INFREE
|
||||
lda ZPDataInLen+1
|
||||
sbc SKT.TCBCache+S.TCB.INFREE+1
|
||||
ldx SKT.TCBCache+S.TCB.INFREE
|
||||
cpx ZPDataInLen
|
||||
lda SKT.TCBCache+S.TCB.INFREE+1
|
||||
sbc ZPDataInLen+1
|
||||
bcc .9 Not enough room in Q
|
||||
|
||||
ldy #S.SOCKET.SQ.hInMem
|
||||
@ -1105,6 +1105,8 @@ SKT.GetDataFromSktIn
|
||||
ora #S.TCP.OPTIONS.ACK
|
||||
sta (ZPPtrSKT),y
|
||||
|
||||
jsr TCP.OUT.I
|
||||
|
||||
>LDYA ZPTmpPtr3
|
||||
clc
|
||||
rts
|
||||
|
@ -294,26 +294,18 @@ TCP.IN.JMP.CLOSED
|
||||
TCP.IN.SetDataInPtrAndLen
|
||||
ldy #S.TCP.DATAOFFSET
|
||||
lda (ZPFrameInPtr),y
|
||||
and #$F0
|
||||
and #$F0 Get TCP Header len in DWORD
|
||||
lsr
|
||||
lsr
|
||||
adc #S.TCP
|
||||
lsr
|
||||
|
||||
* clc
|
||||
adc #S.IP-2
|
||||
sta TmpOffset
|
||||
|
||||
lda #0
|
||||
* clc
|
||||
adc /S.TCP
|
||||
adc /S.IP-2
|
||||
sta TmpOffset+1 TmpOffset=Data Offset in Frame
|
||||
|
||||
lda ZPFrameInPtr
|
||||
* clc
|
||||
adc TmpOffset
|
||||
sta ZPDataInPtr
|
||||
|
||||
lda ZPFrameInPtr+1
|
||||
adc #0
|
||||
sta ZPDataInPtr+1
|
||||
|
||||
lda ZPFrameInLen
|
||||
sec
|
||||
sbc TmpOffset
|
||||
@ -322,6 +314,22 @@ TCP.IN.SetDataInPtrAndLen
|
||||
lda ZPFrameInLen+1
|
||||
sbc TmpOffset+1
|
||||
sta ZPDataInLen+1
|
||||
|
||||
lda TmpOffset
|
||||
clc
|
||||
adc #2
|
||||
sta TmpOffset
|
||||
bcc .1
|
||||
inc TmpOffset+1
|
||||
clc
|
||||
|
||||
.1 lda ZPFrameInPtr
|
||||
adc TmpOffset
|
||||
sta ZPDataInPtr
|
||||
|
||||
lda ZPFrameInPtr+1
|
||||
adc #0
|
||||
sta ZPDataInPtr+1
|
||||
rts
|
||||
*--------------------------------------
|
||||
TCP.OUT.SYN >LDYAI 0
|
||||
|
@ -44,6 +44,7 @@ L.MSG.TCPIPERR .DA MSG.TCPIPERR
|
||||
L.MSG.SKTERR .DA MSG.SKTERR
|
||||
L.MSG.ABORT .DA MSG.ABORT
|
||||
L.MSG.INCOMING .DA MSG.INCOMING
|
||||
L.MSG.BYTE .DA MSG.BYTE
|
||||
.DA 0
|
||||
*--------------------------------------
|
||||
CS.INIT >LDYA L.LIBTCPIP
|
||||
@ -182,17 +183,18 @@ CS.RUN.CLIENT sta .1+1 hSocket
|
||||
>LIBCALL hLIBTCPIP,LIBTCPIP.SKT.GetCA
|
||||
bcs .8
|
||||
sta .2+1
|
||||
|
||||
>SYSCALL PutCA
|
||||
|
||||
|
||||
.1 lda #$ff hSocket
|
||||
|
||||
>PUSHA
|
||||
>LDYA L.MSG.BYTE
|
||||
>SYSCALL CPrintFYA
|
||||
|
||||
.1 lda #$ff hSocket
|
||||
* >PUSHA
|
||||
|
||||
.2 lda #$ff data
|
||||
>PUSHA
|
||||
* >PUSHA
|
||||
|
||||
>LIBCALL hLIBTCPIP,LIBTCPIP.SKT.PutC
|
||||
* >LIBCALL hLIBTCPIP,LIBTCPIP.SKT.PutC
|
||||
|
||||
.8 clc
|
||||
rts
|
||||
@ -246,6 +248,7 @@ MSG.TCPIPERR >CSTR "TELNETD:TCP/IP Not initialized properly\r\n"
|
||||
MSG.SKTERR >CSTR "TELNETD:Listen Error\r\n"
|
||||
MSG.ABORT >CSTR "TELNETD:User Aborted\r\n"
|
||||
MSG.INCOMING >CSTR "TELNETD:Incoming Connection From : %d.%d.%d.%d\r\n"
|
||||
MSG.BYTE >CSTR "[%h]"
|
||||
hLIBTCPIP .BS 1
|
||||
*--------------------------------------
|
||||
Socket .DA #S.SOCKET.SOCK.STREAM
|
||||
|
Loading…
x
Reference in New Issue
Block a user