Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 5564 → Rev 5565

/kernel/branches/Kolibri-acpi/network/udp.inc
1,6 → 1,6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2004-2014. All rights reserved. ;;
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;;
;; ;;
;; UDP.INC ;;
154,7 → 154,7
.next_socket:
mov eax, [eax + SOCKET.NextPtr]
or eax, eax
jz .dump_
jz .unlock_dump
 
cmp [eax + SOCKET.Domain], AF_INET4
jne .next_socket
213,8 → 213,7
mov [eax + UDP_SOCKET.RemotePort], cx
jmp .updatesock
 
.dump_:
 
.unlock_dump:
pusha
mov ecx, socket_mutex
call mutex_unlock
221,7 → 220,6
popa
 
DEBUGF DEBUG_NETWORK_VERBOSE, "UDP_input: no socket found\n"
 
jmp .dump
 
.checksum_mismatch:
228,15 → 226,12
DEBUGF DEBUG_NETWORK_VERBOSE, "UDP_input: checksum mismatch\n"
 
.dump:
call NET_packet_free
add esp, 4 ; pop (balance stack)
DEBUGF DEBUG_NETWORK_VERBOSE,"UDP_input: dumping\n"
 
call NET_BUFF_free
ret
 
 
 
 
;-----------------------------------------------------------------
;
; UDP_output
260,7 → 255,7
mov dx, [eax + UDP_SOCKET.LocalPort]
DEBUGF DEBUG_NETWORK_VERBOSE, "local port=%x\n", dx
 
sub esp, 8 ; Data ptr and data size will be placed here
sub esp, 4 ; Data ptr will be placed here
push edx esi
mov edx, [eax + IP_SOCKET.LocalIP]
mov eax, [eax + IP_SOCKET.RemoteIP]
269,7 → 264,6
call IPv4_output
jz .fail
mov [esp + 8], eax ; pointer to buffer start
mov [esp + 8 + 4], edx ; buffer size
 
mov [edi + UDP_header.Length], cx
rol [edi + UDP_header.Length], 8