Improved loopback device, separate ARP tables for every interface, added arpstat functionality to netstat, preparing zeroconf to work on multiple interfaces, improved API (fn 76, fn 74), fixed some bugs.

git-svn-id: svn://kolibrios.org@3601 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
hidnplayr
2013-06-05 00:21:20 +00:00
parent c2bc66096c
commit c0fe9dddf7
19 changed files with 420 additions and 431 deletions

View File

@@ -16,7 +16,6 @@
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$Revision: 2924 $
; ICMP types & codes
@@ -168,16 +167,18 @@ ICMP_input:
mov esi, [esp] ; Start of buffer
cmp dword[edi + 4], 1 shl 24 + 127
je .loopback
; Update stats (and validate device ptr)
call NET_ptr_to_num
cmp edi,-1
cmp edi, -1
je .dump
inc [ICMP_PACKETS_RX + 4*edi]
inc [ICMP_PACKETS_TX + 4*edi]
cmp ebx, LOOPBACK_DEVICE
je .loopback
; FIXME: dont assume device is an ethernet device!
; exchange dest and source address in IP header
; exchange dest and source MAC in ETH header
push dword [esi + ETH_header.DstMAC]
@@ -188,10 +189,10 @@ ICMP_input:
push word [esi + ETH_header.SrcMAC + 4]
pop word [esi + ETH_header.DstMAC + 4]
pop word [esi + ETH_header.SrcMAC + 4]
add esi, sizeof.ETH_header-2
add esi, sizeof.ETH_header-4
.loopback:
add esi, 2
add esi, 4
push [esi + IPv4_header.SourceAddress]
push [esi + IPv4_header.DestinationAddress]
pop [esi + IPv4_header.SourceAddress]