Subversion Repositories Kolibri OS

Rev

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

Rev 1529 Rev 1530
Line 14... Line 14...
14
;;          GNU GENERAL PUBLIC LICENSE                             ;;
14
;;          GNU GENERAL PUBLIC LICENSE                             ;;
15
;;             Version 2, June- 1991                               ;;
15
;;             Version 2, June- 1991                               ;;
16
;;                                                                 ;;
16
;;                                                                 ;;
17
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
17
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 18... Line 18...
18
 
18
 
Line 19... Line 19...
19
$Revision: 1529 $
19
$Revision: 1530 $
20
 
20
 
21
ARP_NO_ENTRY		equ 0
21
ARP_NO_ENTRY		equ 0
22
ARP_VALID_MAPPING	equ 1
22
ARP_VALID_MAPPING	equ 1
Line 497... Line 497...
497
	add	esp, ARP_ENTRY.size
497
	add	esp, ARP_ENTRY.size
Line 498... Line 498...
498
 
498
 
499
	cmp	eax, -1
499
	cmp	eax, -1
Line -... Line 500...
-
 
500
	je	.full
500
	je	.full
501
 
501
 
502
	mov	ecx, eax
502
	pop	eax
503
	pop	eax
Line -... Line 504...
-
 
504
	push	ecx
-
 
505
	call	ARP_output_request
-
 
506
 
-
 
507
;; TODO: check if driver could transmit packet
-
 
508
 
-
 
509
	pop	eax
-
 
510
	imul	eax, ARP_ENTRY.size
-
 
511
	add	eax, ARP_table
-
 
512
 
-
 
513
	mov	ecx, 25
-
 
514
  .wait_loop:
-
 
515
	cmp	[eax + ARP_ENTRY.Status], 1
-
 
516
	je	.got_it
-
 
517
	mov	esi, 10
503
 
518
	call	delay_ms
504
	call	ARP_output_request
519
	loop	.wait_loop
Line 505... Line 520...
505
 
520
 
506
	mov	eax, -2 	; request send
521
	mov	eax, -2 	; request send
507
	ret
522
	ret
508
 
523
 
Line -... Line 524...
-
 
524
  .found_it:
509
  .found_it:
525
	DEBUGF	1,"found IP in ARPTable\n"
510
	DEBUGF	1,"found IP in ARPTable\n"
526
	cmp	[esi + ARP_ENTRY.Status], 1
511
	cmp	[esi + ARP_ENTRY.Status], 1
527
	jne	.invalid
Line 512... Line 528...
512
	jne	.invalid
528
 
Line 529... Line 545...
529
	mov	eax, 0x0000ffff
545
	mov	eax, 0x0000ffff
530
	mov	ebx, 0xffffffff
546
	mov	ebx, 0xffffffff
531
	ret
547
	ret
Line 532... Line -...
532
 
-
 
533
 
548
 
534
 
549
 
535
;-----------------------------------------------------------------
550
;-----------------------------------------------------------------
536
;
551
;
537
; ARP_API
552
; ARP_API