Correct stats for TCP.

git-svn-id: svn://kolibrios.org@3644 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
hidnplayr 2013-06-11 11:11:26 +00:00
parent 2b3ee8e109
commit 819a12b8d2
4 changed files with 22 additions and 12 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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: