Subversion Repositories Kolibri OS

Rev

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

Rev 3562 Rev 3601
Line 139... Line 139...
139
        mcall   40, EVM_STACK2
139
        mcall   40, EVM_STACK2
Line 140... Line 140...
140
 
140
 
Line 141... Line 141...
141
        DEBUGF  1,">Zero-config service loaded\n"
141
        DEBUGF  1,">Zero-config service loaded\n"
-
 
142
 
-
 
143
  .wait:
142
 
144
        mov     ebx, API_ETH + 0
143
  .wait:
145
        mov     bh, [device]
144
        mcall   76, API_ETH + 4 ; get MAC of ethernet interface 0
146
        mcall   76                              ; get MAC of ethernet interface 1
Line 145... Line 147...
145
        cmp     eax, -1
147
        cmp     eax, -1
146
        jne     .start
148
        jne     .start
Line 340... Line 342...
340
        cmp     [dhcpMsgType], 0x05             ; Was the response an ACK? It should be
342
        cmp     [dhcpMsgType], 0x05             ; Was the response an ACK? It should be
341
        jne     read_data                       ; NO - read next packets
343
        jne     read_data                       ; NO - read next packets
Line 342... Line 344...
342
 
344
 
Line -... Line 345...
-
 
345
        call    dhcp_end
-
 
346
 
343
        call    dhcp_end
347
        mov     ebx, API_IPv4 + 3
-
 
348
        mov     bh, [device]
344
 
349
        mcall   76, , [dhcp.ip]                 ; ip
-
 
350
        mov     bl, 5
345
        mcall   76, API_IPv4 + 3, [dhcp.ip]             ; ip
351
        mcall   76, , [dhcp.dns]                ; dns
-
 
352
        mov     bl, 7
346
        mcall   76, API_IPv4 + 5, [dhcp.dns]            ; dns
353
        mcall   76, , [dhcp.subnet]             ; subnet
Line 347... Line 354...
347
        mcall   76, API_IPv4 + 7, [dhcp.subnet]         ; subnet
354
        mov     bl, 9
Line 348... Line 355...
348
        mcall   76, API_IPv4 + 9, [dhcp.gateway]        ; gateway
355
        mcall   76, , [dhcp.gateway]            ; gateway
349
 
356
 
Line 477... Line 484...
477
link_local:
484
link_local:
478
        call    random
485
        call    random
479
        mov     cx, ax
486
        mov     cx, ax
480
        shl     ecx, 16
487
        shl     ecx, 16
481
        mov     cx, 0xfea9                              ; IP 169.254.0.0 link local net, see RFC3927
488
        mov     cx, 0xfea9                              ; IP 169.254.0.0 link local net, see RFC3927
-
 
489
        mov     ebx, API_IPv4 + 3
-
 
490
        mov     bh, [device]
482
        mcall   76, API_IPv4 + 3, ecx                   ; mask is 255.255.0.0
491
        mcall   76, , ecx                   ; mask is 255.255.0.0
483
        DEBUGF  1,"Link Local IP assinged: 169.254.%u.%u\n", [generator+0]:1, [generator+1]:1
492
        DEBUGF  1,"Link Local IP assinged: 169.254.%u.%u\n", [generator+0]:1, [generator+1]:1
-
 
493
        mov     bl, 7
484
        mcall   76, API_IPv4 + 7, 0xffff
494
        mcall   76, , 0xffff
-
 
495
        mov     bl, 9
485
        mcall   76, API_IPv4 + 9, 0x0
496
        mcall   76, , 0x0
-
 
497
        mov     bl, 5
486
        mcall   76, API_IPv4 + 5, 0x0
498
        mcall   76, , 0x0
Line 487... Line 499...
487
 
499
 
Line 488... Line 500...
488
        mcall   5, PROBE_WAIT*100
500
        mcall   5, PROBE_WAIT*100
489
 
501
 
Line 504... Line 516...
504
        movzx   ebx,al
516
        movzx   ebx,al
505
        DEBUGF  1,"Waiting %u0ms\n",ebx
517
        DEBUGF  1,"Waiting %u0ms\n",ebx
506
        mcall   5
518
        mcall   5
Line 507... Line 519...
507
 
519
 
508
        DEBUGF  1,"Sending Probe\n"
520
        DEBUGF  1,"Sending Probe\n"
-
 
521
        mov     ebx, API_ARP + 6
-
 
522
        mov     bh, [device]
509
        mcall   76, API_ARP + 6
523
        mcall   76
Line 510... Line 524...
510
        inc     esi
524
        inc     esi
511
 
525
 
Line 519... Line 533...
519
        mcall   5, ANNOUNCE_WAIT*100
533
        mcall   5, ANNOUNCE_WAIT*100
520
        xor   esi, esi
534
        xor   esi, esi
521
   announce_loop:
535
   announce_loop:
Line 522... Line 536...
522
 
536
 
523
        DEBUGF  1,"Sending Announce\n"
537
        DEBUGF  1,"Sending Announce\n"
-
 
538
        mov     ebx, API_ARP + 6
-
 
539
        mov     bh, [device]
Line 524... Line 540...
524
        mcall   76, API_ARP + 6
540
        mcall   76
525
 
541
 
526
        inc     esi
542
        inc     esi
Line 592... Line 608...
592
 
608
 
Line 593... Line 609...
593
path            db  '/sys/network.ini'
609
path            db  '/sys/network.ini'
Line -... Line 610...
-
 
610
 
594
 
611
IM_END:
Line 595... Line 612...
595
IM_END:
612
 
596
 
613
device          db 1
597
inibuf          rb 16
614
inibuf          rb 16