111,7 → 111,7 |
jmp .done |
|
.died: |
DEBUGF 1,"Fragment slot timed-out!\n" |
DEBUGF 2,"IPv4 Fragment slot timed-out!\n" |
;;; TODO: clear all entry's of timed-out slot |
jmp .next |
|
204,10 → 204,10 |
align 4 |
IPv4_input: ; TODO: add IPv4 raw sockets support |
|
DEBUGF 1,"IPv4_input, packet from: %u.%u.%u.%u ",\ |
DEBUGF 2,"IPv4_input, packet from: %u.%u.%u.%u ",\ |
[edx + IPv4_header.SourceAddress + 0]:1,[edx + IPv4_header.SourceAddress + 1]:1,\ |
[edx + IPv4_header.SourceAddress + 2]:1,[edx + IPv4_header.SourceAddress + 3]:1 |
DEBUGF 1,"to: %u.%u.%u.%u\n",\ |
DEBUGF 2,"to: %u.%u.%u.%u\n",\ |
[edx + IPv4_header.DestinationAddress + 0]:1,[edx + IPv4_header.DestinationAddress + 1]:1,\ |
[edx + IPv4_header.DestinationAddress + 2]:1,[edx + IPv4_header.DestinationAddress + 3]:1 |
|
302,7 → 302,7 |
DEBUGF 2,"IPv4_input: unknown protocol %u\n", al |
|
.dump: |
DEBUGF 2,"IPv4_input: dumping\n" |
DEBUGF 1,"IPv4_input: dumping\n" |
; inc [dumped_rx_count] ;;; TODO |
call kernel_free |
add esp, 4 ; pop (balance stack) |
613,23 → 613,23 |
|
IPv4_checksum edi |
add edi, sizeof.IPv4_header |
DEBUGF 1,"IPv4_output: success!\n" |
DEBUGF 2,"IPv4_output: success!\n" |
ret |
|
.eth_error: |
DEBUGF 1,"IPv4_output: ethernet error\n" |
DEBUGF 2,"IPv4_output: ethernet error\n" |
add esp, 3*4+2+6 |
xor edi, edi |
ret |
|
.arp_error: |
DEBUGF 1,"IPv4_output: ARP error=%x\n", eax |
DEBUGF 2,"IPv4_output: ARP error=%x\n", eax |
add esp, 3*4+2 |
xor edi, edi |
ret |
|
.too_large: |
DEBUGF 1,"IPv4_output: Packet too large!\n" |
DEBUGF 2,"IPv4_output: Packet too large!\n" |
xor edi, edi |
ret |
|
712,7 → 712,7 |
|
IPv4_checksum edi ;;;; todo: checksum for IP packet with options! |
add edi, sizeof.IPv4_header |
DEBUGF 1,"IPv4_output_raw: device=%x\n", ebx |
DEBUGF 2,"IPv4_output_raw: device=%x\n", ebx |
call [ebx + NET_DEVICE.transmit] |
ret |
|
721,7 → 721,7 |
.arp_error: |
add esp, 8+4+4 |
.too_large: |
DEBUGF 1,"IPv4_output_raw: Failed\n" |
DEBUGF 2,"IPv4_output_raw: Failed\n" |
sub edi, edi |
ret |
|