Subversion Repositories Kolibri OS

Rev

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

Rev 1192 Rev 1196
Line 40... Line 40...
40
RATE_LIMIT_INTERVAL equ 60		    ; seconds (delay between successive attempts)
40
RATE_LIMIT_INTERVAL equ 60		    ; seconds (delay between successive attempts)
Line 41... Line 41...
41
 
41
 
Line 42... Line -...
42
DEFEND_INTERVAL     equ 10		    ; seconds (min. wait between defensive ARPs)
-
 
43
 
-
 
44
 
42
DEFEND_INTERVAL     equ 10		    ; seconds (min. wait between defensive ARPs)
45
 
43
 
Line 46... Line -...
46
 
-
 
47
AF_INET4	equ 2  ;;;;;
44
 
48
IP_PROTO_UDP	equ 17
45
AF_INET4	equ 2  ;;;;;
49
 
46
IP_PROTO_UDP	equ 17
50
 
47
 
51
 
48
 
Line 195... Line 192...
195
    jne  skip_ini
192
    jne  skip_ini
Line 196... Line 193...
196
 
193
 
197
    invoke ini.get_str, path, str_ipconfig, str_ip, inibuf, 16, 0
194
    invoke ini.get_str, path, str_ipconfig, str_ip, inibuf, 16, 0
198
    mov    edx, inibuf
195
    mov    edx, inibuf
199
    call   Ip2dword
196
    call   Ip2dword
Line 200... Line 197...
200
    mcall  73, 3, edx
197
    mcall  75, 3, edx
201
 
198
 
202
    invoke ini.get_str, path, str_ipconfig, str_gateway, inibuf, 16, 0
199
    invoke ini.get_str, path, str_ipconfig, str_gateway, inibuf, 16, 0
203
    mov    edx, inibuf
200
    mov    edx, inibuf
Line 204... Line 201...
204
    call   Ip2dword
201
    call   Ip2dword
205
    mcall  73, 9, edx
202
    mcall  75, 9, edx
206
 
203
 
207
    invoke ini.get_str, path, str_ipconfig, str_dns, inibuf, 16, 0
204
    invoke ini.get_str, path, str_ipconfig, str_dns, inibuf, 16, 0
Line 208... Line 205...
208
    mov    edx, inibuf
205
    mov    edx, inibuf
209
    call   Ip2dword
206
    call   Ip2dword
210
    mcall  73, 7, edx
207
    mcall  75, 7, edx
211
 
208
 
Line 212... Line 209...
212
    invoke ini.get_str, path, str_ipconfig, str_subnet, inibuf, 16, 0
209
    invoke ini.get_str, path, str_ipconfig, str_subnet, inibuf, 16, 0
Line 476... Line 473...
476
 
473
 
477
link_local:
474
link_local:
478
    call random
475
    call random
479
    mov  ecx,0xfea9			    ; IP 169.254.0.0 link local net, see RFC3927
476
    mov  ecx,0xfea9			    ; IP 169.254.0.0 link local net, see RFC3927
480
    mov  cx,ax
477
    mov  cx,ax
481
    mcall 73, 3, ecx			      ; mask is 255.255.0.0
478
    mcall 75, 3, ecx			      ; mask is 255.255.0.0
482
    DEBUGF 1,"Link Local IP assinged: 169.254.%u.%u\n",[generator+2]:1,[generator+3]:1
479
    DEBUGF 1,"Link Local IP assinged: 169.254.%u.%u\n",[generator+2]:1,[generator+3]:1
483
    mcall 73, 5, 0xffff
480
    mcall 75, 5, 0xffff
484
    mcall 73, 9, 0x0
481
    mcall 75, 9, 0x0
Line 485... Line 482...
485
    mcall 73, 7, 0x0
482
    mcall 75, 7, 0x0
Line 486... Line 483...
486
 
483
 
487
    mcall 5, PROBE_WAIT*100
484
    mcall 5, PROBE_WAIT*100
Line 557... Line 554...
557
 
554
 
558
library \
555
library \
Line 559... Line 556...
559
	libini,'libini.obj'
556
	libini,'libini.obj'
560
 
557
 
Line 561... Line 558...
561
import	libini, \
558
import	libini, \
Line 562... Line 559...
562
	ini.get_str,'ini.get_str'
559
	ini.get_str,'ini_get_str'
563
 
560
 
Line 573... Line 570...
573
 
570
 
Line 574... Line 571...
574
 
571
 
575
sockaddr1:
572
sockaddr1:
576
 
573
 
Line 577... Line 574...
577
	dw AF_INET4
574
	dw AF_INET4
Line 578... Line 575...
578
	dw 68		; local port
575
	dw 68 shl 8	; local port
Line 579... Line 576...
579
	dd 0		; local IP
576
	dd 0		; local IP
580
 
577
 
581
	rb 10
578
	rb 10
Line 582... Line 579...
582
 
579