Michael Brown
096fa94f0c
Add support for TCP timestamps
пре 17 година
Michael Brown
eb530845d4
Adjust received length to take into account any already-received data
in tcp_rx_data().
Clarify comments on discarding duplicate or out-of-order data.
пре 17 година
Michael Brown
d5735c631c
Avoid reusing auto-allocated ports after connection close.
пре 17 година
Michael Brown
edded7546e
Limit xmit window to one MTU. (Path MTU discovery not yet
implemented; should be done at some point.)
пре 17 година
Michael Brown
35afb379af
TCP limits advertised TCP window to size of application window
obtained via xfer_window().
пре 17 година
Michael Brown
b34d4d0449
Separate the "is data ready" function of xfer_seek() into an
xfer_window() function, which can return a scalar rather than a
boolean.
пре 17 година
Michael Brown
ca4c6f9eee
Kill off unused request() method in data-xfer interface.
пре 17 година
Holger Lubitz
dc6c1c294d
convert to zalloc
пре 17 година
Michael Brown
5de837cc67
Mildly ugly hack to force correct linkage.
пре 17 година
Michael Brown
95adce0ce1
Add concept of transfer metadata, to be used by UDP in order to
implement sendto()/recvfrom() equivalents.
пре 17 година
Michael Brown
3acd51597a
Add sanity check and extra debug message
пре 17 година
Michael Brown
1311b4194c
Eliminate PF_INET; just use the AF_INET from the struct sockaddr instead.
пре 17 година
Michael Brown
b8618d76db
Modify data-xfer semantics: it is no longer necessary to call one of
request(), seek() or deliver_xxx() in order to start the data flow.
Autonomous generators must be genuinely autonomous (having their own
process), or otherwise arrange to be called. TCP does this by
starting the retry timer immediately.
Add some debugging statements.
пре 17 година
Michael Brown
1136c19fa4
Updated tcp.c to provide a standardised data transfer interface.
пре 17 година
Michael Brown
3e2c6b6736
pkbuff->iobuf changeover
Achieved via Perl using:
perl -pi -e 's/pk_buff/io_buffer/g; s/Packet buffer/I\/O buffer/ig; ' \
-e 's/pkbuff\.h/iobuf.h/g; s/pkb_/iob_/g; s/_pkb/_iob/g; ' \
-e 's/pkb/iobuf/g; s/PKB/IOB/g;'
пре 17 година
Michael Brown
3fd10074d8
SSL needs quite a lot of spare memory
пре 17 година
Michael Brown
6d32f0e6e2
Changed to use the generic stream API.
пре 17 година
Michael Brown
73b09ecba6
Use stdio.h instead of vsprintf.h
пре 17 година
Michael Brown
c014f607a8
Use total free memory as advertised window. This seems to be sufficient
to avoid drops even on slow NICs.
пре 17 година
Michael Brown
06630a3036
Switch from calloc() to malloc()+memset() to match the practices used
almost everywhere else.
пре 17 година
Michael Brown
76aa9ad07d
Make TCP give up immediately when it receives -ENETUNREACH from
tcpip_tx(). This avoids the irritating wait when you accidentally type
"kernel pxelinux.0" before bringing up the network interface.
Add ENETUNREACH to strerror()'s list.
пре 17 година
Michael Brown
526d314266
Advertise a larger MSS to improve TCP performance.
пре 17 година
Michael Brown
f008b77ba2
Allow an explicit network device to be specified for IP-layer
transmissions.
пре 17 година
Michael Brown
18e5353bed
Rename pkb_available() to pkb_tailroom() for consistency with Linux's
skb_tailroom(). Add pkb_headroom().
пре 17 година
Michael Brown
2eeb7c4fe7
Define "connected" as
"when SYN is ACKed and we have already received SYN", or
"when SYN is received and we have already had SYN ACKed"
rather than just
"when SYN is ACKed"
This avoids spuriously calling the connected() method when we receive
a RST,ACK in response to a SYN.
пре 17 година
Michael Brown
b0daa99dce
Send RST packets when we get a non-matching connection, or receive an
out-of-range ACK.
пре 18 година
Michael Brown
eea1167a85
Accept RST on received packets
пре 18 година
Michael Brown
94fc68895d
Improve consistency between TCP and UDP RX datapaths
пре 18 година
Michael Brown
a0525a4ed3
Verify checksums on the RX datapath.
Simplify checksum generation on the TX datapath.
пре 18 година
Michael Brown
feb4f65d1e
Use auto-colourisation for debug messages.
Truncate TX length to TCP window at time of transmission rather than at
time of adding to TX packet; this is conceptually cleaner and also allows
the application to call tcp_send() multiple times to build up a single
packet.
пре 18 година
Michael Brown
ce9819af27
Redefine TCP state to include "flags that have been sent" rather than
"flags that are currently being sent". This allows at least one special
case (checking that we haven't already sent a FIN in tcp_rx_fin()) to be
collapsed.
пре 18 година
Michael Brown
be31970e36
Don't send a second FIN if we receive a FIN while in FIN_WAIT_2
пре 18 година
Michael Brown
61ed298bc7
Merge changes from mcb-tcp-fixes branch.
пре 18 година
Michael Brown
5edb85c8b4
Work around another confused-by-RST bug
пре 18 година
Michael Brown
b9f9230661
Work around another instance of the port re-use bug.
пре 18 година
Michael Brown
cc0b92652f
Call closed() method only when the connection is genuinely in the
TCP_CLOSED state (i.e. after the final FIN/ACK exchange), and has been
removed from the list of TCP connections.
пре 18 година
Michael Brown
fcc70c9d60
Ensure that tcp_rx() always frees its received packet buffer.
пре 18 година
Michael Brown
28c711b91d
Killed off spurious <stdio.h> inclusion
пре 18 година
Michael Brown
3fbfbad0f7
Avoid calling NULL methods!
пре 18 година
Marty Connor
6ac78f6aff
added stdio.h to includes for DBG compilation
пре 18 година
Nikhil Chandru Rao
dccb8358bd
Fixed a bug in the TCP state machine. Added a transition from ESTABLISHED to LAST_ACK on receiving a FIN,ACK
пре 18 година
Michael Brown
f0718d562f
Don't call stop_timer() from within the timer expiry callback; it's
already stopped.
Don't call start_timer() when sending a dataless ACK. This may or may
not be the right thing to do; I can't tell.
Back out broken "send ACK only if required to" logic temporarily.
пре 18 година
Nikhil Chandru Rao
3aff701001
Changed the TCP state machines behaviour in the ESTABLISHED state
пре 18 година
Michael Brown
dc8b96b446
Temporarily work around the bug when port numbers are reused between
subsequent runs.
пре 18 година
Michael Brown
09688cb3b5
Correct some packet ownership and freeing bugs.
пре 18 година
Michael Brown
43d601b678
out_flags was being set but never used.
Use just random() to allocate initial sequence numbers; the previous
algorithm ended up with a high probability of zeroing the high word.
пре 18 година
Michael Brown
065a2a486d
Port the UDP port allocation code to TCP
пре 18 година
Michael Brown
de0c36a98a
Remove some of the confusion surrounding the amount to strip off from
a TCP packet before passing to newdata().
пре 18 година
Marty Connor
ee9ae8130a
Remove _PROTOCOL macros for gcc 3.2 compatibility
пре 18 година
Nikhil Chandru Rao
8bf38fb400
Corrected bugs in the TCP logic. There might be a few more which need to be taken care of.
пре 18 година