Subversion Repositories Kolibri OS

Rev

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

Rev 1514 Rev 1519
Line 11... Line 11...
11
;;          GNU GENERAL PUBLIC LICENSE                             ;;
11
;;          GNU GENERAL PUBLIC LICENSE                             ;;
12
;;             Version 2, June 1991                                ;;
12
;;             Version 2, June 1991                                ;;
13
;;                                                                 ;;
13
;;                                                                 ;;
14
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
14
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 15... Line 15...
15
 
15
 
Line 16... Line 16...
16
$Revision: 1514 $
16
$Revision: 1519 $
Line 17... Line 17...
17
 
17
 
18
virtual at 0
18
virtual at 0
Line 72... Line 72...
72
 
72
 
73
	.OrigRemoteIP		dd ? ; original remote IP address (used to reset to LISTEN state)
73
	.OrigRemoteIP		dd ? ; original remote IP address (used to reset to LISTEN state)
Line 74... Line 74...
74
	.OrigRemotePort 	dw ? ; original remote port (used to reset to LISTEN state)
74
	.OrigRemotePort 	dw ? ; original remote port (used to reset to LISTEN state)
75
 
-
 
76
	.t_state		dd ? ; TCB state
75
 
77
	.t_timer		dd ? ; TCB timer (seconds)
76
	.t_state		dd ? ; TCB state
78
	.t_rxtshift		dd ?
77
	.t_rxtshift		dd ?
79
	.t_rxtcur		dd ?
78
	.t_rxtcur		dd ?
80
	.t_dupacks		dd ?
79
	.t_dupacks		dd ?
Line 142... Line 141...
142
 
141
 
143
	.ts_recent		dd ?
142
	.ts_recent		dd ?
144
	.ts_recent_age		dd ?
143
	.ts_recent_age		dd ?
Line -... Line 144...
-
 
144
	.last_ack_sent		dd ?
-
 
145
 
-
 
146
 
-
 
147
;-------
-
 
148
; Timers
-
 
149
 
-
 
150
	.timer_retransmission	dw ?	; rexmt
-
 
151
	.timer_ack		dw ?
-
 
152
	.timer_persist		dw ?
-
 
153
	.timer_keepalive	dw ?	; keepalive/syn timeout
145
	.last_ack_sent		dd ?
154
	.timer_timed_wait	dw ?	; also used as 2msl timer
146
 
155
 
Line 147... Line 156...
147
	.end:
156
	.end:
Line 333... Line 342...
333
	call	SOCKET_find_port
342
	call	SOCKET_find_port
334
;        test    bx, bx
343
;        test    bx, bx
335
	jz	s_error
344
	jz	s_error
Line 336... Line 345...
336
 
345
 
337
    .got_port:
346
    .got_port:
338
	DEBUGF	1,"using local port: %u", bx
347
	DEBUGF	1,"using local port: %u\n", bx
Line 339... Line 348...
339
	mov	word [eax + UDP_SOCKET.LocalPort], bx
348
	mov	word [eax + UDP_SOCKET.LocalPort], bx
340
 
349
 
Line 389... Line 398...
389
 
398
 
390
  .udp:
399
  .udp:
391
	mov	bx , word [edx + 2]
400
	mov	bx , word [edx + 2]
392
	mov	word [eax + UDP_SOCKET.RemotePort], bx
401
	mov	word [eax + UDP_SOCKET.RemotePort], bx
393
	mov	[eax + UDP_SOCKET.firstpacket], 0
402
	mov	[eax + UDP_SOCKET.firstpacket], 0
Line 394... Line 403...
394
	DEBUGF	1,"remote port: %u ",bx
403
	DEBUGF	1,"remote port: %u\n",bx
395
 
404
 
396
	mov	ebx, dword [edx + 4]
405
	mov	ebx, dword [edx + 4]
Line 406... Line 415...
406
 
415
 
407
	mov	ebx, [TCP_sequence_num]
416
	mov	ebx, [TCP_sequence_num]
408
	add	[TCP_sequence_num], 6400
417
	add	[TCP_sequence_num], 6400
Line -... Line 418...
-
 
418
	mov	[eax + TCP_SOCKET.ISS], ebx
-
 
419
 
409
	mov	[eax + TCP_SOCKET.ISS], ebx
420
	mov	[eax + TCP_SOCKET.timer_keepalive], 120 	; 120*630ms => 75,6 seconds
410
 
421
 
Line 411... Line 422...
411
	lea	ebx, [eax + SOCKET.lock]
422
	lea	ebx, [eax + SOCKET.lock]
Line 412... Line 423...
412
	call	wait_mutex
423
	call	wait_mutex
Line 413... Line 424...
413
 
424
 
414
	; fill in remote port and IP
425
	; fill in remote port and IP
415
 
426
 
Line 416... Line 427...
416
;;;;;;        mov     [eax + TCP_SOCKET.wndsizeTimer], 0     ; Reset the window timer.
427
;;;;;;        mov     [eax + TCP_SOCKET.wndsizeTimer], 0     ; Reset the window timer.
417
 
428
 
Line 418... Line 429...
418
	mov	bx , word [edx + 2]
429
	mov	bx , word [edx + 2]
Line 433... Line 444...
433
	cmp	[eax + TCP_SOCKET.LocalPort], 0
444
	cmp	[eax + TCP_SOCKET.LocalPort], 0
434
	jne	@f
445
	jne	@f
435
	call	SOCKET_find_port
446
	call	SOCKET_find_port
436
       @@:
447
       @@:
Line -... Line 448...
-
 
448
 
-
 
449
	DEBUGF	1,"remote port: %u\n", [eax + TCP_SOCKET.LocalPort]:2
437
 
450
 
438
;        mov     [eax + TCP_SOCKET.t_state], TCB_SYN_SENT
451
;        mov     [eax + TCP_SOCKET.t_state], TCB_SYN_SENT
Line 439... Line 452...
439
	call	TCP_output
452
	call	TCP_output