david/ipxe
Archived
1
0
Commit Graph

53 Commits

Author SHA1 Message Date
Michael Brown
1311b4194c Eliminate PF_INET; just use the AF_INET from the struct sockaddr instead. 2007-05-26 20:41:23 +00:00
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.
2007-05-26 15:04:36 +00:00
Michael Brown
1136c19fa4 Updated tcp.c to provide a standardised data transfer interface. 2007-05-25 15:58:42 +00:00
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;'
2007-05-19 18:39:40 +00:00
Michael Brown
3fd10074d8 SSL needs quite a lot of spare memory 2007-02-01 09:38:16 +00:00
Michael Brown
6d32f0e6e2 Changed to use the generic stream API. 2007-01-31 02:09:13 +00:00
Michael Brown
73b09ecba6 Use stdio.h instead of vsprintf.h 2007-01-19 01:13:12 +00:00
Michael Brown
c014f607a8 Use total free memory as advertised window. This seems to be sufficient
to avoid drops even on slow NICs.
2007-01-18 20:39:17 +00:00
Michael Brown
06630a3036 Switch from calloc() to malloc()+memset() to match the practices used
almost everywhere else.
2007-01-18 12:45:58 +00:00
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.
2007-01-14 16:47:03 +00:00
Michael Brown
526d314266 Advertise a larger MSS to improve TCP performance. 2007-01-13 17:36:17 +00:00
Michael Brown
f008b77ba2 Allow an explicit network device to be specified for IP-layer
transmissions.
2007-01-10 02:25:11 +00:00
Michael Brown
18e5353bed Rename pkb_available() to pkb_tailroom() for consistency with Linux's
skb_tailroom().  Add pkb_headroom().
2007-01-09 20:56:31 +00:00
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.
2007-01-09 05:01:22 +00:00
Michael Brown
b0daa99dce Send RST packets when we get a non-matching connection, or receive an
out-of-range ACK.
2007-01-03 22:21:59 +00:00
Michael Brown
eea1167a85 Accept RST on received packets 2007-01-03 21:51:36 +00:00
Michael Brown
94fc68895d Improve consistency between TCP and UDP RX datapaths 2007-01-03 21:13:11 +00:00
Michael Brown
a0525a4ed3 Verify checksums on the RX datapath.
Simplify checksum generation on the TX datapath.
2007-01-03 20:48:52 +00:00
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.
2006-12-29 14:03:03 +00:00
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.
2006-12-29 00:44:31 +00:00
Michael Brown
be31970e36 Don't send a second FIN if we receive a FIN while in FIN_WAIT_2 2006-12-27 23:44:05 +00:00
Michael Brown
61ed298bc7 Merge changes from mcb-tcp-fixes branch. 2006-12-27 23:09:46 +00:00
Michael Brown
5edb85c8b4 Work around another confused-by-RST bug 2006-12-06 18:09:33 +00:00
Michael Brown
b9f9230661 Work around another instance of the port re-use bug. 2006-12-05 23:15:35 +00:00
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.
2006-12-05 22:53:28 +00:00
Michael Brown
fcc70c9d60 Ensure that tcp_rx() always frees its received packet buffer. 2006-12-05 21:23:23 +00:00
Michael Brown
28c711b91d Killed off spurious <stdio.h> inclusion 2006-12-05 21:16:52 +00:00
Michael Brown
3fbfbad0f7 Avoid calling NULL methods! 2006-12-05 21:09:37 +00:00
Marty Connor
6ac78f6aff added stdio.h to includes for DBG compilation 2006-09-27 05:57:06 +00:00
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 2006-08-19 16:14:53 +00:00
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.
2006-08-09 15:50:20 +00:00
Nikhil Chandru Rao
3aff701001 Changed the TCP state machines behaviour in the ESTABLISHED state 2006-08-09 15:04:26 +00:00
Michael Brown
dc8b96b446 Temporarily work around the bug when port numbers are reused between
subsequent runs.
2006-08-09 14:44:58 +00:00
Michael Brown
09688cb3b5 Correct some packet ownership and freeing bugs. 2006-08-09 14:27:07 +00:00
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.
2006-08-09 13:35:03 +00:00
Michael Brown
065a2a486d Port the UDP port allocation code to TCP 2006-08-09 12:08:20 +00:00
Michael Brown
de0c36a98a Remove some of the confusion surrounding the amount to strip off from
a TCP packet before passing to newdata().
2006-08-09 12:01:09 +00:00
Marty Connor
ee9ae8130a Remove _PROTOCOL macros for gcc 3.2 compatibility 2006-08-09 04:42:14 +00:00
Nikhil Chandru Rao
8bf38fb400 Corrected bugs in the TCP logic. There might be a few more which need to be taken care of. 2006-08-08 22:25:20 +00:00
Nikhil Chandru Rao
d2bdf81505 Removed some bugs in TCP 2006-08-08 03:42:30 +00:00
Nikhil Chandru Rao
cb42e573a0 Added retransmissions to TCP 2006-08-07 18:52:26 +00:00
Nikhil Chandru Rao
6714ec745a Minor corrections 2006-08-07 07:37:23 +00:00
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.
2006-08-02 00:02:21 +00:00
Nikhil Chandru Rao
9225f4edac TCP support 2006-08-01 20:46:50 +00:00
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.
2006-06-17 23:20:54 +00:00
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.
2006-06-17 22:36:27 +00:00
Michael Brown
bbd9e28061 Simplify TX datapath. 2006-06-16 00:19:46 +00:00
Michael Brown
f743de4858 Added tcp_kick(). This speed up LILO and GRUB booting by almost two
orders of magnitude.
2006-05-27 19:01:20 +00:00
Michael Brown
9e1becaf8a Merge TCP aborted(), timedout() and closed() methods into a single
closed() method with a reason code.
2006-04-30 16:59:45 +00:00
Michael Brown
04b6a1e004 Make all TCP methods optional; at least FTP data is a read-only
connection and so legitimately ignores acked() and senddata().
2006-04-30 13:20:40 +00:00