mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-03 12:06:05 +00:00
LIBTCPIP:implementing IP offloading
This commit is contained in:
parent
ebb4ef0618
commit
4a47d307c7
@ -82,6 +82,10 @@ NEW.IP.FRAME >PUSHWI K.ETH.FRAME.LEN
|
|||||||
bcs .9
|
bcs .9
|
||||||
>STYA ZPFrameBase1
|
>STYA ZPFrameBase1
|
||||||
|
|
||||||
|
lda DevFlags
|
||||||
|
and #S.DEVINFO.NET.FLAGS.IPOFFLOAD
|
||||||
|
bne .9
|
||||||
|
|
||||||
ldy #S.ETH.ETHERTYPE
|
ldy #S.ETH.ETHERTYPE
|
||||||
lda /S.ETH.ETHERTYPE.IP
|
lda /S.ETH.ETHERTYPE.IP
|
||||||
sta (ZPFrameBase1),y
|
sta (ZPFrameBase1),y
|
||||||
@ -111,7 +115,6 @@ NEW.IP.FRAME >PUSHWI K.ETH.FRAME.LEN
|
|||||||
lda #K.IP.TTL
|
lda #K.IP.TTL
|
||||||
sta (ZPFrameBase1),y
|
sta (ZPFrameBase1),y
|
||||||
>LDYA ZPFrameBase1
|
>LDYA ZPFrameBase1
|
||||||
clc
|
|
||||||
.9 rts
|
.9 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
SEND.ICMP.FRAME >PULLW ZPFrameBase1
|
SEND.ICMP.FRAME >PULLW ZPFrameBase1
|
||||||
@ -163,8 +166,9 @@ SEND.UDP.FRAME.I
|
|||||||
SEND.IP.FRAME >PULLW ZPFrameBase1
|
SEND.IP.FRAME >PULLW ZPFrameBase1
|
||||||
jsr FRM.GetLen1
|
jsr FRM.GetLen1
|
||||||
stz hFrame1
|
stz hFrame1
|
||||||
SEND.IP.FRAME.I ldx #3
|
|
||||||
ldy #S.IP.SRC+3
|
SEND.IP.FRAME.I ldx #3 Copy SRC.IP even if IP offload
|
||||||
|
ldy #S.IP.SRC+3 for proper UDP/TCP CRC calculation
|
||||||
|
|
||||||
.1 lda IPCFG+S.IPCFG.IP,x
|
.1 lda IPCFG+S.IPCFG.IP,x
|
||||||
sta (ZPFrameBase1),y
|
sta (ZPFrameBase1),y
|
||||||
@ -172,6 +176,10 @@ SEND.IP.FRAME.I ldx #3
|
|||||||
dex
|
dex
|
||||||
bpl .1
|
bpl .1
|
||||||
|
|
||||||
|
lda DevFlags
|
||||||
|
and #S.DEVINFO.NET.FLAGS.IPOFFLOAD
|
||||||
|
bne .21
|
||||||
|
|
||||||
ldy #S.IP.TOTAL.LENGTH+1
|
ldy #S.IP.TOTAL.LENGTH+1
|
||||||
lda ZPFrameLen1
|
lda ZPFrameLen1
|
||||||
sec
|
sec
|
||||||
@ -219,7 +227,7 @@ SEND.IP.FRAME.I ldx #3
|
|||||||
eor #$FF
|
eor #$FF
|
||||||
sta (ZPFrameBase1),y
|
sta (ZPFrameBase1),y
|
||||||
|
|
||||||
ldy #S.IP.PROTOCOL
|
.21 ldy #S.IP.PROTOCOL
|
||||||
lda (ZPFrameBase1),y
|
lda (ZPFrameBase1),y
|
||||||
cmp #S.IP.PROTOCOL.TCP
|
cmp #S.IP.PROTOCOL.TCP
|
||||||
bne .3
|
bne .3
|
||||||
|
Loading…
Reference in New Issue
Block a user