Michael Brown
73b09ecba6
Use stdio.h instead of vsprintf.h
18 anos atrás
Michael Brown
c014f607a8
Use total free memory as advertised window. This seems to be sufficient
to avoid drops even on slow NICs.
18 anos atrás
Michael Brown
06630a3036
Switch from calloc() to malloc()+memset() to match the practices used
almost everywhere else.
18 anos atrás
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.
18 anos atrás
Michael Brown
526d314266
Advertise a larger MSS to improve TCP performance.
18 anos atrás
Michael Brown
f008b77ba2
Allow an explicit network device to be specified for IP-layer
transmissions.
18 anos atrás
Michael Brown
18e5353bed
Rename pkb_available() to pkb_tailroom() for consistency with Linux's
skb_tailroom(). Add pkb_headroom().
18 anos atrás
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.
18 anos atrás
Michael Brown
b0daa99dce
Send RST packets when we get a non-matching connection, or receive an
out-of-range ACK.
18 anos atrás
Michael Brown
eea1167a85
Accept RST on received packets
18 anos atrás
Michael Brown
94fc68895d
Improve consistency between TCP and UDP RX datapaths
18 anos atrás
Michael Brown
a0525a4ed3
Verify checksums on the RX datapath.
Simplify checksum generation on the TX datapath.
18 anos atrás
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 anos atrás
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 anos atrás
Michael Brown
be31970e36
Don't send a second FIN if we receive a FIN while in FIN_WAIT_2
18 anos atrás
Michael Brown
61ed298bc7
Merge changes from mcb-tcp-fixes branch.
18 anos atrás
Michael Brown
5edb85c8b4
Work around another confused-by-RST bug
18 anos atrás
Michael Brown
b9f9230661
Work around another instance of the port re-use bug.
18 anos atrás
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 anos atrás
Michael Brown
fcc70c9d60
Ensure that tcp_rx() always frees its received packet buffer.
18 anos atrás
Michael Brown
28c711b91d
Killed off spurious <stdio.h> inclusion
18 anos atrás
Michael Brown
3fbfbad0f7
Avoid calling NULL methods!
18 anos atrás
Marty Connor
6ac78f6aff
added stdio.h to includes for DBG compilation
19 anos atrás
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
19 anos atrás
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.
19 anos atrás
Nikhil Chandru Rao
3aff701001
Changed the TCP state machines behaviour in the ESTABLISHED state
19 anos atrás
Michael Brown
dc8b96b446
Temporarily work around the bug when port numbers are reused between
subsequent runs.
19 anos atrás
Michael Brown
09688cb3b5
Correct some packet ownership and freeing bugs.
19 anos atrás
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.
19 anos atrás
Michael Brown
065a2a486d
Port the UDP port allocation code to TCP
19 anos atrás
Michael Brown
de0c36a98a
Remove some of the confusion surrounding the amount to strip off from
a TCP packet before passing to newdata().
19 anos atrás
Marty Connor
ee9ae8130a
Remove _PROTOCOL macros for gcc 3.2 compatibility
19 anos atrás
Nikhil Chandru Rao
8bf38fb400
Corrected bugs in the TCP logic. There might be a few more which need to be taken care of.
19 anos atrás
Nikhil Chandru Rao
d2bdf81505
Removed some bugs in TCP
19 anos atrás
Nikhil Chandru Rao
cb42e573a0
Added retransmissions to TCP
19 anos atrás
Nikhil Chandru Rao
6714ec745a
Minor corrections
19 anos atrás
Michael Brown
467e9627cc
Added features that will be required for PXE UDP support.
Introduced struct sockaddr_tcpip, to simplify code that deals with
both IPv4 and IPv6 addresses.
Reorganised parts of tcpip.c and udp.c.
19 anos atrás
Nikhil Chandru Rao
9225f4edac
TCP support
19 anos atrás
Michael Brown
8637834031
Made the temporary buffer part of the TCP senddata() API, to ease the
transition away from uIP.
Prepared ipv4.c for transition away from uIP.
19 anos atrás
Michael Brown
3c8aafa209
Simplify RX data path.
Kill off the static single net device and move to proper dynamic
registration (which we need with the new device model).
Break the (flawed) assumption that all network-layer protocols can use
ARP; such network-layer protocols (i.e. IPv4) must now register as an ARP
protocol using ARP_NET_PROTOCOL() and provide a single method for checking
the existence of a local network-layer address.
19 anos atrás
Michael Brown
bbd9e28061
Simplify TX datapath.
19 anos atrás
Michael Brown
f743de4858
Added tcp_kick(). This speed up LILO and GRUB booting by almost two
orders of magnitude.
19 anos atrás
Michael Brown
9e1becaf8a
Merge TCP aborted(), timedout() and closed() methods into a single
closed() method with a reason code.
19 anos atrás
Michael Brown
04b6a1e004
Make all TCP methods optional; at least FTP data is a read-only
connection and so legitimately ignores acked() and senddata().
19 anos atrás
Michael Brown
7af478b30d
Make tcp_connect() void; it will eventually have no failure case.
19 anos atrás
Michael Brown
9c9208a132
Put the TCP connection periodic processing in tcp.c, where it belongs.
19 anos atrás
Michael Brown
592a5a99c8
Moved uIP and tcp.c from proto/ to net/
19 anos atrás
Michael Brown
c8a7133e9f
Added tcp_buffer, to give applications a zero-cost place to build data to
be transmitted.
19 anos atrás
Michael Brown
ee058362fa
We don't need to know anything about ARP
19 anos atrás
Michael Brown
b44332eb7d
Split non-TCP portions of the stack out into ip.[ch].
Added set_ipaddr().
19 anos atrás