Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 913 → Rev 914

/kernel/branches/kolibri_pe/network/stack.inc
37,7 → 37,7
 
uglobal
StackCounters:
dumped_rx_count: dd 0
dumped_rx_count dd 0
arp_tx_count: dd 0
arp_rx_count: dd 0
ip_rx_count: dd 0
46,9 → 46,9
 
; socket buffers
SOCKETBUFFSIZE equ 4096 ; state + config + buffer.
SOCKETHEADERSIZE equ 76 ; thus 4096 - SOCKETHEADERSIZE bytes data
SOCKETHEADERSIZE equ 76+8+8 ; thus 4096 - SOCKETHEADERSIZE bytes data
 
NUM_SOCKETS equ 16 ; Number of open sockets supported. Was 20
;NUM_SOCKETS equ 16 ; Number of open sockets supported. Was 20
 
; IPBUFF status values
BUFF_EMPTY equ 0
94,7 → 94,7
; TODO :: empty memory area
 
; Address of selected socket
sktAddr equ stack_data + 32
;sktAddr equ stack_data + 32
; Parameter to checksum routine - data ptr
checkAdd1 equ stack_data + 36
; Parameter to checksum routine - 2nd data ptr
110,8 → 110,8
pseudoHeader equ stack_data + 50
 
; receive and transmit IP buffer allocation
sockets equ stack_data + 62
Next_free2 equ sockets + (SOCKETBUFFSIZE * NUM_SOCKETS)
;sockets equ stack_data + 62
Next_free2 equ stack_data + 62;Next_free2 equ sockets + (SOCKETBUFFSIZE * NUM_SOCKETS)
; 1560 byte buffer for rx / tx ethernet packets
Ether_buffer equ Next_free2
Next_free3 equ Ether_buffer + 1518
128,9 → 128,14
 
 
;resendQ equ 0x770000
resendBuffer equ resendQ + ( 4 * NUMRESENDENTRIES ) ; for TCP
;resendBuffer equ resendQ + ( 4 * NUMRESENDENTRIES ) ; for TCP ; XTODO: validate size
resendBuffer equ resendQ + ( 8 * NUMRESENDENTRIES ) ; for TCP
 
 
uglobal
net_sockets rd 2
endg
 
; simple macro for memory set operation
macro _memset_dw adr,value,amount
{
151,9 → 156,6
include "queue.inc"
include "eth_drv/ethernet.inc"
include "ip.inc"
include "icmp.inc"
include "tcp.inc"
include "udp.inc"
include "socket.inc"
 
;***************************************************************************
171,8 → 173,11
stack_init:
; Init two address spaces with default values
_memset_dw stack_data_start, 0, 0x20000/4
_memset_dw resendQ, 0xFFFFFFFF, NUMRESENDENTRIES
_memset_dw resendQ, 0, NUMRESENDENTRIES * 2
 
mov [net_sockets], 0
mov [net_sockets + 4], 0
 
; Queries initialization
call queueInit