Subversion Repositories Kolibri OS

Rev

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

Rev 1763 Rev 1830
Line 12... Line 12...
12
;;          GNU GENERAL PUBLIC LICENSE                             ;;
12
;;          GNU GENERAL PUBLIC LICENSE                             ;;
13
;;             Version 2, June 1991                                ;;
13
;;             Version 2, June 1991                                ;;
14
;;                                                                 ;;
14
;;                                                                 ;;
15
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
15
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 16... Line 16...
16
 
16
 
Line 17... Line 17...
17
$Revision: 1763 $
17
$Revision: 1830 $
Line 18... Line 18...
18
 
18
 
19
macro	TCP_checksum IP1, IP2 {
19
macro	TCP_checksum IP1, IP2 {
Line 226... Line 226...
226
 
226
 
227
 
227
 
228
 
228
 
229
;---------------------------------------
229
;---------------------------------------
230
;
230
;
231
; The easy way to send an ACK/RST/keepalive segment
231
; The fast way to send an ACK/RST/keepalive segment
232
;
232
;
233
; TCP_respond_socket:
233
; TCP_respond_socket:
Line 272... Line 272...
272
	stosd
272
	stosd
273
	mov	al, 0x50	; Dataoffset: 20 bytes
273
	mov	al, 0x50	; Dataoffset: 20 bytes
274
	stosb
274
	stosb
275
	mov	al, cl
275
	mov	al, cl
276
	stosb
276
	stosb
277
	mov	ax, [esi + TCP_SOCKET.RCV_WND]
277
;        mov     ax, [esi + TCP_SOCKET.RCV_WND]
278
	rol	ax, 8
278
;        rol     ax, 8
-
 
279
	mov	ax, 0x00a0	;;;;;;; FIXME
279
	stosw			; window
280
	stosw			; window
280
	xor	eax, eax
281
	xor	eax, eax
281
	stosd			; checksum + urgentpointer
282
	stosd			; checksum + urgentpointer
Line 282... Line 283...
282
 
283
 
Line 285... Line 286...
285
 
286
 
286
  .checksum:
287
  .checksum:
287
	sub	edi, TCP_segment.Data
288
	sub	edi, TCP_segment.Data
288
	mov	ecx, TCP_segment.Data
289
	mov	ecx, TCP_segment.Data
289
	xchg	esi, edi
290
	xchg	esi, edi
290
	TCP_checksum (edi + IP_SOCKET.LocalIP), (esi + IP_SOCKET.RemoteIP)
291
	TCP_checksum (edi + IP_SOCKET.LocalIP), (edi + IP_SOCKET.RemoteIP)
Line 291... Line 292...
291
	mov	[esi+TCP_segment.Checksum], dx
292
	mov	[esi+TCP_segment.Checksum], dx
292
 
293