Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 1253 → Rev 1254

/kernel/branches/net/network/udp.inc
77,9 → 77,6
DEBUGF 1,"UDP_Handler\n"
; First validate, checksum:
 
DEBUGF 1,"Real UDP checksum: %x\n", [edx + UDP_Packet.Checksum]:4
mov [edx + UDP_Packet.Checksum], 0
 
pusha
 
rol cx, 8
89,10 → 86,12
push edi
push esi
 
mov di, [edx + UDP_Packet.Checksum]
mov [edx + UDP_Packet.Checksum], 0
 
mov esi, edx
xor edx, edx
call checksum_1
; Checksum for pseudoheader
mov ecx, 12
mov esi, esp
call checksum_1
99,10 → 98,12
add esp, 12
call checksum_2
 
cmp di, dx
popa
jne .dump
 
DEBUGF 1,"UDP Checksum is correct\n"
 
 
; Look for a socket where
; IP Packet UDP Destination Port = local Port
; IP Packet SA = Remote IP
207,8 → 208,7
 
sub esp, 8 ; reserve some place in stack for later
 
; Create the pseudoheader in stack,
; (now that we still have all the variables that are needed.)
; Create a part pseudoheader in stack,
push dword IP_PROTO_UDP shl 8
 
add ecx, UDP_Packet.Data