/kernel/branches/net/applications/macros.inc |
---|
584,3 → 584,4 |
EVM_MOUSE = 100000b |
EVM_IPC = 1000000b |
EVM_STACK = 10000000b |
EVM_STACK2 = 0x400 |
/kernel/branches/net/applications/zeroconf/zeroconf.asm |
---|
136,15 → 136,20 |
START: |
mcall 40, EVM_STACK2 |
mcall 40, EVM_STACK ; network event |
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 |
/kernel/branches/net/const.inc |
---|
401,6 → 401,7 |
EVENT_NETWORK equ 0x00000080 |
EVENT_DEBUG equ 0x00000100 |
EVENT_EXTENDED equ 0x00000200 |
EVENT_NETWORK2 equ 0x00000400 |
EV_INTR equ 1 |
/kernel/branches/net/core/exports.inc |
---|
98,7 → 98,7 |
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 |
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 |
/kernel/branches/net/network/stack.inc |
---|
287,6 → 287,28 |
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 |
pop eax |
@@: |
call NET_send_event |
DEBUGF 1,"Device number: %u\n", eax |
ret |
435,6 → 459,8 |
xor eax, eax |
mov dword [edi-4], eax |
call NET_send_event |
dec [NET_RUNNING] |
ret |