mirror of
https://github.com/A2osX/A2osX.git
synced 2025-01-26 03:31:24 +00:00
Kernel 0.9.2
This commit is contained in:
parent
69d012b525
commit
3abdf9cc9b
Binary file not shown.
Binary file not shown.
@ -696,6 +696,7 @@ SKT.SetRemAddr ldy #S.SOCKET.REM.PORT+1
|
||||
rts
|
||||
*--------------------------------------
|
||||
SKT.FindMatchingLocRem
|
||||
jsr FRM.Dump
|
||||
ldx #0
|
||||
|
||||
.1 lda SKT.TABLE,x
|
||||
@ -704,6 +705,7 @@ SKT.FindMatchingLocRem
|
||||
phx
|
||||
>SYSCALL GetMemPtr
|
||||
>STYA ZPPtrSKT
|
||||
jsr SKT.Dump
|
||||
plx
|
||||
|
||||
ldy #S.SOCKET.AF
|
||||
@ -738,9 +740,9 @@ SKT.FindMatchingLocRem
|
||||
bne .8 bad packet for this listening
|
||||
|
||||
.6 lda SKT.REM.ADDR+S.SOCKADDR.ADDR
|
||||
|
||||
cmp #$ff FF.FF.FF.FF, Broadcast ?
|
||||
bne .41
|
||||
|
||||
* ldy #S.SOCKET.O
|
||||
lda (ZPPtrSKT),y
|
||||
and #S.SOCKET.O.BROADCAST
|
||||
@ -751,12 +753,21 @@ SKT.FindMatchingLocRem
|
||||
|
||||
.41 ldy #S.SOCKET.REM.ADDR
|
||||
|
||||
.5 lda (ZPPtrSKT),y
|
||||
cmp SKT.REM.ADDR+S.SOCKADDR.ADDR-S.SOCKET.REM.ADDR,y
|
||||
.5 lda (ZPPtrSKT),y
|
||||
|
||||
cmp #$ff accept 255.255.255.255 ?
|
||||
bne .43
|
||||
|
||||
ldy #S.SOCKET.REM.PORT Boradcast, check port only
|
||||
bra .43
|
||||
|
||||
.42 lda (ZPPtrSKT),y
|
||||
|
||||
.43 cmp SKT.REM.ADDR+S.SOCKADDR.ADDR-S.SOCKET.REM.ADDR,y
|
||||
bne .8 wrong remote host, exit....
|
||||
iny
|
||||
cpy #S.SOCKET.REM.PORT+2
|
||||
bne .5
|
||||
bne .42
|
||||
|
||||
.7 stx SKT.Index x = SKT.TABLE index
|
||||
clc
|
||||
|
@ -4,10 +4,10 @@ AUTO 4,1
|
||||
.LIST OFF
|
||||
*--------------------------------------
|
||||
UDP.IN jsr FRM.GetTargetSKT.TCPUDP
|
||||
|
||||
|
||||
jsr SKT.FindMatchingLocRem
|
||||
bcs .9
|
||||
|
||||
|
||||
ldy #S.SOCKET.PROTO
|
||||
lda (ZPPtrSKT),y
|
||||
cmp #S.IP.PROTOCOL.UDP
|
||||
@ -21,6 +21,96 @@ UDP.IN jsr FRM.GetTargetSKT.TCPUDP
|
||||
>SYSCALL FreeMem
|
||||
.8 rts
|
||||
*--------------------------------------
|
||||
FRM.Dump ldy #S.TCPUDP.DSTPORT
|
||||
lda (ZPFrameInPtr),y
|
||||
>PUSHA
|
||||
iny
|
||||
lda (ZPFrameInPtr),y
|
||||
>PUSHA
|
||||
|
||||
ldy #S.IP.DST+3
|
||||
lda (ZPFrameInPtr),y
|
||||
>PUSHA
|
||||
dey
|
||||
lda (ZPFrameInPtr),y
|
||||
>PUSHA
|
||||
dey
|
||||
lda (ZPFrameInPtr),y
|
||||
>PUSHA
|
||||
dey
|
||||
lda (ZPFrameInPtr),y
|
||||
>PUSHA
|
||||
|
||||
ldy #S.TCPUDP.SRCPORT
|
||||
lda (ZPFrameInPtr),y
|
||||
>PUSHA
|
||||
iny
|
||||
lda (ZPFrameInPtr),y
|
||||
>PUSHA
|
||||
|
||||
ldy #S.IP.SRC+3
|
||||
lda (ZPFrameInPtr),y
|
||||
>PUSHA
|
||||
dey
|
||||
lda (ZPFrameInPtr),y
|
||||
>PUSHA
|
||||
dey
|
||||
lda (ZPFrameInPtr),y
|
||||
>PUSHA
|
||||
dey
|
||||
lda (ZPFrameInPtr),y
|
||||
>PUSHA
|
||||
|
||||
>PUSHBI 12
|
||||
>LDYA L.MSG.FRM.Dump
|
||||
>SYSCALL Printf
|
||||
rts
|
||||
*--------------------------------------
|
||||
SKT.Dump ldy #S.SOCKET.REM.PORT+1
|
||||
lda (ZPPtrSKT),y
|
||||
>PUSHA
|
||||
dey
|
||||
lda (ZPPtrSKT),y
|
||||
>PUSHA
|
||||
|
||||
ldy #S.SOCKET.REM.ADDR+3
|
||||
lda (ZPPtrSKT),y
|
||||
>PUSHA
|
||||
dey
|
||||
lda (ZPPtrSKT),y
|
||||
>PUSHA
|
||||
dey
|
||||
lda (ZPPtrSKT),y
|
||||
>PUSHA
|
||||
dey
|
||||
lda (ZPPtrSKT),y
|
||||
>PUSHA
|
||||
|
||||
ldy #S.SOCKET.LOC.PORT+1
|
||||
lda (ZPPtrSKT),y
|
||||
>PUSHA
|
||||
dey
|
||||
lda (ZPPtrSKT),y
|
||||
>PUSHA
|
||||
|
||||
ldy #S.SOCKET.LOC.ADDR+3
|
||||
lda (ZPPtrSKT),y
|
||||
>PUSHA
|
||||
dey
|
||||
lda (ZPPtrSKT),y
|
||||
>PUSHA
|
||||
dey
|
||||
lda (ZPPtrSKT),y
|
||||
>PUSHA
|
||||
dey
|
||||
lda (ZPPtrSKT),y
|
||||
>PUSHA
|
||||
|
||||
>PUSHBI 12
|
||||
>LDYA L.MSG.SKT.Dump
|
||||
>SYSCALL Printf
|
||||
rts
|
||||
*--------------------------------------
|
||||
MAN
|
||||
SAVE /A2OSX.SRC/LIB/LIBTCPIP.S.UDP
|
||||
LOAD /A2OSX.SRC/LIB/LIBTCPIP.S
|
||||
|
@ -150,6 +150,8 @@ J.SKT.send .DA SKT.send.RAW
|
||||
.DA SKT.send.DGRAM
|
||||
.DA SKT.send.SEQPACKET
|
||||
.DA SKT.send.STREAM
|
||||
L.MSG.FRM.Dump .DA MSG.FRM.Dump
|
||||
L.MSG.SKT.Dump .DA MSG.SKT.Dump
|
||||
.DA 0
|
||||
*--------------------------------------
|
||||
LIB.LOAD ldx RefCount
|
||||
@ -402,6 +404,8 @@ hFrameOut .BS 1
|
||||
HST.SScanF .AZ "%d.%d.%d.%d"
|
||||
IP.ID .BS 2
|
||||
IP.CHECKSUM .BS 2
|
||||
MSG.FRM.Dump .AZ "FRM:SRC=%d.%d.%d.%d:%D DST=%d.%d.%d.%d:%D\r\n"
|
||||
MSG.SKT.Dump .AZ "SKT:LOC=%d.%d.%d.%d:%D REM=%d.%d.%d.%d:%D\r\n"
|
||||
*--------------------------------------
|
||||
MAN
|
||||
SAVE /A2OSX.SRC/LIB/LIBTCPIP.S
|
||||
|
@ -252,7 +252,7 @@ CS.DOEVENT lda (pEvent)
|
||||
CS.QUIT >LDA.G hSocket
|
||||
beq .1
|
||||
|
||||
>LIBCALL hLIBTCPIP,LIBTCPIP.Shutdown
|
||||
* >LIBCALL hLIBTCPIP,LIBTCPIP.Shutdown
|
||||
|
||||
.1 lda hLIBTCPIP
|
||||
>SYSCALL UnloadLib
|
||||
|
Loading…
x
Reference in New Issue
Block a user