Subversion Repositories Kolibri OS

Rev

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

Rev 5442 Rev 5522
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: 5442 $
17
$Revision: 5522 $
18
 
18
 
19
;-----------------------------------------------------------------
19
;-----------------------------------------------------------------
20
;
20
;
21
; TCP_input:
21
; TCP_input:
22
;
22
;
23
;       Add a segment to the incoming TCP queue
23
;       Add a segment to the incoming TCP queue
24
;
-
 
25
;  IN:  [esp] = ptr to buffer
24
;
26
;       [esp+4] = buffer size (dont care)
25
;  IN:  [esp] = ptr to buffer
27
;       ebx = ptr to device struct
26
;       ebx = ptr to device struct
28
;       ecx = segment size
27
;       ecx = segment size
29
;       esi = ptr to TCP segment
28
;       esi = ptr to TCP segment
Line 35... Line 34...
35
 
34
 
36
align 4
35
align 4
Line 37... Line 36...
37
TCP_input:
36
TCP_input:
38
 
37
 
39
; record the current time
-
 
40
        mov     eax, [timer_ticks]      ; in 1/100 seconds
-
 
41
        mov     [esp + 4], eax
38
; record the current time
42
 
39
        push    [timer_ticks]           ; in 1/100 seconds
Line 43... Line 40...
43
        push    ebx ecx esi edi         ; mind the order
40
        push    ebx ecx esi edi         ; mind the order (see TCP_queue_entry struct)
44
        mov     esi, esp
41
        mov     esi, esp
Line 62... Line 59...
62
 
59
 
63
        call    NET_ptr_to_num4
60
        call    NET_ptr_to_num4
Line 64... Line 61...
64
        inc     [TCP_segments_missed + edi]
61
        inc     [TCP_segments_missed + edi]
65
 
62
 
66
        add     esp, sizeof.TCP_queue_entry - 8
-
 
67
        call    NET_packet_free
-
 
68
        add     esp, 4
63
        add     esp, sizeof.TCP_queue_entry - 8
Line 69... Line -...
69
 
-
 
70
        ret
64
        call    NET_BUFF_free
71
 
65
        ret
Line 72... Line 66...
72
 
66
 
73
 
67
 
Line 1593... Line 1587...
1593
        call    TCP_output
1587
        call    TCP_output
Line 1594... Line 1588...
1594
 
1588
 
1595
  .done:
1589
  .done:
Line 1596... Line 1590...
1596
        DEBUGF  DEBUG_NETWORK_VERBOSE, "TCP_input: dumping\n"
1590
        DEBUGF  DEBUG_NETWORK_VERBOSE, "TCP_input: dumping\n"
1597
 
1591
 
Line 1598... Line 1592...
1598
        call    NET_packet_free
1592
        call    NET_BUFF_free
1599
        jmp     .loop
1593
        jmp     .loop
Line 1712... Line 1706...
1712
; Drop the segment
1706
; Drop the segment
Line 1713... Line 1707...
1713
 
1707
 
1714
  .drop_no_socket:
1708
  .drop_no_socket:
Line 1715... Line 1709...
1715
        DEBUGF  DEBUG_NETWORK_VERBOSE, "TCP_input: Drop (no socket)\n"
1709
        DEBUGF  DEBUG_NETWORK_VERBOSE, "TCP_input: Drop (no socket)\n"
1716
 
1710
 
Line 1717... Line 1711...
1717
        call    NET_packet_free
1711
        call    NET_BUFF_free