mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-27 00:39:41 +03:00
Some markup changes in network stack.
git-svn-id: svn://kolibrios.org@2924 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
a31be47dbc
commit
8140e5df69
@ -60,7 +60,7 @@ uglobal
|
|||||||
|
|
||||||
NumARP dd ?
|
NumARP dd ?
|
||||||
|
|
||||||
ARP_table rb ARP_TABLE_SIZE * sizeof.ARP_entry
|
ARP_table rb ARP_TABLE_SIZE * sizeof.ARP_entry ; TODO: separate ARP table and stats per interface
|
||||||
|
|
||||||
ARP_PACKETS_TX rd MAX_NET_DEVICES
|
ARP_PACKETS_TX rd MAX_NET_DEVICES
|
||||||
ARP_PACKETS_RX rd MAX_NET_DEVICES
|
ARP_PACKETS_RX rd MAX_NET_DEVICES
|
||||||
|
@ -19,8 +19,6 @@
|
|||||||
$Revision$
|
$Revision$
|
||||||
|
|
||||||
MAX_FRAGMENTS = 64
|
MAX_FRAGMENTS = 64
|
||||||
MAX_IP = MAX_NET_DEVICES
|
|
||||||
IP_MAX_INTERFACES = MAX_IP
|
|
||||||
|
|
||||||
struct IPv4_header
|
struct IPv4_header
|
||||||
|
|
||||||
@ -60,14 +58,14 @@ ends
|
|||||||
align 4
|
align 4
|
||||||
uglobal
|
uglobal
|
||||||
|
|
||||||
IP_LIST rd MAX_IP
|
IP_LIST rd MAX_NET_DEVICES
|
||||||
SUBNET_LIST rd MAX_IP
|
SUBNET_LIST rd MAX_NET_DEVICES
|
||||||
DNS_LIST rd MAX_IP
|
DNS_LIST rd MAX_NET_DEVICES
|
||||||
GATEWAY_LIST rd MAX_IP
|
GATEWAY_LIST rd MAX_NET_DEVICES
|
||||||
BROADCAST_LIST rd MAX_IP
|
BROADCAST_LIST rd MAX_NET_DEVICES
|
||||||
|
|
||||||
IP_PACKETS_TX rd MAX_IP
|
IP_PACKETS_TX rd MAX_NET_DEVICES
|
||||||
IP_PACKETS_RX rd MAX_IP
|
IP_PACKETS_RX rd MAX_NET_DEVICES
|
||||||
|
|
||||||
FRAGMENT_LIST rb MAX_FRAGMENTS * sizeof.FRAGMENT_slot
|
FRAGMENT_LIST rb MAX_FRAGMENTS * sizeof.FRAGMENT_slot
|
||||||
endg
|
endg
|
||||||
@ -84,7 +82,7 @@ macro IPv4_init {
|
|||||||
|
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
mov edi, IP_LIST
|
mov edi, IP_LIST
|
||||||
mov ecx, 7*MAX_IP + (sizeof.FRAGMENT_slot*MAX_FRAGMENTS)/4
|
mov ecx, 7*MAX_NET_DEVICES + (sizeof.FRAGMENT_slot*MAX_FRAGMENTS)/4
|
||||||
rep stosd
|
rep stosd
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -542,10 +540,8 @@ IPv4_find_fragment_slot:
|
|||||||
.try_next:
|
.try_next:
|
||||||
add esi, sizeof.FRAGMENT_slot
|
add esi, sizeof.FRAGMENT_slot
|
||||||
loop .find_slot
|
loop .find_slot
|
||||||
; pop edx ebx
|
|
||||||
or esi, -1
|
|
||||||
; ret
|
|
||||||
|
|
||||||
|
or esi, -1
|
||||||
.found_slot:
|
.found_slot:
|
||||||
pop edx ecx ebx eax
|
pop edx ecx ebx eax
|
||||||
ret
|
ret
|
||||||
@ -869,7 +865,7 @@ IPv4_dest_to_dev:
|
|||||||
je .broadcast
|
je .broadcast
|
||||||
|
|
||||||
xor edi, edi
|
xor edi, edi
|
||||||
mov ecx, MAX_IP
|
mov ecx, MAX_NET_DEVICES
|
||||||
.loop:
|
.loop:
|
||||||
mov ebx, [IP_LIST+edi]
|
mov ebx, [IP_LIST+edi]
|
||||||
and ebx, [SUBNET_LIST+edi]
|
and ebx, [SUBNET_LIST+edi]
|
||||||
|
@ -100,8 +100,8 @@ ends
|
|||||||
|
|
||||||
align 4
|
align 4
|
||||||
uglobal
|
uglobal
|
||||||
ICMP_PACKETS_TX rd MAX_IP
|
ICMP_PACKETS_TX rd MAX_NET_DEVICES
|
||||||
ICMP_PACKETS_RX rd MAX_IP
|
ICMP_PACKETS_RX rd MAX_NET_DEVICES
|
||||||
endg
|
endg
|
||||||
|
|
||||||
|
|
||||||
@ -116,7 +116,7 @@ macro ICMP_init {
|
|||||||
|
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
mov edi, ICMP_PACKETS_TX
|
mov edi, ICMP_PACKETS_TX
|
||||||
mov ecx, 2*MAX_IP
|
mov ecx, 2*MAX_NET_DEVICES
|
||||||
rep stosd
|
rep stosd
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -118,7 +118,7 @@ struct TCP_SOCKET IP_SOCKET
|
|||||||
requested_s_scale db ?
|
requested_s_scale db ?
|
||||||
request_r_scale db ?
|
request_r_scale db ?
|
||||||
|
|
||||||
ts_recent dd ?
|
ts_recent dd ? ; a copy of the most-recent valid timestamp from the other end
|
||||||
ts_recent_age dd ?
|
ts_recent_age dd ?
|
||||||
last_ack_sent dd ?
|
last_ack_sent dd ?
|
||||||
|
|
||||||
@ -133,6 +133,7 @@ struct TCP_SOCKET IP_SOCKET
|
|||||||
; extra
|
; extra
|
||||||
|
|
||||||
sendalot db ? ; also used as 'need output'
|
sendalot db ? ; also used as 'need output'
|
||||||
|
ts_ecr dd ? ; timestamp echo reply
|
||||||
|
|
||||||
ends
|
ends
|
||||||
|
|
||||||
|
@ -118,6 +118,8 @@ API_TCP = 4
|
|||||||
API_ARP = 5
|
API_ARP = 5
|
||||||
API_PPPOE = 6
|
API_PPPOE = 6
|
||||||
|
|
||||||
|
HWACC_TCP_IPv4 = 1 shl 0
|
||||||
|
|
||||||
struct NET_DEVICE
|
struct NET_DEVICE
|
||||||
|
|
||||||
type dd ? ; Type field
|
type dd ? ; Type field
|
||||||
|
@ -96,10 +96,10 @@ ends
|
|||||||
|
|
||||||
align 4
|
align 4
|
||||||
uglobal
|
uglobal
|
||||||
TCP_segments_tx rd IP_MAX_INTERFACES
|
TCP_segments_tx rd MAX_NET_DEVICES
|
||||||
TCP_segments_rx rd IP_MAX_INTERFACES
|
TCP_segments_rx rd MAX_NET_DEVICES
|
||||||
TCP_bytes_rx rq IP_MAX_INTERFACES
|
TCP_bytes_rx rq MAX_NET_DEVICES
|
||||||
TCP_bytes_tx rq IP_MAX_INTERFACES
|
TCP_bytes_tx rq MAX_NET_DEVICES
|
||||||
TCP_sequence_num dd ?
|
TCP_sequence_num dd ?
|
||||||
endg
|
endg
|
||||||
|
|
||||||
@ -115,7 +115,7 @@ macro TCP_init {
|
|||||||
|
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
mov edi, TCP_segments_tx
|
mov edi, TCP_segments_tx
|
||||||
mov ecx, (6*IP_MAX_INTERFACES)
|
mov ecx, (6*MAX_NET_DEVICES)
|
||||||
rep stosd
|
rep stosd
|
||||||
|
|
||||||
pseudo_random eax
|
pseudo_random eax
|
||||||
|
@ -29,8 +29,8 @@ ends
|
|||||||
|
|
||||||
align 4
|
align 4
|
||||||
uglobal
|
uglobal
|
||||||
UDP_PACKETS_TX rd MAX_IP
|
UDP_PACKETS_TX rd MAX_NET_DEVICES
|
||||||
UDP_PACKETS_RX rd MAX_IP
|
UDP_PACKETS_RX rd MAX_NET_DEVICES
|
||||||
endg
|
endg
|
||||||
|
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ macro UDP_init {
|
|||||||
|
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
mov edi, UDP_PACKETS_TX
|
mov edi, UDP_PACKETS_TX
|
||||||
mov ecx, 2*MAX_IP
|
mov ecx, 2*MAX_NET_DEVICES
|
||||||
rep stosd
|
rep stosd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user