/kernel/branches/net/drivers/pcnet32.asm |
---|
10,7 → 10,7 |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
$Revision$ |
; $Revision$ |
format MS COFF |
1258,6 → 1258,7 |
test ax, PCNET_CSR_RINT |
jz @f |
.receiver_test_loop: |
movzx eax, [ebx + device.cur_rx] |
; and eax, PCNET_RX_RING_MOD_MASK |
mov edi, eax |
1288,6 → 1289,7 |
test eax, eax ; Test if we allocated succesfully |
jz .abort ; |
push .receiver_test_loop ; |
push ecx ; for eth_receiver |
push eax ; |
/kernel/branches/net/network/ARP.inc |
---|
345,8 → 345,8 |
test ecx, ecx |
jz .add |
mov eax, dword[esp + ARP_ENTRY.MAC] |
mov bx , word[esp + ARP_ENTRY.MAC + 4] |
mov eax, dword[esp + 4 + ARP_ENTRY.MAC] |
mov bx , word[esp + 4 + ARP_ENTRY.MAC + 4] |
mov esi, ARPTable |
.loop: |
357,7 → 357,7 |
cmp dword[esi + ARP_ENTRY.TTL], 0xFFFF ; static entry |
jne .notstatic |
cmp dword[esp + ARP_ENTRY.TTL], 0xFFFF |
cmp dword[esp + 4 + ARP_ENTRY.TTL], 0xFFFF |
jne .error |
.notstatic: |
386,10 → 386,8 |
pop eax |
.exit: |
pop ebx ; return addr |
add esp, ARP_ENTRY.size |
DEBUGF 1,"Exiting\n" |
jmp ebx |
ret ARP_ENTRY.size |
.error: |
639,7 → 637,8 |
mov edi, esp |
mov ecx, ARP_ENTRY.size/2 |
rep movsw |
jmp ARP_add_entry ;out: eax = entry number, -1 on error |
call ARP_add_entry ;out: eax = entry number, -1 on error |
ret |
.remove: |
; ecx = # entry |
/kernel/branches/net/network/IPv4.inc |
---|
529,7 → 529,7 |
cmp ecx, 1480 |
jg .exit_ |
cmp ebx, ebx ; if dest ip = 0 |
test ebx, ebx ; if dest ip = 0 |
jnz .ip_ok ; and local ip is valid |
; use local ip instead |
cmp [IP_LIST],0xffffffff ; |
/kernel/branches/net/network/stack.inc |
---|
177,9 → 177,8 |
popf |
jnc .end |
lodsb |
shl ax, 8 |
add edx, eax |
add dh, [esi] |
adc edx, 0 |
.end: |
/kernel/branches/net/network/udp.inc |
---|
210,8 → 210,6 |
; Create the pseudoheader in stack, |
; (now that we still have all the variables that are needed.) |
push dword IP_PROTO_UDP shl 8 |
push eax |
push ebx |
add ecx, UDP_Packet.Data |
222,12 → 220,12 |
cmp edi, -1 |
je .fail |
mov [esp + 8 + 12], eax ; pointer to buffer start |
mov [esp + 8 + 12 + 4], edx ; buffer size |
mov [esp + 8 + 4], eax ; pointer to buffer start |
mov [esp + 8 + 4 + 4], edx ; buffer size |
rol cx, 8 |
mov [edi + UDP_Packet.Length], cx |
mov [esp + 8 + 10], cx |
mov [esp + 8 + 2], cx |
ror cx, 8 |
pop esi |
237,7 → 235,7 |
shr ecx, 2 |
rep movsd |
mov ecx, [esp] |
and cx , 3 |
and ecx, 3 |
rep movsb |
pop ecx edi |
249,6 → 247,8 |
mov esi, edi |
call checksum_1 |
; Checksum for pseudoheader |
pushd [edi-4] ; destination address |
pushd [edi-8] ; source address |
mov ecx, 12 |
mov esi, esp |
call checksum_1 |