Subversion Repositories Kolibri OS

Rev

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

Rev 3555 Rev 3589
Line 19... Line 19...
19
;;          GNU GENERAL PUBLIC LICENSE                             ;;
19
;;          GNU GENERAL PUBLIC LICENSE                             ;;
20
;;             Version 2, June 1991                                ;;
20
;;             Version 2, June 1991                                ;;
21
;;                                                                 ;;
21
;;                                                                 ;;
22
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
22
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 23... Line 23...
23
 
23
 
Line 24... Line 24...
24
$Revision: 3555 $
24
$Revision: 3589 $
25
 
25
 
26
uglobal
26
uglobal
27
        net_10ms        dd ?
27
        net_10ms        dd ?
Line -... Line 28...
-
 
28
        net_tmr_count   dw ?
-
 
29
endg
-
 
30
 
28
        net_tmr_count   dw ?
31
DEBUG_NETWORK_ERROR     = 1
29
endg
32
DEBUG_NETWORK_VERBOSE   = 0
Line 30... Line 33...
30
 
33
 
31
MAX_NET_DEVICES         = 16
34
MAX_NET_DEVICES         = 16
Line 303... Line 306...
303
 
306
 
304
 
307
 
Line 305... Line 308...
305
align 4
308
align 4
Line 306... Line 309...
306
NET_link_changed:
309
NET_link_changed:
307
 
310
 
Line 308... Line 311...
308
        DEBUGF  1,"NET_link_changed device=0x%x status=0x%x\n", ebx, [ebx + NET_DEVICE.state]
311
        DEBUGF  DEBUG_NETWORK_VERBOSE, "NET_link_changed device=0x%x status=0x%x\n", ebx, [ebx + NET_DEVICE.state]
Line 309... Line 312...
309
 
312
 
310
align 4
313
align 4
311
NET_send_event:
314
NET_send_event:
312
 
315
 
Line 338... Line 341...
338
;
341
;
339
;-----------------------------------------------------------------
342
;-----------------------------------------------------------------
340
align 4
343
align 4
341
NET_add_device:
344
NET_add_device:
Line 342... Line 345...
342
 
345
 
Line 343... Line 346...
343
        DEBUGF  1,"NET_Add_Device: %x\n", ebx   ;;; TODO: use mutex to lock net device list
346
        DEBUGF  DEBUG_NETWORK_VERBOSE, "NET_Add_Device: %x\n", ebx   ;;; TODO: use mutex to lock net device list
344
 
347
 
Line 345... Line 348...
345
        cmp     [NET_RUNNING], MAX_NET_DEVICES
348
        cmp     [NET_RUNNING], MAX_NET_DEVICES
Line 382... Line 385...
382
        pop     eax
385
        pop     eax
383
       @@:
386
       @@:
Line 384... Line 387...
384
 
387
 
Line 385... Line 388...
385
        call    NET_send_event
388
        call    NET_send_event
386
 
389
 
Line 387... Line 390...
387
        DEBUGF  1,"Device number: %u\n", eax
390
        DEBUGF  DEBUG_NETWORK_VERBOSE, "Device number: %u\n", eax
388
        ret
391
        ret
389
 
392
 
390
  .error:
393
  .error:
Line 391... Line 394...
391
        or      eax, -1
394
        or      eax, -1
Line 405... Line 408...
405
;
408
;
406
;-----------------------------------------------------------------
409
;-----------------------------------------------------------------
407
align 4
410
align 4
408
NET_set_default:
411
NET_set_default:
Line 409... Line 412...
409
 
412
 
Line 410... Line 413...
410
        DEBUGF  1,"NET_set_default: device=%x\n", eax
413
        DEBUGF  DEBUG_NETWORK_VERBOSE, "NET_set_default: device=%x\n", eax
411
 
414
 
Line 412... Line 415...
412
        cmp     eax, MAX_NET_DEVICES
415
        cmp     eax, MAX_NET_DEVICES
413
        jae     .error
416
        jae     .error
Line 414... Line 417...
414
 
417
 
Line 415... Line 418...
415
        cmp     [NET_DRV_LIST+eax*4], 0
418
        cmp     [NET_DRV_LIST+eax*4], 0
416
        je      .error
419
        je      .error
Line 417... Line 420...
417
 
420
 
418
        mov     [NET_DEFAULT], eax
421
        mov     [NET_DEFAULT], eax
419
 
422
 
420
        DEBUGF  1,"NET_set_default: succes\n"
423
        DEBUGF  DEBUG_NETWORK_VERBOSE, "NET_set_default: succes\n"
Line 421... Line 424...
421
        ret
424
        ret
422
 
425
 
Line 632... Line 635...
632
        jnz     .not_zero
635
        jnz     .not_zero
633
        dec     dx
636
        dec     dx
634
  .not_zero:
637
  .not_zero:
635
        xchg    dl, dh
638
        xchg    dl, dh
Line 636... Line 639...
636
 
639
 
Line 637... Line 640...
637
        DEBUGF  1,"Checksum: %x\n", dx
640
        DEBUGF  DEBUG_NETWORK_VERBOSE, "Checksum: %x\n", dx