Subversion Repositories Kolibri OS

Rev

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

Rev 2311 Rev 2555
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: 2311 $
19
$Revision: 2555 $
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 160... Line 160...
160
;
160
;
161
;-----------------------------------------------------------------
161
;-----------------------------------------------------------------
162
align 4
162
align 4
163
ARP_input:
163
ARP_input:
Line 164... Line 164...
164
 
164
 
165
        DEBUGF  1,"ARP_Handler - start\n"
165
        DEBUGF  1,"ARP_input - start\n"
166
        cmp     ecx, sizeof.ARP_header
166
        cmp     ecx, sizeof.ARP_header
Line 167... Line 167...
167
        jb      .exit
167
        jb      .exit
168
 
168
 
Line 169... Line 169...
169
;---------------------
169
;---------------------
170
; Handle Reply packets
170
; Handle Reply packets
Line 171... Line 171...
171
 
171
 
172
        cmp     [edx + ARP_header.Opcode], ARP_REP_OPCODE
172
        cmp     [edx + ARP_header.Opcode], ARP_REP_OPCODE
Line 173... Line 173...
173
        jne     .maybe_request
173
        jne     .maybe_request
174
 
174
 
175
        DEBUGF  1,"ARP_Handler - it's a reply packet from %u.%u.%u.%u\n",\
175
        DEBUGF  1,"ARP_input - it's a reply packet from %u.%u.%u.%u\n",\
Line 190... Line 190...
190
        jnz     .loop
190
        jnz     .loop
Line 191... Line 191...
191
 
191
 
Line 192... Line 192...
192
        jmp     .exit
192
        jmp     .exit
193
 
193
 
Line 194... Line 194...
194
  .gotit:
194
  .gotit:
195
        DEBUGF  1,"ARP_Handler - found matching entry\n"
195
        DEBUGF  1,"ARP_input - found matching entry\n"
Line 196... Line 196...
196
 
196
 
Line 197... Line 197...
197
        cmp     [esi + ARP_entry.TTL], ARP_STATIC_ENTRY         ; if it is a static entry, dont touch it
197
        cmp     [esi + ARP_entry.TTL], ARP_STATIC_ENTRY         ; if it is a static entry, dont touch it
198
        je      .exit
198
        je      .exit
Line 199... Line 199...
199
 
199
 
Line 260... Line 260...
260
        movsd
260
        movsd
261
        movsw
261
        movsw
262
;        mov     ax , ETHER_ARP
262
;        mov     ax , ETHER_ARP
263
;        stosw
263
;        stosw
Line 264... Line 264...
264
 
264
 
Line 265... Line 265...
265
        DEBUGF  1,"ARP_Handler - Sending reply \n"
265
        DEBUGF  1,"ARP_input - Sending reply \n"
266
 
266
 
Line 267... Line 267...
267
        call    [ebx + NET_DEVICE.transmit]
267
        call    [ebx + NET_DEVICE.transmit]
268
        ret
268
        ret
269
 
269
 
Line 270... Line 270...
270
     .exit:
270
     .exit:
271
        call    kernel_free
271
        call    kernel_free
Line 272... Line 272...
272
        add     esp, 4                                          ; pop (balance stack)
272
        add     esp, 4                                          ; pop (balance stack)
273
 
273
 
Line 445... Line 445...
445
;
445
;
446
;-----------------------------------------------------------------
446
;-----------------------------------------------------------------
447
align 4
447
align 4
448
ARP_IP_to_MAC:
448
ARP_IP_to_MAC:
Line 449... Line 449...
449
 
449
 
-
 
450
        DEBUGF 1,"ARP_IP_to_MAC: %u.%u", al, ah
-
 
451
        rol     eax, 16
-
 
452
        DEBUGF 1,".%u.%u\n", al, ah
Line 450... Line 453...
450
        DEBUGF 1,"ARP_IP_to_MAC\n"
453
        rol     eax, 16
451
 
454
 
Line 452... Line 455...
452
        cmp     eax, 0xffffffff
455
        cmp     eax, 0xffffffff