Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 2310 → Rev 2311

/kernel/branches/net/network/ethernet.inc
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
 
 
/kernel/branches/net/network/socket.inc
138,7 → 138,7
ends
 
 
struct ICMP_SOCKET
struct ICMP_SOCKET IP_SOCKET
 
Identifier dw ?
 
146,11 → 146,13
 
 
struct RING_BUFFER
 
start_ptr dd ? ; Pointer to start of buffer
end_ptr dd ? ; pointer to end of buffer
read_ptr dd ? ; Read pointer
write_ptr dd ? ; Write pointer
size dd ? ; Number of bytes buffered
 
ends
 
struct STREAM_SOCKET TCP_SOCKET
320,7 → 322,6
mov [eax + SOCKET.snd_proc], SOCKET_send_tcp
mov [eax + SOCKET.rcv_proc], SOCKET_receive_tcp
 
 
mov [eax + TCP_SOCKET.t_maxseg], 1480 ;;;;; FIXME
ret
 
/kernel/branches/net/network/udp.inc
172,7 → 172,7
@@:
 
cmp [eax + UDP_SOCKET.firstpacket], 0
jz .updateport
je .updateport
 
cmp [eax + UDP_SOCKET.RemotePort], cx
jne .dump
197,9 → 197,8
call wait_mutex
pop ebx
 
mov si, [edx + UDP_header.SourcePort]
DEBUGF 1,"Changing remote port to: %u\n", si
mov [eax + UDP_SOCKET.RemotePort], si
DEBUGF 1,"Changing remote port to: %u\n", cx
mov [eax + UDP_SOCKET.RemotePort], cx
inc [eax + UDP_SOCKET.firstpacket]
 
jmp .updatesock
323,11 → 322,9
ret
 
.packets_tx:
add eax, UDP_PACKETS_TX
mov eax, [eax]
mov eax, [UDP_PACKETS_TX + eax]
ret
 
.packets_rx:
add eax, UDP_PACKETS_RX
mov eax, [eax]
mov eax, [UDP_PACKETS_RX + eax]
ret