Subversion Repositories Kolibri OS

Rev

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

Rev 5842 Rev 5976
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: 5842 $
17
$Revision: 5976 $
Line 18... Line 18...
18
 
18
 
Line 34... Line 34...
34
        UDP_PACKETS_RX          rd  NET_DEVICES_MAX
34
        UDP_PACKETS_RX          rd  NET_DEVICES_MAX
Line 35... Line 35...
35
 
35
 
Line 36... Line 36...
36
endg
36
endg
37
 
-
 
38
 
-
 
39
;-----------------------------------------------------------------
-
 
-
 
37
 
40
;
38
 
41
; UDP_init
-
 
-
 
39
;-----------------------------------------------------------------;
42
;
40
;                                                                 ;
43
;  This function resets all UDP variables
41
; UDP_init: This function resets all UDP variables                ;
Line 44... Line 42...
44
;
42
;                                                                 ;
45
;-----------------------------------------------------------------
43
;-----------------------------------------------------------------;
46
macro   UDP_init {
44
macro   UDP_init {
Line 96... Line 94...
96
        add     [esi+UDP_header.Checksum], dx   ; this final instruction will set or clear ZF :)
94
        add     [esi+UDP_header.Checksum], dx   ; this final instruction will set or clear ZF :)
Line 97... Line 95...
97
 
95
 
Line 98... Line 96...
98
}
96
}
99
 
-
 
100
 
-
 
101
;-----------------------------------------------------------------
-
 
102
;
97
 
103
; UDP_input:
98
 
104
;
-
 
-
 
99
;-----------------------------------------------------------------;
105
;  Called by IPv4_input,
100
;                                                                 ;
106
;  this procedure will inject the UDP data in the application sockets.
101
; UDP_input: Inject the UDP data in the application sockets.      ;
107
;
102
;                                                                 ;
108
;  IN:  [esp] = ptr to buffer
103
;   IN: [esp] = ptr to buffer                                     ;
109
;       ebx = ptr to device struct
104
;       ebx = ptr to device struct                                ;
110
;       ecx = UDP packet size
105
;       ecx = UDP packet size                                     ;
111
;       edx = ptr to IPv4 header
-
 
-
 
106
;       edx = ptr to IPv4 header                                  ;
112
;       esi = ptr to UDP packet data
107
;       esi = ptr to UDP packet data                              ;
113
;       edi = interface number*4
-
 
-
 
108
;       edi = interface number*4                                  ;
114
;
109
;                                                                 ;
115
;  OUT: /
110
;  OUT: /                                                         ;
116
;
111
;                                                                 ;
Line 117... Line 112...
117
;-----------------------------------------------------------------
112
;-----------------------------------------------------------------;
Line 228... Line 223...
228
        call    NET_BUFF_free
223
        call    NET_BUFF_free
229
        ret
224
        ret
Line 230... Line 225...
230
 
225
 
231
 
-
 
-
 
226
 
232
 
227
 
233
;-----------------------------------------------------------------
-
 
-
 
228
;-----------------------------------------------------------------;
234
;
229
;                                                                 ;
235
; UDP_output
230
; UDP_output: Create an UDP packet.                               ;
236
;
231
;                                                                 ;
237
; IN: eax = socket pointer
-
 
-
 
232
;  IN:  eax = socket pointer                                      ;
238
;     ecx = number of bytes to send
233
;       ecx = number of bytes to send                             ;
239
;     esi = pointer to data
-
 
-
 
234
;       esi = pointer to data                                     ;
240
;
235
;                                                                 ;
Line 241... Line 236...
241
; OUT: eax = -1 on error
236
; OUT:  eax = -1 on error                                         ;
242
;
237
;                                                                 ;
Line 243... Line 238...
243
;-----------------------------------------------------------------
238
;-----------------------------------------------------------------;
Line 303... Line 298...
303
        ret
298
        ret
Line 304... Line 299...
304
 
299
 
305
 
-
 
-
 
300
 
306
 
301
 
307
 
-
 
-
 
302
 
308
;-----------------------------------------------------------------
303
;-----------------------------------------------------------------;
-
 
304
;                                                                 ;
309
;
305
; UDP_connect                                                     ;
-
 
306
;                                                                 ;
310
; UDP_connect
307
;   IN: eax = socket pointer                                      ;
311
;
-
 
-
 
308
;                                                                 ;
312
;   IN: eax = socket pointer
309
;  OUT: eax = 0 on success                                        ;
313
;  OUT: eax = 0 ok / -1 error
310
;       eax = -1 on error                                         ;
314
;       ebx = error code
311
;       ebx = error code on error                                 ;
Line 315... Line 312...
315
;
312
;                                                                 ;
316
;-------------------------
313
;-----------------------------------------------------------------;
Line 355... Line 352...
355
 
352
 
356
        xor     eax, eax
353
        xor     eax, eax
Line 357... Line 354...
357
        ret
354
        ret
358
 
-
 
-
 
355
 
359
 
356
 
360
;-----------------------------------------------------------------
-
 
-
 
357
;-----------------------------------------------------------------;
361
;
358
;                                                                 ;
-
 
359
; UDP_disconnect                                                  ;
362
; UDP_disconnect
360
;                                                                 ;
363
;
-
 
-
 
361
;   IN: eax = socket pointer                                      ;
364
;   IN: eax = socket pointer
362
;                                                                 ;
365
;  OUT: eax = socket pointer
363
;  OUT: eax = socket pointer                                      ;
366
;
364
;                                                                 ;
Line 367... Line 365...
367
;-------------------------
365
;-----------------------------------------------------------------;
Line 376... Line 374...
376
 
374
 
377
 
-
 
378
 
-
 
379
 
-
 
-
 
375
 
380
 
376
 
381
;---------------------------------------------------------------------------
-
 
-
 
377
 
382
;
378
 
383
; UDP_API
379
;-----------------------------------------------------------------;
384
;
380
;                                                                 ;
385
; This function is called by system function 75
-
 
-
 
381
; UDP_api: This function is called by system function 76          ;
386
;
382
;                                                                 ;
387
; IN:  subfunction number in bl
-
 
-
 
383
;  IN: bl = subfunction number in bl                              ;
388
;      device number in bh
384
;      bh = device number in bh                                   ;
389
;      ecx, edx, .. depends on subfunction
-
 
390
;
385
;      ecx, edx, .. depends on subfunction                        ;
391
; OUT:
386
;                                                                 ;
Line 392... Line 387...
392
;
387
; OUT: depends on subfunction                                     ;
393
;---------------------------------------------------------------------------
388
;                                                                 ;