Rev 593 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 593 | Rev 739 | ||
---|---|---|---|
Line 30... | Line 30... | ||
30 | ;; ;; |
30 | ;; ;; |
31 | ;; See file COPYING for details ;; |
31 | ;; See file COPYING for details ;; |
32 | ;; ;; |
32 | ;; ;; |
33 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
33 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 34... | Line 34... | ||
34 | 34 | ||
Line 35... | Line 35... | ||
35 | $Revision: 593 $ |
35 | $Revision: 739 $ |
36 | 36 | ||
37 | 37 | ||
Line 279... | Line 279... | ||
279 | movsd |
279 | movsd |
280 | movsw |
280 | movsw |
281 | cmp edx, 0xffffffff |
281 | cmp edx, 0xffffffff |
282 | je .send ; If it is broadcast, just send |
282 | je .send ; If it is broadcast, just send |
Line 283... | Line -... | ||
283 | - | ||
284 | ; first, check destination IP to see if it is on 'this' network. |
- | |
285 | ; The test is: |
- | |
286 | ; if ( destIP & subnet_mask == stack_ip & subnet_mask ) |
- | |
287 | ; destination is local |
- | |
288 | ; else |
- | |
289 | ; destination is remote, so pass to gateway |
- | |
290 | - | ||
291 | mov eax, edx |
- | |
292 | and eax, [subnet_mask] |
- | |
293 | mov ecx, [stack_ip] |
- | |
294 | and ecx, [subnet_mask] |
- | |
295 | cmp eax, ecx |
- | |
296 | je .local |
- | |
297 | - | ||
298 | mov edx, [gateway_ip] |
- | |
299 | .local: |
- | |
300 | 283 | ||
301 | lea eax, [MACAddress] ;cause this is local variable |
284 | lea eax, [MACAddress] ;cause this is local variable |
Line 302... | Line 285... | ||
302 | stdcall arp_table_manager, ARP_TABLE_IP_TO_MAC, edx, eax ;opcode,IP,MAC_ptr - Get the MAC address. |
285 | stdcall arp_table_manager, ARP_TABLE_IP_TO_MAC, edx, eax ;opcode,IP,MAC_ptr - Get the MAC address. |
303 | 286 |