Implemented TCP 2MSL (Timed-wait) timer.

Cleanup and various bugfixes in network code.

git-svn-id: svn://kolibrios.org@5976 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
hidnplayr
2015-12-16 21:20:53 +00:00
parent 092530d560
commit 0be26c4c22
9 changed files with 790 additions and 732 deletions

View File

@@ -17,15 +17,15 @@
$Revision$
;-------------------------
;
; TCP_usrclose
;
; Move connection to next state, based on process close.
;
; IN: eax = socket ptr
;
;-------------------------
;-----------------------------------------------------------------;
; ;
; TCP_usrclosed ;
; ;
; IN: eax = socket ptr ;
; ;
; OUT: / ;
; ;
;-----------------------------------------------------------------;
align 4
TCP_usrclosed:
@@ -37,7 +37,6 @@ TCP_usrclosed:
jmp ebx
.switch:
dd .close ; TCPS_CLOSED
dd .close ; TCPS_LISTEN
dd .close ; TCPS_SYN_SENT
@@ -50,7 +49,6 @@ TCP_usrclosed:
dd .disc ; TCPS_FIN_WAIT_2
dd .disc ; TCPS_TIMED_WAIT
.close:
mov [eax + TCP_SOCKET.t_state], TCPS_CLOSED
call TCP_close
@@ -74,15 +72,17 @@ TCP_usrclosed:
ret
;-------------------------
;
; TCP_connect
;
; IN: eax = socket ptr
; OUT: eax = 0 ok / -1 error
; ebx = error code
;
;-------------------------
;-----------------------------------------------------------------;
; ;
; TCP_connect ;
; ;
; IN: eax = socket ptr ;
; ;
; OUT: eax = 0 on success ;
; eax = -1 on error ;
; ebx = error code on error ;
; ;
;-----------------------------------------------------------------;
align 4
TCP_connect: