Kernel version 0.9 : TCP, added FRAME DUMP to solve the missing ACK problem

This commit is contained in:
Rémy GIBERT 2017-03-16 08:32:24 +01:00
parent 2406290d59
commit 36799257be
13 changed files with 66 additions and 18 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -21,8 +21,8 @@ INSDRV UTHERNET.DRV 000E3A123456
#INSDRV UTHER2.AI.DRV 0008DC123456
#INSDRV LANCEGS.DRV
STARTPROC TCPIP
#STARTPROC DHCPCLNT
#STARTPROC TELNETD
STARTPROC DHCPCLNT
STARTPROC TELNETD
#STARTPROC HTTPD
#NFSMOUNT 192.168.1.5:/A2OSX /MNT/A2OSX
#CIFSMOUNT 192.168.1.5:/MSSHARE /MNT/MSSHARE

View File

@ -107,6 +107,14 @@ CS.RUN.DUMPDEV sta DevID
>PUSHYA
lda ZPDevStatPtr
clc
adc #S.DEVSTAT.IDSTRING
tay
lda ZPDevStatPtr+1
adc /S.DEVSTAT.IDSTRING
>PUSHYA
>PUSHB DevID
>LDYA L.MSG1.DEV
@ -256,7 +264,7 @@ MSG0 >CSTR "TCP/IP Status : "
MSG0.L >CSTR "Loaded\r\n"
MSG0.NL >CSTR "Not Loaded\r\n"
*--------------------------------------
MSG1.DEV >CSTR "\r\nDevice Configuration :\r\n DevID : $%h\r\n Device Name : %s\r\n HW Address : %02h:%02h:%02h:%02h:%02h:%02h\r\n"
MSG1.DEV >CSTR "\r\nDevice Configuration :\r\n DevID : $%h\r\n Device Type : %S\r\n Device Name : %S\r\n HW Address : %02h:%02h:%02h:%02h:%02h:%02h\r\n"
MSG1.DEV.ARP >CSTR " ARP Offload : %d\r\n"
MSG1.DEV.IP >CSTR " IP Offload : %d\r\n"
MSG1.LINK >CSTR " Link Status : %s\r\n"

View File

@ -102,23 +102,30 @@ CS.RUN jsr Init.Timeout
.2 >PUSHW L.Socket
>LIBCALL hLIBTCPIP,LIBTCPIP.SKT.New
bcs .99
bcs .91
txa
ldy #hSocket
sta (pData),y
.3 >PUSHWI RPC.Request.End-RPC.Request
>PUSHW L.RPC.Request
ldy #hSocket
ldx #3
.21 lda A2osX.TIMER16,x
sta RPC.Request,x
dex
bpl .21
.3 ldy #hSocket
>PUSHB (pData),y
>PUSHW L.RPC.Request
>PUSHWI RPC.Request.End-RPC.Request
>LIBCALL hLIBTCPIP,LIBTCPIP.SKT.Write
bcc .4
>SYSCALL Sleep
jsr Wait.Timeout
bcc .3
bra .99
.91 bra .99
.4 jsr Init.Timeout
@ -168,9 +175,11 @@ CS.DOEVENT lda (pEvent)
*--------------------------------------
CS.QUIT ldy #hSocket
lda (pData),y
beq .1
>LIBCALL hLIBTCPIP,LIBTCPIP.SKT.CLOSEA
lda hLIBTCPIP
.1 lda hLIBTCPIP
beq .8
>SYSCALL UnloadLibA
@ -247,9 +256,8 @@ Socket.Src.Addr .BS 4
Socket.Src.Port .DA 0 Dynamic
Socket.Dst.Addr .BS 4
Socket.Dst.Port .DA UDP.PORT.PMAP
.BS S.SOCKET-16
*--------------------------------------
RPC.Request .HS 12345678 XID
RPC.Request .BS 4 XID
.HS 00000000 0=CALL
.HS 00000002 RPCVERS
.HS 000186A0 PROG=portmapper

View File

@ -342,7 +342,7 @@ WRITEBLOCK.1 ldy #S.ETH.SRCMAC+5
OPEN jsr CLOSE
>LDYAI PP.RxCTL
>STYA PacketPagePTR,x
>LDYAI PP.RxCTL.LID+PP.RxCTL.RxOKA+PP.RxCTL.IA+PP.RxCTL.BroadcastA
>LDYAI PP.RxCTL.LID+PP.RxCTL.RxOKA+PP.RxCTL.IA+PP.RxCTL.BroadcastA+PP.RxCTL.RuntA
>STYA PacketPageDATA,x
>LDYAI PP.MAC
@ -371,6 +371,10 @@ CLOSE ldx DEVSLOTx0
>LDYAI PP.SelfCTL.LID+PP.SelfCTL.RESET
>STYA PacketPageDATA,x
lda #0
.1 dec
bne .1
>LDYAI PP.SelfCTL
>STYA PacketPagePTR,x
>LDYAI PP.SelfCTL.LID

