forked from KolibriOS/kolibrios
Now Zeroconfig waits for driver to be initialised.
git-svn-id: svn://kolibrios.org@3340 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
2a78c97192
commit
8f48436569
@ -584,3 +584,4 @@ EVM_BACKGROUND = 10000b
|
||||
EVM_MOUSE = 100000b
|
||||
EVM_IPC = 1000000b
|
||||
EVM_STACK = 10000000b
|
||||
EVM_STACK2 = 0x400
|
||||
|
@ -136,15 +136,20 @@ no_IP:
|
||||
|
||||
|
||||
START:
|
||||
|
||||
mcall 40, EVM_STACK ; network event
|
||||
mcall 40, EVM_STACK2
|
||||
|
||||
DEBUGF 1,">Zero-config service loaded\n"
|
||||
|
||||
.wait:
|
||||
mcall 76, API_ETH + 4 ; get MAC of ethernet interface 0
|
||||
cmp eax, -1
|
||||
je exit
|
||||
jne .start
|
||||
|
||||
mcall 10
|
||||
jmp .wait
|
||||
|
||||
.start:
|
||||
mcall 40, EVM_STACK
|
||||
mov word[MAC], bx
|
||||
mov dword[MAC+2], eax
|
||||
|
||||
|
@ -401,6 +401,7 @@ EVENT_IPC equ 0x00000040
|
||||
EVENT_NETWORK equ 0x00000080
|
||||
EVENT_DEBUG equ 0x00000100
|
||||
EVENT_EXTENDED equ 0x00000200
|
||||
EVENT_NETWORK2 equ 0x00000400
|
||||
|
||||
EV_INTR equ 1
|
||||
|
||||
|
@ -98,7 +98,7 @@ iglobal
|
||||
szNetRegDev db 'NetRegDev',0
|
||||
szNetUnRegDev db 'NetUnRegDev',0
|
||||
szNetPtrToNum db 'NetPtrToNum',0
|
||||
szEthReceiver db 'EthReceiver',0 ; To be removed !
|
||||
szNetLinkChanged db 'NetLinkChanged',0
|
||||
szEth_input db 'Eth_input',0
|
||||
szIPv4_input db 'IPv4_input',0
|
||||
|
||||
@ -190,6 +190,7 @@ kernel_export:
|
||||
dd szNetRegDev , NET_add_device
|
||||
dd szNetUnRegDev , NET_remove_device
|
||||
dd szNetPtrToNum , NET_ptr_to_num
|
||||
dd szNetLinkChanged , NET_link_changed
|
||||
dd szEth_input , ETH_input
|
||||
dd szIPv4_input , IPv4_input
|
||||
|
||||
|
@ -287,6 +287,28 @@ stack_handler:
|
||||
|
||||
|
||||
|
||||
align 4
|
||||
NET_link_changed:
|
||||
|
||||
align 4
|
||||
NET_send_event:
|
||||
|
||||
; Send event to all applications
|
||||
push edi ecx
|
||||
mov edi, SLOT_BASE
|
||||
mov ecx, [TASK_COUNT]
|
||||
.loop:
|
||||
add edi, 256
|
||||
or [edi + APPDATA.event_mask], EVENT_NETWORK2
|
||||
loop .loop
|
||||
pop ecx edi
|
||||
|
||||
; call change_task
|
||||
|
||||
ret
|
||||
|
||||
|
||||
|
||||
;-----------------------------------------------------------------
|
||||
;
|
||||
; NET_add_device:
|
||||
@ -344,6 +366,8 @@ NET_add_device:
|
||||
pop eax
|
||||
@@:
|
||||
|
||||
call NET_send_event
|
||||
|
||||
DEBUGF 1,"Device number: %u\n", eax
|
||||
ret
|
||||
|
||||
@ -435,6 +459,8 @@ NET_remove_device:
|
||||
xor eax, eax
|
||||
mov dword [edi-4], eax
|
||||
|
||||
call NET_send_event
|
||||
|
||||
dec [NET_RUNNING]
|
||||
ret
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user