forked from KolibriOS/kolibrios
Fix EN typos
Small corrections for grammar and fluency [en_US]. git-svn-id: svn://kolibrios.org@10058 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
f133c9d045
commit
349dbb6edf
@ -217,7 +217,7 @@ arp_input:
|
||||
.gotit:
|
||||
DEBUGF DEBUG_NETWORK_VERBOSE, "ARP_input: found matching entry\n"
|
||||
|
||||
cmp [esi + ARP_entry.TTL], ARP_STATIC_ENTRY ; if it is a static entry, dont touch it
|
||||
cmp [esi + ARP_entry.TTL], ARP_STATIC_ENTRY ; if it is a static entry, don't touch it
|
||||
je .exit
|
||||
|
||||
DEBUGF DEBUG_NETWORK_VERBOSE, "ARP_input: updating entry\n"
|
||||
@ -239,7 +239,7 @@ arp_input:
|
||||
cmp [edx + ARP_header.Opcode], ARP_REQ_OPCODE
|
||||
jne .exit
|
||||
|
||||
DEBUGF DEBUG_NETWORK_VERBOSE, "ARP_input: its a request\n"
|
||||
DEBUGF DEBUG_NETWORK_VERBOSE, "ARP_input: it is a request\n"
|
||||
|
||||
mov eax, [IPv4_address + edi]
|
||||
cmp eax, [edx + ARP_header.TargetIP] ; Is it looking for my IP address?
|
||||
@ -388,10 +388,10 @@ arp_add_entry:
|
||||
cmp [edi + ARP_entry.Status], ARP_NO_ENTRY ; is this slot empty?
|
||||
je .add
|
||||
|
||||
cmp [edi + ARP_entry.IP], eax ; if not, check if it doesnt collide
|
||||
cmp [edi + ARP_entry.IP], eax ; if not, check it doesn't collide
|
||||
jne .maybe_next
|
||||
|
||||
cmp [edi + ARP_entry.TTL], ARP_STATIC_ENTRY ; ok, its the same IP, update it if not static
|
||||
cmp [edi + ARP_entry.TTL], ARP_STATIC_ENTRY ; ok, it's the same IP, update it if not static
|
||||
jne .add
|
||||
|
||||
DEBUGF DEBUG_NETWORK_ERROR, "ARP_add_entry: failed, IP already has a static entry\n"
|
||||
|
@ -203,7 +203,7 @@ macro ipv4_checksum ptr {
|
||||
|
||||
;-----------------------------------------------------------------;
|
||||
; ;
|
||||
; ipv4_input: Check if IPv4 Packet isnt damaged and call ;
|
||||
; ipv4_input: Check the IPv4 Packet is not damaged and call ;
|
||||
; appropriate handler. (TCP/UDP/ICMP/..) ;
|
||||
; We will also re-construct fragmented packets. ;
|
||||
; ;
|
||||
@ -258,7 +258,7 @@ ipv4_input:
|
||||
cmp eax, 224
|
||||
je .ip_ok
|
||||
|
||||
; maybe we just dont have an IP yet and should accept everything on the IP level
|
||||
; maybe we just don't have an IP yet and should accept everything on the IP level
|
||||
cmp [IPv4_address + edi], 0
|
||||
je .ip_ok
|
||||
|
||||
@ -393,7 +393,7 @@ ipv4_input:
|
||||
or edi, -1
|
||||
.find_last_entry: ; The following routine will try to find the last entry
|
||||
cmp edi, [esi + sizeof.NET_BUFF + IPv4_FRAGMENT_entry.PrevPtr]
|
||||
jne .destroy_slot ; Damn, something screwed up, remove the whole slot (and free buffers too if possible!)
|
||||
jne .destroy_slot ; Oh, something screwed up, remove the whole slot (and free buffers too if possible!)
|
||||
mov edi, esi
|
||||
mov esi, [esi + sizeof.NET_BUFF + IPv4_FRAGMENT_entry.NextPtr]
|
||||
cmp esi, -1
|
||||
@ -461,7 +461,7 @@ ipv4_input:
|
||||
|
||||
.count_bytes:
|
||||
cmp [esi + sizeof.NET_BUFF + IPv4_FRAGMENT_entry.PrevPtr], edi
|
||||
jne .destroy_slot_pop ; Damn, something screwed up, remove the whole slot (and free buffers too if possible!)
|
||||
jne .destroy_slot_pop ; Oh, something screwed up, remove the whole slot (and free buffers too if possible!)
|
||||
mov cx, [esi + sizeof.NET_BUFF + sizeof.IPv4_FRAGMENT_entry + IPv4_header.TotalLength] ; Add total length
|
||||
xchg cl, ch
|
||||
DEBUGF DEBUG_NETWORK_VERBOSE, "IPv4_input: Packet size=%u\n", cx
|
||||
@ -482,7 +482,7 @@ ipv4_input:
|
||||
mov [esi + sizeof.NET_BUFF + IPv4_FRAGMENT_entry.PrevPtr], edi
|
||||
mov [esi + sizeof.NET_BUFF + IPv4_FRAGMENT_entry.Owner], ebx
|
||||
|
||||
mov cx, [edx + IPv4_header.TotalLength] ; Note: This time we dont substract Header length
|
||||
mov cx, [edx + IPv4_header.TotalLength] ; Note: This time we don't substract Header length
|
||||
xchg cl, ch
|
||||
DEBUGF DEBUG_NETWORK_VERBOSE, "IPv4_input: Packet size=%u\n", cx
|
||||
add ax, cx
|
||||
@ -503,7 +503,7 @@ ipv4_input:
|
||||
push eax
|
||||
call kernel_alloc
|
||||
test eax, eax
|
||||
je .destroy_slot_pop12 ; If we dont have enough space to allocate the buffer, discard all packets in slot
|
||||
je .destroy_slot_pop12 ; If we don't have enough space to allocate the buffer, discard all packets in slot
|
||||
mov edx, [esp+8] ; Get pointer to first fragment entry back in edx
|
||||
|
||||
; FIXME: Allocate NET_BUFF here instead of raw IP packet buffer
|
||||
@ -525,7 +525,7 @@ ipv4_input:
|
||||
|
||||
cmp edi, eax ; Is this packet the first fragment ?
|
||||
je .first_fragment
|
||||
sub cx, bx ; If not, dont copy the header
|
||||
sub cx, bx ; If not, don't copy the header
|
||||
add esi, ebx ;
|
||||
add edi, ebx ; FIXME: We should add size of header of first fragment here
|
||||
; instead of size of currently copying fragment
|
||||
|
@ -61,7 +61,7 @@ macro ipv6_init {
|
||||
|
||||
;-----------------------------------------------------------------;
|
||||
; ;
|
||||
; ipv6_input: Check if IPv6 Packet isnt damaged and call ;
|
||||
; ipv6_input: Check the IPv6 Packet is not damaged and call ;
|
||||
; appropriate handler. (TCP/UDP/ICMP/..) ;
|
||||
; We will also re-construct fragmented packets ;
|
||||
; ;
|
||||
@ -285,4 +285,3 @@ ipv6_api:
|
||||
.packets_rx:
|
||||
mov eax, [IPv6.packets_rx + eax]
|
||||
ret
|
||||
|
||||
|
@ -16,8 +16,8 @@
|
||||
; The Queues implemented by these macros form a ring-buffer.
|
||||
; The data to these queue's always looks like this:
|
||||
;
|
||||
; At top, you have the queue struct, wich has the size (number of currently queued packets, read and write pointers.
|
||||
; This struct is followed by a number of slots wich you can read and write to using the macros.
|
||||
; At top, you have the queue struct, which has the size number of currently queued packets, read and write pointers.
|
||||
; This struct is followed by a number of slots which you can read and write to using the macros.
|
||||
; How these slots look like is up to you to chose, normally they should have at least a pointer to where the real data is.
|
||||
; (you can see some examples below)
|
||||
|
||||
@ -37,8 +37,8 @@ ends
|
||||
; entry_size = size of one slot, in bytes
|
||||
; failaddr = the address where macro will jump to when there is no data in the queue
|
||||
|
||||
; additionally, add_to_queue requires you to set esi to the data wich you want to queue
|
||||
; get_from_queue on the other hand will return a pointer in esi, to the entry you're interessed in
|
||||
; additionally, add_to_queue requires you to set esi to the data which you want to queue
|
||||
; get_from_queue on the other hand will return a pointer in esi, to the entry you're interested in
|
||||
; PS: macros WILL destroy ecx and edi
|
||||
|
||||
macro add_to_queue ptr, size, entry_size, failaddr {
|
||||
@ -47,7 +47,7 @@ local .ok, .no_wrap
|
||||
|
||||
spin_lock_irqsave
|
||||
|
||||
cmp [ptr + queue.size], size ; Check if queue isnt full
|
||||
cmp [ptr + queue.size], size ; Check if queue isn't full
|
||||
jb .ok
|
||||
|
||||
spin_unlock_irqrestore
|
||||
|
@ -745,7 +745,7 @@ socket_close:
|
||||
|
||||
mov dword[esp + SYSCALL_STACK.eax], 0 ; The socket exists, so we will succeed in closing it.
|
||||
|
||||
or [eax + SOCKET.options], SO_NONBLOCK ; Mark the socket as non blocking, we dont want it to block any longer!
|
||||
or [eax + SOCKET.options], SO_NONBLOCK ; Mark the socket as non blocking, we don't want it to block any longer!
|
||||
|
||||
test [eax + SOCKET.state], SS_BLOCKED ; Is the socket still in blocked state?
|
||||
jz @f
|
||||
@ -1055,7 +1055,7 @@ socket_send_tcp:
|
||||
mov [esp + SYSCALL_STACK.eax], ecx
|
||||
mov [eax + SOCKET.errorcode], 0
|
||||
push eax
|
||||
call tcp_output ; FIXME: this doesnt look pretty, does it?
|
||||
call tcp_output ; FIXME: this doesn't look pretty, does it?
|
||||
pop eax
|
||||
mov eax, [eax + SOCKET.errorcode]
|
||||
mov [esp + SYSCALL_STACK.ebx], eax
|
||||
@ -1834,7 +1834,7 @@ socket_ring_free:
|
||||
|
||||
ret
|
||||
|
||||
.error: ; we could free all available bytes, but that would be stupid, i guess..
|
||||
.error: ; we could free all available bytes, but that would be stupid, I guess..
|
||||
DEBUGF DEBUG_NETWORK_ERROR, "SOCKET_ring_free: buffer=%x error!\n", eax
|
||||
add [eax + RING_BUFFER.size], ecx
|
||||
|
||||
|
@ -205,7 +205,7 @@ endl
|
||||
DEBUGF DEBUG_NETWORK_VERBOSE, "TCP_input: socket ptr=%x state=%u flags=%x\n", ebx, [ebx + TCP_SOCKET.t_state], [edx + TCP_header.Flags]:2
|
||||
|
||||
;----------------------------
|
||||
; Check if socket isnt closed
|
||||
; Check if socket is not closed
|
||||
|
||||
cmp [ebx + TCP_SOCKET.t_state], TCPS_CLOSED
|
||||
je .drop_no_socket
|
||||
@ -232,7 +232,7 @@ endl
|
||||
push ecx
|
||||
mov cl, [ebx + TCP_SOCKET.SND_SCALE]
|
||||
shl eax, cl
|
||||
mov dword[edx + TCP_header.Window], eax ; word after window is checksum, we dont need checksum anymore
|
||||
mov dword[edx + TCP_header.Window], eax ; word after window is checksum, we don't need checksum anymore
|
||||
pop ecx
|
||||
|
||||
;-----------------------------------------------------------------------------------
|
||||
@ -397,7 +397,7 @@ endl
|
||||
mov [ebx + TCP_SOCKET.ts_ecr], eax
|
||||
or [temp_bits], TCP_BIT_TIMESTAMP
|
||||
|
||||
; Since we have a timestamp, lets do the paws test right away!
|
||||
; Since we have a timestamp, let's do the paws test right away!
|
||||
|
||||
test [edx + TCP_header.Flags], TH_RST
|
||||
jnz .no_paws
|
||||
@ -1270,7 +1270,7 @@ endl
|
||||
jz .ack_processed
|
||||
|
||||
; If we can't receive any more data, then closing user can proceed.
|
||||
; Starting the timer is contrary to the specification, but if we dont get a FIN,
|
||||
; Starting the timer is contrary to the specification, but if we don't get a FIN,
|
||||
; we'll hang forever.
|
||||
|
||||
test [ebx + SOCKET.state], SS_CANTRCVMORE
|
||||
@ -1514,7 +1514,7 @@ endl
|
||||
|
||||
inc [edx + TCP_header.SequenceNumber]
|
||||
|
||||
; Drop any received data that doesnt fit in the receive window.
|
||||
; Drop any received data that doesn't fit in the receive window.
|
||||
|
||||
cmp ecx, [ebx + TCP_SOCKET.RCV_WND]
|
||||
jbe .dont_trim
|
||||
@ -1542,7 +1542,7 @@ endl
|
||||
.ack_processed:
|
||||
DEBUGF DEBUG_NETWORK_VERBOSE, "TCP_input: ACK processed\n"
|
||||
|
||||
; dont look at window if no ACK
|
||||
; don't look at window if no ACK
|
||||
|
||||
test [edx + TCP_header.Flags], TH_ACK
|
||||
jz .no_window_update
|
||||
@ -1668,7 +1668,7 @@ endl
|
||||
cmp [ebx + TCP_SOCKET.t_state], TCPS_ESTABLISHED
|
||||
jne .out_of_order
|
||||
|
||||
; Ok, lets do this.. Set delayed ACK flag and copy data into socket buffer
|
||||
; Ok, let's do this.. Set delayed ACK flag and copy data into socket buffer
|
||||
|
||||
or [ebx + TCP_SOCKET.t_flags], TF_DELACK
|
||||
|
||||
@ -1691,7 +1691,7 @@ endl
|
||||
DEBUGF DEBUG_NETWORK_VERBOSE, "TCP data is out of order!\nSequencenumber is %u, we expected %u.\n", \
|
||||
[edx + TCP_header.SequenceNumber], [ebx + TCP_SOCKET.RCV_NXT]
|
||||
|
||||
; Uh-oh, some data is out of order, lets call TCP reassemble for help
|
||||
; Uh-oh, some data is out of order, let's call TCP reassemble for help
|
||||
|
||||
call tcp_reassemble ;;; TODO!
|
||||
|
||||
@ -1835,7 +1835,7 @@ endl
|
||||
test [edx + TCP_header.Flags], TH_RST
|
||||
jnz .done
|
||||
|
||||
; TODO: if its a multicast/broadcast, also drop
|
||||
; TODO: if it's a multicast/broadcast, also drop
|
||||
|
||||
test [edx + TCP_header.Flags], TH_ACK
|
||||
jnz .respond_ack
|
||||
@ -1871,7 +1871,7 @@ endl
|
||||
test [edx + TCP_header.Flags], TH_RST
|
||||
jnz .drop_no_socket
|
||||
|
||||
; TODO: if its a multicast/broadcast, also drop
|
||||
; TODO: if it's a multicast/broadcast, also drop
|
||||
|
||||
test [edx + TCP_header.Flags], TH_ACK
|
||||
jnz .respond_seg_ack
|
||||
|
@ -408,7 +408,7 @@ endl
|
||||
; esi = data len
|
||||
|
||||
;---------------------------------------------
|
||||
; check if we dont exceed the max segment size
|
||||
; check if we don't exceed the max segment size
|
||||
|
||||
add esi, edi ; total TCP segment size
|
||||
cmp esi, [eax + TCP_SOCKET.t_maxseg]
|
||||
@ -464,7 +464,7 @@ endl
|
||||
.eos:
|
||||
|
||||
;---------------------------------------------------
|
||||
; Dont increase sequence number when resending a FIN
|
||||
; Don't increase sequence number when resending a FIN
|
||||
|
||||
test dl, TH_FIN
|
||||
jz .no_fin_retransmit
|
||||
@ -482,7 +482,7 @@ endl
|
||||
|
||||
;----------------------------------------------------
|
||||
; Calculate the receive window.
|
||||
; Dont shrink window, but avoid silly window syndrome
|
||||
; Don't shrink window, but avoid silly window syndrome
|
||||
|
||||
xor ebx, ebx
|
||||
test [eax + SOCKET.state], SS_CANTRCVMORE
|
||||
|
@ -61,7 +61,7 @@ macro tcp_checksum IP1, IP2 {
|
||||
|
||||
macro tcp_sendseqinit ptr {
|
||||
|
||||
push edi ;;;; FIXME: i dont like this static use of edi
|
||||
push edi ;;;; FIXME: I don't like this static use of edi
|
||||
mov edi, [ptr + TCP_SOCKET.ISS]
|
||||
mov [ptr + TCP_SOCKET.SND_UP], edi
|
||||
mov [ptr + TCP_SOCKET.SND_MAX], edi
|
||||
@ -77,7 +77,7 @@ macro tcp_rcvseqinit ptr {
|
||||
|
||||
push edi
|
||||
mov edi, [ptr + TCP_SOCKET.IRS]
|
||||
inc edi ; SYN ocupies a sequence number
|
||||
inc edi ; SYN occupies a sequence number
|
||||
mov [ptr + TCP_SOCKET.RCV_NXT], edi
|
||||
mov [ptr + TCP_SOCKET.RCV_ADV], edi
|
||||
pop edi
|
||||
@ -182,7 +182,7 @@ tcp_disconnect:
|
||||
DEBUGF DEBUG_NETWORK_VERBOSE, "TCP_disconnect: %x\n", eax
|
||||
|
||||
cmp [eax + TCP_SOCKET.t_state], TCPS_ESTABLISHED
|
||||
jb tcp_close ; Connection not yet synchronised, just get rid of the socket
|
||||
jb tcp_close ; Connection not yet synchronized, just get rid of the socket
|
||||
|
||||
test [eax + SOCKET.options], SO_LINGER
|
||||
jz .nolinger
|
||||
|
Loading…
Reference in New Issue
Block a user