Subversion Repositories Kolibri OS

Rev

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

Rev 1533 Rev 2300
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: 1533 $
19
$Revision: 2300 $
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 120... Line 120...
120
	dec	[esi + ARP_ENTRY.TTL]
120
	dec	[esi + ARP_ENTRY.TTL]
121
	jz	.time_out
121
	jz	.time_out
Line 122... Line 122...
122
 
122
 
123
  .next:
123
  .next:
-
 
124
	add	esi, ARP_ENTRY.size
124
	add	esi, ARP_ENTRY.size
125
	dec	ecx
125
	loop	.loop
126
	jnz	.loop
Line 126... Line 127...
126
	jmp	.exit
127
	jmp	.exit
127
 
128
 
128
  .time_out:
129
  .time_out:
Line 159... Line 160...
159
align 4
160
align 4
160
ARP_input:
161
ARP_input:
Line 161... Line 162...
161
 
162
 
162
	DEBUGF	1,"ARP_Handler - start\n"
163
	DEBUGF	1,"ARP_Handler - start\n"
163
	cmp	ecx, 28
164
	cmp	ecx, 28
Line 164... Line 165...
164
	jl	.exit
165
	jb	.exit
165
 
166
 
Line 166... Line 167...
166
;---------------------
167
;---------------------
Line 181... Line 182...
181
 
182
 
182
  .loop:
183
  .loop:
183
	cmp	[esi + ARP_ENTRY.IP], eax
184
	cmp	[esi + ARP_ENTRY.IP], eax
184
	je	.gotit
185
	je	.gotit
-
 
186
	add	esi, ARP_ENTRY.size
185
	add	esi, ARP_ENTRY.size
187
	dec	ecx
Line 186... Line 188...
186
	loop	.loop
188
	jnz	.loop
Line 187... Line 189...
187
 
189
 
188
	jmp	.exit
190
	jmp	.exit
Line 347... Line 349...
347
 
349
 
348
	mov	ecx, [NumARP]
350
	mov	ecx, [NumARP]
349
	test	ecx, ecx		; first entry?
351
	test	ecx, ecx		; first entry?
350
	jz	.add
352
	jz	.add
351
	cmp	ecx, ARP_TABLE_SIZE	; list full ?
353
	cmp	ecx, ARP_TABLE_SIZE	; list full ?
Line 352... Line 354...
352
	jge	.error
354
	jae	.error
353
 
355
 
354
	mov	eax, dword[esi + ARP_ENTRY.MAC]
356
	mov	eax, dword[esi + ARP_ENTRY.MAC]
Line 600... Line 602...
600
	mov	eax, [NumARP]
602
	mov	eax, [NumARP]
601
	ret
603
	ret
Line 602... Line 604...
602
 
604
 
603
.read:
605
.read:
604
	cmp	ecx, [NumARP]
606
	cmp	ecx, [NumARP]
605
	jge	.error
607
	jae	.error
606
	; edi = pointer to buffer
608
	; edi = pointer to buffer
607
	; ecx = # entry
609
	; ecx = # entry
608
	imul	ecx, ARP_ENTRY.size
610
	imul	ecx, ARP_ENTRY.size
609
	add	ecx, ARP_table
611
	add	ecx, ARP_table
Line 620... Line 622...
620
	ret
622
	ret
Line 621... Line 623...
621
 
623
 
622
.remove:
624
.remove:
623
	; ecx = # entry
625
	; ecx = # entry
624
	cmp	ecx, [NumARP]
626
	cmp	ecx, [NumARP]
625
	jge	.error
627
	jae	.error
626
	imul	ecx, ARP_ENTRY.size
628
	imul	ecx, ARP_ENTRY.size
627
	lea	esi, [ARP_table + ecx]
629
	lea	esi, [ARP_table + ecx]
628
	call	ARP_del_entry
630
	call	ARP_del_entry