TCP: Use bitflag instead of dword for t_force.

git-svn-id: svn://kolibrios.org@6916 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
hidnplayr 2017-05-31 17:54:16 +00:00
parent f8148f187a
commit 44f6fd248e
4 changed files with 12 additions and 11 deletions

View File

@ -1,6 +1,6 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2004-2016. All rights reserved. ;;
;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;;
;; ;;
;; Part of the TCP/IP network stack for KolibriOS ;;
@ -63,7 +63,6 @@ struct TCP_SOCKET IP_SOCKET
t_rxtcur dd ?
t_dupacks dd ?
t_maxseg dd ?
t_force dd ?
t_flags dd ?
;---------------

View File

@ -1,6 +1,6 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2004-2016. All rights reserved. ;;
;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;;
;; ;;
;; Part of the TCP/IP network stack for KolibriOS ;;
@ -41,6 +41,8 @@ TF_REQ_TSTMP = 1 shl 7 ; have/will request timestamps
TF_RCVD_TSTMP = 1 shl 8 ; a timestamp was received in SYN
TF_SACK_PERMIT = 1 shl 9 ; other side said I could SACK
TF_FORCE = 1 shl 16 ; force to send a segment
; Segment flags
TH_FIN = 1 shl 0
TH_SYN = 1 shl 1

View File

@ -90,8 +90,8 @@ endl
; Otherwise, if window is small but nonzero, and timer expired,
; we will send what we can and go to transmit state
cmp [eax + TCP_SOCKET.t_force], 0
je .no_force
test [eax + TCP_SOCKET.t_flags], TF_FORCE
jz .no_force
DEBUGF DEBUG_NETWORK_VERBOSE, "TCP_output: forcing data out\n"
@ -200,7 +200,7 @@ endl
je .send
@@:
test [eax + TCP_SOCKET.t_force], -1 ;;;
test [eax + TCP_SOCKET.t_flags], TF_FORCE
jnz .send
mov ebx, [eax + TCP_SOCKET.max_sndwnd]
@ -424,8 +424,8 @@ endl
test esi, esi
jz .zero_data
cmp [eax + TCP_SOCKET.t_force], 1
jne @f
test [eax + TCP_SOCKET.t_flags], TF_FORCE
jz @f
cmp esi, 1
jne @f
inc [TCPS_sndprobe]

View File

@ -1,6 +1,6 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;;
;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;;
;; ;;
;; Part of the TCP/IP network stack for KolibriOS ;;
@ -151,11 +151,11 @@ proc tcp_timer_640ms
DEBUGF DEBUG_NETWORK_VERBOSE, "socket %x: persist timer expired\n", eax
call tcp_set_persist
mov [eax + TCP_SOCKET.t_force], 1
or [eax + TCP_SOCKET.t_flags], TF_FORCE
push eax
call tcp_output
pop eax
mov [eax + TCP_SOCKET.t_force], 0
and [eax + TCP_SOCKET.t_flags], not TF_FORCE
.check_more6:
test [eax + TCP_SOCKET.timer_flags], timer_flag_wait