Subversion Repositories Kolibri OS

Rev

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

Rev 2614 Rev 2877
Line 1... Line 1...
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;                                                                 ;;
2
;;                                                                 ;;
3
;; Copyright (C) KolibriOS team 2004-2010. All rights reserved.    ;;
3
;; Copyright (C) KolibriOS team 2004-2012. 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
;;  UDP.INC                                                        ;;
6
;;  UDP.INC                                                        ;;
7
;;                                                                 ;;
7
;;                                                                 ;;
8
;;  Part of the tcp/ip network stack for KolibriOS                 ;;
8
;;  Part of the tcp/ip network stack for KolibriOS                 ;;
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: 2614 $
17
$Revision: 2877 $
Line 18... Line 18...
18
 
18
 
Line 240... Line 240...
240
        rol     edx, 16
240
        rol     edx, 16
241
        mov     dx, [eax + UDP_SOCKET.LocalPort]
241
        mov     dx, [eax + UDP_SOCKET.LocalPort]
242
        DEBUGF  1,"local port: %u\n", dx
242
        DEBUGF  1,"local port: %u\n", dx
243
        rol     dx, 8
243
        rol     dx, 8
Line -... Line 244...
-
 
244
 
-
 
245
        sub     esp, 8                                          ; Data ptr and data size will be placed here
-
 
246
        push    edx esi
244
 
247
        mov     ebx, [eax + SOCKET.device]
245
        mov     ebx, [eax + IP_SOCKET.LocalIP]
248
        mov     edx, [eax + IP_SOCKET.LocalIP]
246
        mov     eax, [eax + IP_SOCKET.RemoteIP]
-
 
247
 
249
        mov     eax, [eax + IP_SOCKET.RemoteIP]
248
        mov     di, IP_PROTO_UDP shl 8 + 128
-
 
249
        sub     esp, 8                                          ; Data ptr and data size will be placed here
250
        mov     di, IP_PROTO_UDP shl 8 + 128
250
        add     ecx, sizeof.UDP_header
-
 
251
 
-
 
252
;;; TODO: fragment id
-
 
253
        push    edx esi
251
        add     ecx, sizeof.UDP_header
254
        call    IPv4_output
252
        call    IPv4_output
255
        jz      .fail
-
 
256
 
253
        jz      .fail
257
        mov     [esp + 8], eax                                  ; pointer to buffer start
254
        mov     [esp + 8], eax                                  ; pointer to buffer start
Line 258... Line 255...
258
        mov     [esp + 8 + 4], edx                              ; buffer size
255
        mov     [esp + 8 + 4], edx                              ; buffer size
259
 
256