Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 2311 → Rev 2310

/kernel/branches/net/network/socket.inc
138,7 → 138,7
ends
 
 
struct ICMP_SOCKET IP_SOCKET
struct ICMP_SOCKET
 
Identifier dw ?
 
146,13 → 146,11
 
 
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
322,6 → 320,7
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
je .updateport
jz .updateport
 
cmp [eax + UDP_SOCKET.RemotePort], cx
jne .dump
197,8 → 197,9
call wait_mutex
pop ebx
 
DEBUGF 1,"Changing remote port to: %u\n", cx
mov [eax + UDP_SOCKET.RemotePort], cx
mov si, [edx + UDP_header.SourcePort]
DEBUGF 1,"Changing remote port to: %u\n", si
mov [eax + UDP_SOCKET.RemotePort], si
inc [eax + UDP_SOCKET.firstpacket]
 
jmp .updatesock
322,9 → 323,11
ret
 
.packets_tx:
mov eax, [UDP_PACKETS_TX + eax]
add eax, UDP_PACKETS_TX
mov eax, [eax]
ret
 
.packets_rx:
mov eax, [UDP_PACKETS_RX + eax]
add eax, UDP_PACKETS_RX
mov eax, [eax]
ret
/kernel/branches/net/network/ethernet.inc
113,28 → 113,34
cmp ecx, [ebx + NET_DEVICE.mtu]
ja .exit
 
push ecx
push di eax edx
push ecx ; << 1
push di eax edx ; << 2
add ecx, sizeof.ETH_header
 
add ecx, sizeof.ETH_header
stdcall kernel_alloc, ecx
push ecx ; << 3
 
push ecx ; << 4
call kernel_alloc ; >> 4
test eax, eax
jz .out_of_ram
mov edi, eax
 
pop esi
pop ecx ; >> 3
 
pop esi ; >> 2
movsd
movsw
pop esi
pop esi ; >> 2
movsd
movsw
pop ax
pop ax ; >> 2
stosw
 
lea eax, [edi - sizeof.ETH_header] ; Set eax to buffer start
pop ecx
lea edx, [ecx + sizeof.ETH_header] ; Set edx to complete buffer size
mov edx, ecx ; 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
147,7 → 153,7
 
.out_of_ram:
DEBUGF 2,"ETH_output: Out of ram space!!\n"
add esp, 4+4+2+4
add esp, 3*4+2+4
sub edi, edi
ret
 
154,6 → 160,7
.exit:
DEBUGF 2,"ETH_output: Packet too large!\n"
sub edi, edi
;;; dec edi
ret