Subversion Repositories Kolibri OS

Rev

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

Rev 6908 Rev 6910
Line 1... Line 1...
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;                                                                 ;;
2
;;                                                                 ;;
3
;; Copyright (C) KolibriOS team 2004-2016. All rights reserved.    ;;
3
;; Copyright (C) KolibriOS team 2004-2017. 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 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: 6908 $
17
$Revision: 6910 $
18
 
18
 
19
TCP_BIT_NEEDOUTPUT      = 1 shl 0
19
TCP_BIT_NEEDOUTPUT      = 1 shl 0
20
TCP_BIT_TIMESTAMP       = 1 shl 1
20
TCP_BIT_TIMESTAMP       = 1 shl 1
Line 83... Line 83...
83
 
83
 
84
locals
84
locals
85
        dataoffset      dd ?
85
        dataoffset      dd ?
86
        timestamp       dd ?
86
        timestamp       dd ?
-
 
87
        temp_bits       db ?
87
        temp_bits       db ?
88
        device          dd ?
Line 88... Line 89...
88
endl
89
endl
89
 
90
 
90
        xor     esi, esi
91
        xor     esi, esi
Line 103... Line 104...
103
        push    [esi + TCP_queue_entry.timestamp]
104
        push    [esi + TCP_queue_entry.timestamp]
104
        pop     [timestamp]
105
        pop     [timestamp]
105
        push    [esi + TCP_queue_entry.buffer_ptr]
106
        push    [esi + TCP_queue_entry.buffer_ptr]
Line 106... Line 107...
106
 
107
 
-
 
108
        mov     ebx, [esi + TCP_queue_entry.device_ptr]
107
        mov     ebx, [esi + TCP_queue_entry.device_ptr]
109
        mov     [device], ebx
108
        mov     ecx, [esi + TCP_queue_entry.segment_size]
110
        mov     ecx, [esi + TCP_queue_entry.segment_size]
109
        mov     edi, [esi + TCP_queue_entry.ip_ptr]                     ; ptr to ipv4 header
111
        mov     edi, [esi + TCP_queue_entry.ip_ptr]     ; ptr to ipv4 header
Line 110... Line 112...
110
        mov     esi, [esi + TCP_queue_entry.segment_ptr]                ; change esi last
112
        mov     esi, [esi + TCP_queue_entry.segment_ptr]                ; change esi last
Line 1878... Line 1880...
1878
 
1880
 
Line 1879... Line 1881...
1879
        jmp     .drop_no_socket
1881
        jmp     .drop_no_socket
1880
 
1882
 
1881
  .respond_seg_ack:
1883
  .respond_seg_ack:
1882
        mov     cl, TH_RST
1884
        mov     cl, TH_RST
1883
        xor     ebx, ebx                ; FIXME: find a way to get the receiving device ptr
1885
        mov     ebx, [device]
Line 1884... Line 1886...
1884
        call    tcp_respond_segment
1886
        call    tcp_respond_segment
1885
        jmp     .drop_no_socket
1887
        jmp     .drop_no_socket
1886
 
1888
 
1887
  .respond_seg_syn:
1889
  .respond_seg_syn:
1888
        mov     cl, TH_RST + TH_ACK
1890
        mov     cl, TH_RST + TH_ACK
Line 1889... Line 1891...
1889
        xor     ebx, ebx                ; FIXME: find a way to get the receiving device ptr
1891
        mov     ebx, [device]
1890
        call    tcp_respond_segment
1892
        call    tcp_respond_segment