Subversion Repositories Kolibri OS

Rev

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

Rev 3384 Rev 3516
Line 25... Line 25...
25
               dd     0x01                  ; header version
25
        dd      0x01                    ; header version
26
               dd     START                 ; start of code
26
        dd      START                   ; start of code
27
               dd     IM_END                ; size of image
27
        dd      IM_END                  ; size of image
28
               dd     (I_END+0x100)         ; memory for app
28
        dd      (I_END+0x100)           ; memory for app
29
               dd     (I_END+0x100)         ; esp
29
        dd      (I_END+0x100)           ; esp
30
               dd     0x0 , path            ; I_Param , I_Icon
30
        dd      0, 0                    ; I_Param, I_Path
Line 31... Line 31...
31
 
31
 
Line 32... Line 32...
32
; CONFIGURATION
32
; CONFIGURATION
33
 
33
 
34
TIMEOUT             equ 60                  ; in seconds
34
TIMEOUT                 = 60            ; in seconds
35
BUFFER              equ 1024                ; in bytes
35
BUFFER                  = 1024          ; in bytes
Line 36... Line 36...
36
__DEBUG__           equ 1                   ; enable/disable
36
__DEBUG__               = 1             ; enable/disable
Line 37... Line 37...
37
__DEBUG_LEVEL__     equ 1                   ; 1 = all, 2 = errors
37
__DEBUG_LEVEL__         = 1             ; 1 = all, 2 = errors
38
 
38
 
39
; CONFIGURATION FOR LINK-LOCAL
39
; CONFIGURATION FOR LINK-LOCAL
40
 
40
 
Line 41... Line 41...
41
PROBE_WAIT          equ 1                   ; second  (initial random delay)
41
PROBE_WAIT              = 1             ; second  (initial random delay)
42
PROBE_MIN           equ 1                   ; second  (minimum delay till repeated probe)
42
PROBE_MIN               = 1             ; second  (minimum delay till repeated probe)
43
PROBE_MAX           equ 2                   ; seconds (maximum delay till repeated probe)
43
PROBE_MAX               = 2             ; seconds (maximum delay till repeated probe)
Line 44... Line 44...
44
PROBE_NUM           equ 3                   ;         (number of probe packets)
44
PROBE_NUM               = 3             ;         (number of probe packets)
Line 45... Line 45...
45
 
45
 
Line 46... Line 46...
46
ANNOUNCE_NUM        equ 2                   ;         (number of announcement packets)
46
ANNOUNCE_NUM            = 2             ;         (number of announcement packets)
Line 47... Line 47...
47
ANNOUNCE_INTERVAL   equ 2                   ; seconds (time between announcement packets)
47
ANNOUNCE_INTERVAL       = 2             ; seconds (time between announcement packets)
48
ANNOUNCE_WAIT       equ 2                   ; seconds (delay before announcing)
48
ANNOUNCE_WAIT           = 2             ; seconds (delay before announcing)
49
 
49
 
Line 153... Line 153...
153
        mov     dword[MAC+2], eax
153
        mov     dword[MAC+2], eax
154
        DEBUGF  1,"->MAC: %x-%x-%x-%x-%x-%x\n", [MAC+0]:2, [MAC+1]:2, [MAC+2]:2, [MAC+3]:2, [MAC+4]:2, [MAC+5]:2
154
        DEBUGF  1,"->MAC: %x-%x-%x-%x-%x-%x\n", [MAC+0]:2, [MAC+1]:2, [MAC+2]:2, [MAC+3]:2, [MAC+4]:2, [MAC+5]:2
Line 155... Line 155...
155
 
155
 
Line 156... Line -...
156
        mcall   40, EVM_STACK
-
 
157
 
-
 
158
        mov     edi, path       ; Calculate the length of zero-terminated string
-
 
159
        xor     al, al
-
 
160
        mov     ecx, 1024
-
 
161
        repne   scasb
-
 
162
        dec     edi
-
 
163
 
-
 
164
        mov     esi, filename   ; append with .ini
-
 
165
        movsd
-
 
166
        movsb
-
 
167
 
-
 
168
        DEBUGF  1,"->Loading ini %s\n", path
156
        mcall   40, EVM_STACK
Line 169... Line 157...
169
 
157
 
170
        mcall   68, 11
158
        mcall   68, 11
171
 
159
 
Line 575... Line 563...
575
import  libini, \
563
import  libini, \
576
        ini.get_str,'ini_get_str'
564
        ini.get_str,'ini_get_str'
Line 577... Line 565...
577
 
565
 
Line 578... Line -...
578
include_debug_strings
-
 
579
 
566
include_debug_strings
580
filename        db '.ini', 0
567
 
581
str_ip          db 'ip', 0
568
str_ip          db 'ip', 0
582
str_subnet      db 'subnet', 0
569
str_subnet      db 'subnet', 0
583
str_gateway     db 'gateway', 0
570
str_gateway     db 'gateway', 0
Line 601... Line 588...
601
        dw 67 shl 8     ; destination port
588
        dw 67 shl 8     ; destination port
602
        dd -1           ; destination IP
589
        dd -1           ; destination IP
Line 603... Line 590...
603
 
590
 
Line -... Line 591...
-
 
591
        rb 10
Line 604... Line 592...
604
        rb 10
592
 
Line 605... Line 593...
605
 
593
path            db  '/sys/network.ini'
Line 627... Line 615...
627
currTime        dd  ?
615
currTime        dd  ?
628
generator       dd  ?
616
generator       dd  ?
Line 629... Line 617...
629
 
617
 
Line 630... Line -...
630
dhcpMsg         dd  ?
-
 
631
 
-
 
632
I_END_2:
-
 
633
 
-
 
634
path            rb  1024+5
-
 
635
 
-
 
636
                rb  65536
618
dhcpMsg         dd  ?
637
 
619