Subversion Repositories Kolibri OS

Rev

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

Rev 1187 Rev 1192
Line 117... Line 117...
117
    mov     eax, [timer_ticks]
117
    mov     eax, [timer_ticks]
118
    cmp     eax, [last_1hsTick]
118
    cmp     eax, [last_1hsTick]
119
    je	    .exit
119
    je	    .exit
Line 120... Line 120...
120
 
120
 
121
    mov     [last_1hsTick], eax
121
    mov     [last_1hsTick], eax
Line 122... Line 122...
122
;    call    tcp_tx_handler
122
    call    tcp_tx_handler
Line 123... Line 123...
123
 
123
 
124
  .sec_tick:
124
  .sec_tick:
Line 132... Line 132...
132
 
132
 
Line 133... Line 133...
133
    mov     [last_1sTick], al
133
    mov     [last_1sTick], al
134
 
134
 
135
    call    ARP_decrease_entry_ttls
135
    call    ARP_decrease_entry_ttls
Line 136... Line 136...
136
    call    IPv4_decrease_fragment_ttls
136
    call    IPv4_decrease_fragment_ttls
137
;    call    tcp_tcb_handler
137
    call    tcp_tcb_handler
Line 199... Line 199...
199
	je	.doesnt_exist
199
	je	.doesnt_exist
Line 200... Line 200...
200
 
200
 
201
	test	bl, bl			; 0 = Get device type (ethernet/token ring/...)
201
	test	bl, bl			; 0 = Get device type (ethernet/token ring/...)
Line 202... Line 202...
202
	jnz	@f
202
	jnz	@f
-
 
203
 
Line 203... Line 204...
203
 
204
	xor	eax, eax
204
	;TODO: write code here
205
	jmp	.return
205
 
206
 
Line 213... Line 214...
213
	mov	edi, ecx
214
	mov	edi, ecx
Line 214... Line 215...
214
 
215
 
215
	mov	ecx, 64 ; max length
216
	mov	ecx, 64 ; max length
Line -... Line 217...
-
 
217
	repnz	movsb
216
	repnz	movsb
218
 
Line -... Line 219...
-
 
219
	xor	eax, eax
-
 
220
	jmp	.return
217
 
221
 
-
 
222
  @@:
-
 
223
 
-
 
224
	dec	bl			; 2 = Reset the device
-
 
225
	jnz	@f
-
 
226
 
Line 218... Line 227...
218
	ret
227
	mov	esi, [esi + ETH_DRV_LIST]
-
 
228
	call	[esi + ETH_DEVICE.reset]
-
 
229
	jmp	.return
-
 
230
 
-
 
231
  @@:
-
 
232
 
-
 
233
	dec	bl			; 3 = Stop driver for this device
-
 
234
	jnz	@f
-
 
235
 
-
 
236
	mov	esi, [esi + ETH_DRV_LIST]
-
 
237
	call	[esi + ETH_DEVICE.unload]
219
 
238
	jmp	.return
220
	; TODO: create function wich outputs number of active network devices
239
 
221
 
240
  @@:
Line -... Line 241...
-
 
241
 
-
 
242
  .doesnt_exist:
222
  @@:
243
	DEBUGF	1,"sys_network: invalid device/function specified!\n"
Line 223... Line -...
223
  .doesnt_exist:
-
 
224
	DEBUGF	1,"sys_network: invalid device/function specified!\n"
-
 
225
	mov	eax, -1
244
	mov	eax, -1
226
 
245
 
227
	ret
246
  .return:
228
 
247
	mov	[esp+28+4], eax
229
 
248
	ret