Subversion Repositories Kolibri OS

Rev

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

Rev 5584 Rev 5842
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: 5584 $
17
$Revision: 5842 $
18
 
18
 
19
align 4
19
align 4
20
iglobal
20
iglobal
Line 264... Line 264...
264
 
264
 
265
 
265
 
266
 
266
 
267
 
267
 
268
 
268
 
269
;---------------------------------------
269
;-----------------------------------------------------------------
270
;
270
;
271
; The fast way to send an ACK/RST/keepalive segment
271
; The fast way to send an ACK/RST/keepalive segment
272
;
272
;
-
 
273
; TCP_respond
-
 
274
;
273
; TCP_respond
275
;  IN:  ebx = socket ptr
-
 
276
;        cl = flags
274
;
277
;
275
;  IN:  ebx = socket ptr
278
; OUT:  /
Line 276... Line 279...
276
;        cl = flags
279
;
Line 277... Line 280...
277
;
280
;-----------------------------------------------------------------
278
;--------------------------------------
281
 
Line 279... Line 282...
279
align 4
282
align 4
280
TCP_respond:
-
 
281
 
283
TCP_respond:
282
        DEBUGF  DEBUG_NETWORK_VERBOSE, "TCP_respond_socket: socket=%x flags=%x\n", ebx, cl
284
 
-
 
285
        DEBUGF  DEBUG_NETWORK_VERBOSE, "TCP_respond_socket: socket=%x flags=%x\n", ebx, cl
-
 
286
 
283
 
287
;---------------------
284
;---------------------
288
; Create the IP packet
285
; Create the IP packet
289
 
286
 
290
        push    cx ebx
287
        push    cx ebx
291
        mov     edx, [ebx + IP_SOCKET.LocalIP]
288
        mov     eax, [ebx + IP_SOCKET.RemoteIP]
292
        mov     edi, [ebx + IP_SOCKET.RemoteIP]
Line 345... Line 349...
345
        add     esp, 2 + 4
349
        add     esp, 2 + 4
Line 346... Line 350...
346
 
350
 
Line 347... Line -...
347
        ret
-
 
348
 
-
 
349
 
-
 
-
 
351
        ret
350
 
352
 
351
 
-
 
352
 
-
 
353
 
-
 
354
 
353
 
355
 
354
;-----------------------------------------------------------------
-
 
355
;
356
;-------------------------
356
; TCP_respond_segment:
357
; TCP_respond_segment:
357
;
358
;
358
;  IN:  ebx = device ptr
-
 
359
;       edx = segment ptr (a previously received segment)
-
 
360
;       edi = ptr to IPv4 header
-
 
361
;        cl = flags
-
 
362
;
Line 359... Line 363...
359
;  IN:  edx = segment ptr (a previously received segment)
363
;  OUT: /
360
;       edi = ptr to dest and src IPv4 addresses
364
;
Line 361... Line 365...
361
;        cl = flags
365
;-----------------------------------------------------------------
Line 362... Line 366...
362
 
366
 
363
align 4
367
align 4
Line 364... Line 368...
364
TCP_respond_segment:
368
TCP_respond_segment:
365
 
369
 
366
        DEBUGF  DEBUG_NETWORK_VERBOSE,"TCP_respond_segment: frame=%x flags=%x\n", edx, cl
370
        DEBUGF  DEBUG_NETWORK_VERBOSE, "TCP_respond_segment: frame=%x flags=%x\n", edx, cl
367
 
371
 
368
;---------------------
372
;---------------------
369
; Create the IP packet
-
 
370
 
373
; Create the IP packet
371
        push    cx edx
374
 
372
        mov     edx, [edi + 4]
375
        push    cx edx
Line 373... Line 376...
373
        mov     eax, [edi]
376
        mov     edx, [edi + IPv4_header.DestinationAddress]