forked from KolibriOS/kolibrios
Correct stats for TCP.
git-svn-id: svn://kolibrios.org@3644 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
2b3ee8e109
commit
819a12b8d2
@ -337,11 +337,11 @@ ARP_output_request:
|
|||||||
movsw ;
|
movsw ;
|
||||||
movsd ;
|
movsd ;
|
||||||
|
|
||||||
; mov esi, [ebx + NET_DEVICE.number]
|
push edi
|
||||||
xor esi, esi ;;;; FIXME
|
call NET_ptr_to_num4
|
||||||
inc esi ;;;;;;;;;
|
inc [ARP_PACKETS_TX + edi] ; assume we will succeed
|
||||||
inc [ARP_PACKETS_TX + 4*esi] ; assume we will succeed
|
lea esi, [IP_LIST + edi] ; SenderIP
|
||||||
lea esi, [IP_LIST + 4*esi] ; SenderIP
|
pop edi
|
||||||
movsd
|
movsd
|
||||||
|
|
||||||
mov esi, ETH_BROADCAST ; DestMac
|
mov esi, ETH_BROADCAST ; DestMac
|
||||||
|
@ -50,6 +50,9 @@ TCP_input:
|
|||||||
|
|
||||||
add esp, sizeof.TCP_queue_entry
|
add esp, sizeof.TCP_queue_entry
|
||||||
|
|
||||||
|
call NET_ptr_to_num4
|
||||||
|
inc [TCP_segments_rx + edi]
|
||||||
|
|
||||||
xor edx, edx
|
xor edx, edx
|
||||||
mov eax, [TCP_input_event]
|
mov eax, [TCP_input_event]
|
||||||
mov ebx, [eax + EVENT.id]
|
mov ebx, [eax + EVENT.id]
|
||||||
@ -62,7 +65,8 @@ TCP_input:
|
|||||||
popf
|
popf
|
||||||
DEBUGF DEBUG_NETWORK_VERBOSE, "TCP incoming queue is full, discarding packet!\n"
|
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
|
add esp, sizeof.TCP_queue_entry - 8
|
||||||
call kernel_free
|
call kernel_free
|
||||||
@ -178,11 +182,6 @@ TCP_process_input:
|
|||||||
.found_socket: ; ebx now contains the socketpointer
|
.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
|
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
|
; Check if socket isnt closed
|
||||||
|
|
||||||
|
@ -549,7 +549,8 @@ TCP_send:
|
|||||||
pop ecx
|
pop ecx
|
||||||
pop eax
|
pop eax
|
||||||
|
|
||||||
inc [TCP_segments_tx] ; FIXME: correct interface?
|
call NET_ptr_to_num4
|
||||||
|
inc [TCP_segments_tx + edi]
|
||||||
|
|
||||||
; update advertised receive window
|
; update advertised receive window
|
||||||
test ecx, ecx
|
test ecx, ecx
|
||||||
|
@ -302,6 +302,11 @@ TCP_respond:
|
|||||||
; And send the segment
|
; And send the segment
|
||||||
|
|
||||||
call [ebx + NET_DEVICE.transmit]
|
call [ebx + NET_DEVICE.transmit]
|
||||||
|
test eax, eax
|
||||||
|
jnz @f
|
||||||
|
call NET_ptr_to_num4
|
||||||
|
inc [TCP_segments_tx + edi]
|
||||||
|
@@:
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.error:
|
.error:
|
||||||
@ -378,6 +383,11 @@ TCP_respond_segment:
|
|||||||
; And send the segment
|
; And send the segment
|
||||||
|
|
||||||
call [ebx + NET_DEVICE.transmit]
|
call [ebx + NET_DEVICE.transmit]
|
||||||
|
test eax, eax
|
||||||
|
jnz @f
|
||||||
|
call NET_ptr_to_num4
|
||||||
|
inc [TCP_segments_tx + edi]
|
||||||
|
@@:
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.error:
|
.error:
|
||||||
|
Loading…
Reference in New Issue
Block a user