View File

@ -29,7 +29,7 @@ PP.RxCTL.MulticastA .EQ %00000010.00000000
PP.RxCTL.IA .EQ %00000100.00000000
PP.RxCTL.BroadcastA .EQ %00001000.00000000
*PP.RxCTL.CRCerrorA .EQ %00010000.00000000
*PP.RxCTL.RuntA .EQ %00100000.00000000
PP.RxCTL.RuntA .EQ %00100000.00000000
*PP.RxCTL.ExtradataA .EQ %01000000.00000000
PP.TxCFG .EQ $0106 Transmit Configuration (RW)
PP.TxCMD .EQ $0108 Receiver Control (RW)

View File

@ -7,6 +7,7 @@ AUTO 6
*--------------------------------------
HST.GetByName >PULLW ZPPtrDNS
>PULLW ZPPtrIP
jsr HST.ScanIP
bcc .9
jmp DNS.QUERY.I

View File

@ -827,6 +827,8 @@ SKT.AddDataToSktOut
inc
beq .8
pha
.2 lda (ZPDataInPtr),y
sta (ZPTmpPtr2)
iny

View File

@ -1,6 +1,6 @@
PR#3
PREFIX /A2OSX.SRC
LOMEM $A00
LOMEM $900
INC 1
AUTO 6
.LIST OFF
@ -107,6 +107,8 @@ L.TCP.IN.JMP .DA TCP.IN.JMP.CLOSED
.DA TCP.IN.JMP.FINWT2
.DA TCP.IN.JMP.CLOSING
.DA TCP.IN.JMP.TIMEWT
L.DUMP.LEN .DA DUMP.LEN
L.DUMP.DATA .DA DUMP.DATA
.DA 0
*--------------------------------------
LIB.LOAD lda bFirstLoad
@ -164,6 +166,8 @@ POLL ldx #DEVMGR.READBLOCK
bne .9
cpx /S.ETH.ETHERTYPE.IP
bne .9
jsr DumpFrame
jmp IP.IN
@ -211,6 +215,24 @@ DecDataInLen lda ZPDataInLen
.9 rts
*--------------------------------------
NetDevJmp jmp *
*--------------------------------------
DumpFrame ldy #3
lda (ZPFrameInPtr),y
cmp #$ff
beq .9
>PUSHW ZPFrameInLen
>LDYA L.DUMP.LEN
>SYSCALL CPrintFYA
ldy #63
.1 >PUSHB (ZPFrameInPtr),y
dey
cpy #1
bne .1
>LDYA L.DUMP.DATA
>SYSCALL CPrintFYA
.9 rts
*--------------------------------------
.INB LIB/LIBTCPIP.S.ARP
.INB LIB/LIBTCPIP.S.CFG
@ -225,6 +247,9 @@ NetDevJmp jmp *
*--------------------------------------
CS.END
*--------------------------------------
DUMP.LEN >CSTR "Len :%D\r\n"
DUMP.DATA >CSTR "Data:%h%h%h%h%h%h%h%h%h%h%h%h%h%h %h%h%h%h%h%h%h%h%h%h%h%h%h%h%h%h\r\n %h%h%h%h%h%h%h%h%h%h%h%h%h%h%h%h %h%h%h%h%h%h%h%h%h%h%h%h%h%h%h%h\r\n"
*--------------------------------------
ARP.REQ .DA S.ARP-2 Frame size
ARP.REQ.DSTMAC .HS FFFFFFFFFFFF
ARP.REQ.SRCMAC .BS 6
@ -293,7 +318,6 @@ TmpDWord .BS 4
TmpOffset .BS 2
hFrameIn .BS 1
hFrameOut .BS 1
* hSocket .BS 1
bTextMode .BS 1
HST.DecStr .BS 4
HST.IP .BS 5

View File

@ -145,10 +145,10 @@ note : '$VAR' does NOT expand Variable
| | | -R : Recurse subdirectories | |
| RM | Working | -C : Continue On Error | 0.9 |
| | | -R : Recurse subdirectories | |
| CP | In Progress | -C : Continue On Error | 0.9 |
| CP | Working | -C : Continue On Error | 0.9 |
| | | -R : Recurse subdirectories | |
| | | -Y : Dont't Prompt For Override | |
| MV | In Progress | -C : Continue On Error | 0.9 |
| MV | Working | -C : Continue On Error | 0.9 |
| | | -R : Recurse subdirectories | |
| | | -Y : Dont't Prompt For Override | |
| CAT | Working | -A : Show All non printable caracters | 0.9 |

View File

@ -240,10 +240,11 @@ CS.DOEVENT lda (pEvent)
*--------------------------------------
CS.QUIT ldy #hSocket
lda (pData),y
beq .1
>LIBCALL hLIBTCPIP,LIBTCPIP.SKT.CLOSEA
lda hLIBTCPIP
.1 lda hLIBTCPIP
>SYSCALL UnloadLibA
clc
rts