209,8 → 209,8 |
pop ecx edx ebx |
mov word [edx + ICMP_Packet.Checksum], ax |
|
jmp NET_send ; Send the reply |
; and return to caller of this proc |
call [ebx + NET_DEVICE.transmit] |
ret |
|
|
|
251,7 → 251,7 |
add esp, 4 |
sub edx, esi |
mov edi, edx |
;;; jmp SOCKET_input |
jmp SOCKET_input |
|
.dump: |
DEBUGF 1,"ICMP_Handler - dumping\n" |
264,11 → 264,9 |
|
;----------------------------------------------------------------- |
; |
; Note: ICMP only works on top of IP protocol :) |
; ICMP_output |
; |
; inputs: |
; |
; eax = dest ip |
; IN: eax = dest ip |
; ebx = source ip |
; ecx = data length |
; dh = type |
281,7 → 279,7 |
align 4 |
ICMP_output: |
|
DEBUGF 1,"Create ICMP Packet\n" |
DEBUGF 1,"Creating ICMP Packet\n" |
|
push esi edi edx |
|
320,11 → 318,10 |
rep movsb |
|
sub edi, edx ;;; TODO: find a better way to remember start of packet |
mov ecx, [ebx + ETH_DEVICE.transmit] |
push edx edi ecx |
push edx edi |
DEBUGF 1,"Sending ICMP Packet\n" |
ret ; Send the packet (create_packet routine outputs pointer to routine to send packet in eax) |
|
call [ebx + NET_DEVICE.transmit] |
ret |
.exit: |
DEBUGF 1,"Creating ICMP Packet failed\n" |
add esp, 3*4 |