diff --git a/kernel/trunk/network/ARP.inc b/kernel/trunk/network/ARP.inc index 6ff625dd12..81d1b9cbb7 100644 --- a/kernel/trunk/network/ARP.inc +++ b/kernel/trunk/network/ARP.inc @@ -337,11 +337,11 @@ ARP_output_request: movsw ; movsd ; -; mov esi, [ebx + NET_DEVICE.number] - xor esi, esi ;;;; FIXME - inc esi ;;;;;;;;; - inc [ARP_PACKETS_TX + 4*esi] ; assume we will succeed - lea esi, [IP_LIST + 4*esi] ; SenderIP + push edi + call NET_ptr_to_num4 + inc [ARP_PACKETS_TX + edi] ; assume we will succeed + lea esi, [IP_LIST + edi] ; SenderIP + pop edi movsd mov esi, ETH_BROADCAST ; DestMac diff --git a/kernel/trunk/network/tcp_input.inc b/kernel/trunk/network/tcp_input.inc index 8434a42ab0..ec8edfca88 100644 --- a/kernel/trunk/network/tcp_input.inc +++ b/kernel/trunk/network/tcp_input.inc @@ -50,6 +50,9 @@ TCP_input: add esp, sizeof.TCP_queue_entry + call NET_ptr_to_num4 + inc [TCP_segments_rx + edi] + xor edx, edx mov eax, [TCP_input_event] mov ebx, [eax + EVENT.id] @@ -62,7 +65,8 @@ TCP_input: popf DEBUGF DEBUG_NETWORK_VERBOSE, "TCP incoming queue is full, discarding packet!\n" - inc [TCP_segments_missed] ; FIXME: use correct interface + call NET_ptr_to_num4 + inc [TCP_segments_missed + edi] add esp, sizeof.TCP_queue_entry - 8 call kernel_free @@ -178,11 +182,6 @@ TCP_process_input: .found_socket: ; ebx now contains the socketpointer DEBUGF DEBUG_NETWORK_VERBOSE, "TCP_input: socket ptr=%x state=%u flags=%x\n", ebx, [ebx + TCP_SOCKET.t_state], [edx + TCP_header.Flags]:2 -;------------- -; update stats - - inc [TCP_segments_rx] ; FIXME: correct interface? - ;---------------------------- ; Check if socket isnt closed diff --git a/kernel/trunk/network/tcp_output.inc b/kernel/trunk/network/tcp_output.inc index df752c43e6..b3fd2ae952 100644 --- a/kernel/trunk/network/tcp_output.inc +++ b/kernel/trunk/network/tcp_output.inc @@ -549,7 +549,8 @@ TCP_send: pop ecx pop eax - inc [TCP_segments_tx] ; FIXME: correct interface? + call NET_ptr_to_num4 + inc [TCP_segments_tx + edi] ; update advertised receive window test ecx, ecx diff --git a/kernel/trunk/network/tcp_subr.inc b/kernel/trunk/network/tcp_subr.inc index 261415e79a..cf8d1ec836 100644 --- a/kernel/trunk/network/tcp_subr.inc +++ b/kernel/trunk/network/tcp_subr.inc @@ -302,6 +302,11 @@ TCP_respond: ; And send the segment call [ebx + NET_DEVICE.transmit] + test eax, eax + jnz @f + call NET_ptr_to_num4 + inc [TCP_segments_tx + edi] + @@: ret .error: @@ -378,6 +383,11 @@ TCP_respond_segment: ; And send the segment call [ebx + NET_DEVICE.transmit] + test eax, eax + jnz @f + call NET_ptr_to_num4 + inc [TCP_segments_tx + edi] + @@: ret .error: