/kernel/trunk/network/stack.inc |
---|
313,10 → 313,15 |
test [net_10ms], 0x3f ; 640ms |
jnz .exit |
TCP_timer_640ms |
ARP_decrease_entry_ttls |
IPv4_decrease_fragment_ttls |
xor edx, edx |
mov eax, [TCP_timer1_event] |
mov ebx, [eax + EVENT.id] |
xor esi, esi |
call raise_event |
.exit: |
ret |
/kernel/trunk/network/tcp.inc |
---|
141,6 → 141,7 |
TCP_sequence_num dd ? |
TCP_queue rd (TCP_QUEUE_SIZE*sizeof.TCP_queue_entry + sizeof.queue)/4 |
TCP_input_event dd ? |
TCP_timer1_event dd ? |
endg |
uglobal |
224,9 → 225,17 |
call new_sys_threads |
test eax, eax |
jns @f |
DEBUGF DEBUG_NETWORK_ERROR,'K : cannot create kernel thread for TCP, error %d\n', eax |
DEBUGF DEBUG_NETWORK_ERROR,'K : cannot create kernel thread for TCP input, error %d\n', eax |
@@: |
movi ebx, 1 |
mov ecx, TCP_timer_640ms |
call new_sys_threads |
test eax, eax |
jns @f |
DEBUGF DEBUG_NETWORK_ERROR,'K : cannot create kernel thread for TCP timer, error %d\n', eax |
@@: |
} |
/kernel/trunk/network/tcp_timer.inc |
---|
61,14 → 61,19 |
} |
;---------------------- |
; 640 ms timer |
;---------------------- |
macro TCP_timer_640ms { ; TODO: implement timed wait timer! |
align 4 |
proc TCP_timer_640ms ; TODO: implement timed wait timer! |
local .loop |
local .exit |
xor esi, esi |
mov ecx, MANUAL_DESTROY |
call create_event |
mov [TCP_timer1_event], eax |
.wait: |
mov eax, [TCP_timer1_event] |
mov ebx, [eax + EVENT.id] |
call wait_event |
; Update TCP sequence number |
add [TCP_sequence_num], 64000 |
81,7 → 86,7 |
mov eax, [eax + SOCKET.NextPtr] |
.check_only: |
or eax, eax |
jz .exit |
jz .wait |
cmp [eax + SOCKET.Domain], AF_INET4 |
jne .loop |
157,9 → 162,8 |
mov [eax + TCP_SOCKET.t_force], 0 |
jmp .loop |
.exit: |
} |
endp |