Subversion Repositories Kolibri OS

Rev

Rev 4035 | Rev 4528 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4035 Rev 4366
Line 1... Line 1...
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;                                                                 ;;
2
;;                                                                 ;;
3
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved.    ;;
3
;; Copyright (C) KolibriOS team 2004-2013. All rights reserved.    ;;
4
;; Distributed under terms of the GNU General Public License       ;;
4
;; Distributed under terms of the GNU General Public License       ;;
5
;;                                                                 ;;
5
;;                                                                 ;;
6
;;  Part of the TCP/IP network stack for KolibriOS                 ;;
6
;;  Part of the TCP/IP network stack for KolibriOS                 ;;
7
;;                                                                 ;;
7
;;                                                                 ;;
8
;;   Written by hidnplayr@kolibrios.org                            ;;
8
;;   Written by hidnplayr@kolibrios.org                            ;;
Line 55... Line 55...
55
        pop     ebx
55
        pop     ebx
56
        ret
56
        ret
Line 57... Line 57...
57
 
57
 
58
  .wait1:
58
  .wait1:
59
        mov     [eax + TCP_SOCKET.t_state], TCPS_FIN_WAIT_1
-
 
60
        ; TODO: set timer?
59
        mov     [eax + TCP_SOCKET.t_state], TCPS_FIN_WAIT_1
61
        pop     ebx
60
        pop     ebx
Line 62... Line 61...
62
        ret
61
        ret
63
 
62
 
64
  .last_ack:
63
  .last_ack:
65
        mov     [eax + TCP_SOCKET.t_state], TCPS_LAST_ACK
64
        mov     [eax + TCP_SOCKET.t_state], TCPS_LAST_ACK
Line 66... Line 65...
66
        pop     ebx
65
        pop     ebx
67
        ret
66
        ret
68
 
-
 
69
  .disc:
67
 
70
        call    SOCKET_is_disconnected
68
  .disc:
71
        ; TODO: set timer?
69
        call    SOCKET_is_disconnected
Line 201... Line 199...
201
  .established:
199
  .established:
202
        stdcall cancel_timer_hs, [eax + TCP_SOCKET.timer_connect]
200
        stdcall cancel_timer_hs, [eax + TCP_SOCKET.timer_connect]
Line 203... Line 201...
203
 
201
 
204
        xor     eax, eax
202
        xor     eax, eax
205
        ret
-
 
206
 
-
 
207
 
-
 
208
 
-
 
209
 
-
 
210
;-------------------------
-
 
211
;
-
 
212
; TCP_disconnect
-
 
213
;
-
 
214
;  IN:  eax = socket ptr
-
 
215
;  OUT: eax = socket ptr
-
 
216
;
-
 
217
;-------------------------
-
 
218
align 4
-
 
219
TCP_disconnect:
-
 
220
 
-
 
221
        DEBUGF  DEBUG_NETWORK_VERBOSE, "TCP_disconnect: %x\n", eax
-
 
222
 
-
 
223
        cmp     [eax + TCP_SOCKET.t_state], TCPS_ESTABLISHED
-
 
224
        jb      TCP_close
-
 
225
 
-
 
226
 
-
 
227
; TODO: implement LINGER ?
-
 
228
 
-
 
229
        call    SOCKET_is_disconnecting
-
 
230
        call    TCP_usrclosed
-
 
231
 
-
 
232
        push    eax
-
 
233
        call    TCP_output
-
 
234
        pop     eax
-
 
235
 
-
 
236
        ret
203
        ret