113,34 → 113,28 |
cmp ecx, [ebx + NET_DEVICE.mtu] |
ja .exit |
|
push ecx ; << 1 |
push di eax edx ; << 2 |
push ecx |
push di eax edx |
|
add ecx, sizeof.ETH_header |
|
push ecx ; << 3 |
|
push ecx ; << 4 |
call kernel_alloc ; >> 4 |
stdcall kernel_alloc, ecx |
test eax, eax |
jz .out_of_ram |
mov edi, eax |
|
pop ecx ; >> 3 |
|
pop esi ; >> 2 |
pop esi |
movsd |
movsw |
pop esi ; >> 2 |
pop esi |
movsd |
movsw |
pop ax ; >> 2 |
pop ax |
stosw |
|
lea eax, [edi - sizeof.ETH_header] ; Set eax to buffer start |
mov edx, ecx ; Set edx to complete buffer size |
pop ecx |
lea edx, [ecx + sizeof.ETH_header] ; Set edx to complete buffer size |
|
pop ecx ; >> 1 |
|
cmp edx, ETH_FRAME_MINIMUM |
jb .adjust_size |
DEBUGF 1,"ETH_output: done: %x total size: %u\n", eax, edx |
153,7 → 147,7 |
|
.out_of_ram: |
DEBUGF 2,"ETH_output: Out of ram space!!\n" |
add esp, 3*4+2+4 |
add esp, 4+4+2+4 |
sub edi, edi |
ret |
|
160,7 → 154,6 |
.exit: |
DEBUGF 2,"ETH_output: Packet too large!\n" |
sub edi, edi |
;;; dec edi |
ret |
|
|