Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 1484 → Rev 1483

/kernel/branches/net/network/udp.inc
68,10 → 68,6
; pointer to device struct in ebx
; UDP Packet size in ecx
; pointer to UDP Packet in edx
;
; esi = ipv4 source address
; edi = ipv4 dest address
;
; OUT: /
;
;-----------------------------------------------------------------
84,14 → 80,12
cmp [edx + UDP_Packet.Checksum], 0
jz .no_checksum
 
xchg edi, esi ; save ipv4 source address so we can look it up later
 
push edx
 
push esi
push edi
mov esi, edx
call UDP_checksum ; this destroys edx, ecx and esi (but not edi! :)
call UDP_checksum
 
pop edx
 
128,7 → 122,9
cmp [eax + SOCKET_head.end + IPv4_SOCKET.RemoteIP], 0xffffffff
je .ok1
 
cmp [eax + SOCKET_head.end + IPv4_SOCKET.RemoteIP], edi ; edi is IPv4 destination address
; mov esi, [esp] ; start of data (ethernet header)
; mov esi, [esi + ETH_FRAME.Data + IPv4_Packet.SourceAddress] ; get the Source address from the IP Packet FIXME
cmp [eax + SOCKET_head.end + IPv4_SOCKET.RemoteIP], edi ;esi
jne .try_more ; Quit if the source IP is not valid, check for more sockets with this IP/PORT combination