Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 3646 → Rev 3647

/kernel/trunk/network/udp.inc
139,6 → 139,11
; IP Packet UDP Destination Port = local Port
; IP Packet SA = Remote IP
 
pusha
mov ecx, socket_mutex
call mutex_lock
popa
 
mov cx, [esi + UDP_header.SourcePort]
mov dx, [esi + UDP_header.DestinationPort]
mov edi, [edi + 4] ; ipv4 source address
147,7 → 152,7
.next_socket:
mov eax, [eax + SOCKET.NextPtr]
or eax, eax
jz .dump
jz .dump_
 
cmp [eax + SOCKET.Domain], AF_INET4
jne .next_socket
160,6 → 165,11
 
DEBUGF DEBUG_NETWORK_VERBOSE, "UDP_input: socket=%x\n", eax
 
pusha
mov ecx, socket_mutex
call mutex_unlock
popa
 
;;; TODO: when packet is processed, check more sockets!
 
; cmp [eax + IP_SOCKET.RemoteIP], 0xffffffff
203,7 → 213,17
 
jmp .updatesock
 
.dump_:
 
pusha
mov ecx, socket_mutex
call mutex_unlock
popa
 
DEBUGF DEBUG_NETWORK_VERBOSE, "UDP_input: no socket found\n"
 
jmp .dump
 
.checksum_mismatch:
DEBUGF DEBUG_NETWORK_VERBOSE, "UDP_input: checksum mismatch\n"