aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/tcp.c
Commit message (Collapse)AuthorAgeFilesLines
* [tcp] Always set PUSH flag on TCP transmissionsMichael Brown2009-01-211-1/+1
| | | | | | | | | Apparently this can cause a major speedup on some iSCSI targets, which will otherwise wait for a timer to expire before responding. It doesn't seem to hurt other simple TCP test cases (e.g. HTTP downloads). Problem and solution identified by Shiva Shankar <802.11e@gmail.com>
* [tcpip] Allow for transmission to multicast IPv4 addressesMichael Brown2009-01-211-2/+2
| | | | | | | | | | | When sending to a multicast address, it may be necessary to specify the source address explicitly, since the multicast destination address does not provide enough information to deduce the source address via the miniroute table. Allow the source address specified via the data-xfer metadata to be passed down through the TCP/IP stack to the IPv4 layer, which can use it as a default source address.
* [x86_64] Fix assorted 64-bit compilation errors and warningsMichael Brown2008-11-191-5/+6
| | | | | | Remove various 32-bit assumptions scattered throughout the codebase. The code is still not necessarily 64-bit clean, but will at least compile.
* [i386] Change [u]int32_t to [unsigned] int, rather than [unsigned] longMichael Brown2008-11-191-5/+5
| | | | | | This brings us in to line with Linux definitions, and also simplifies adding x86_64 support since both platforms have 2-byte shorts, 4-byte ints and 8-byte long longs.
* [TCP] Avoid shrinking TCP windowMichael Brown2008-06-051-17/+50
| | | | | | | | | | | | | | | Maintain state for the advertised window length, and only ever increase it (instead of calculating it afresh on each transmit). This avoids triggering "treason uncloaked" messages on Linux peers. Respond to zero-length TCP keepalives (i.e. empty data packets transmitted outside the window). Even if the peer wouldn't otherwise expect an ACK (because its packet consumed no sequence space), force an ACK if it was outside the window. We don't yet generate TCP keepalives. It could be done, but it's unclear what benefit this would have. (Linux, for example, doesn't start sending keepalives until the connection has been idle for two hours.)
* Modify gPXE core and drivers to work with the new timer subsystemAlexey Zaytsev2008-03-021-1/+1
| | | | Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
* Make seek information part of the xfer metadata, rather than an entirelyMichael Brown2008-01-081-1/+0
| | | | | | | separate xfer method. Add missing .alloc_iob entries to several xfer_interface_operations structures.
* Various warnings fixups for OpenBSD with gcc-3.3.5.Michael Brown2007-12-071-5/+5
|
* Use start_timer_nodelay() in protocols which rely on the retry timerMichael Brown2007-08-131-1/+1
| | | | | to generate the initial transmission; this cuts off around 0.3s per instantiated connection.
* Add per-file error identifiersMichael Brown2007-07-241-20/+2
|
* Add support for TCP timestampsMichael Brown2007-07-131-3/+71
|
* Adjust received length to take into account any already-received dataMichael Brown2007-07-131-2/+3
| | | | | | in tcp_rx_data(). Clarify comments on discarding duplicate or out-of-order data.
* Avoid reusing auto-allocated ports after connection close.Michael Brown2007-07-131-2/+3
|
* Limit xmit window to one MTU. (Path MTU discovery not yetMichael Brown2007-07-081-16/+34
| | | | implemented; should be done at some point.)
* TCP limits advertised TCP window to size of application windowMichael Brown2007-07-081-0/+4
| | | | obtained via xfer_window().
* Separate the "is data ready" function of xfer_seek() into anMichael Brown2007-07-081-15/+13
| | | | | xfer_window() function, which can return a scalar rather than a boolean.
* Kill off unused request() method in data-xfer interface.Michael Brown2007-07-081-1/+0
|
* convert to zallocHolger Lubitz2007-07-061-2/+1
|
* Mildly ugly hack to force correct linkage.Michael Brown2007-06-281-0/+2
|
* Add concept of transfer metadata, to be used by UDP in order toMichael Brown2007-06-111-1/+3
| | | | implement sendto()/recvfrom() equivalents.
* Add sanity check and extra debug messageMichael Brown2007-05-281-0/+5
|
* Eliminate PF_INET; just use the AF_INET from the struct sockaddr instead.Michael Brown2007-05-261-12/+20
|
* Modify data-xfer semantics: it is no longer necessary to call one ofMichael Brown2007-05-261-42/+11
| | | | | | | | | 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.
* Updated tcp.c to provide a standardised data transfer interface.Michael Brown2007-05-251-348/+406
|
* pkbuff->iobuf changeoverMichael Brown2007-05-191-46/+46
| | | | | | | | 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;'
* SSL needs quite a lot of spare memoryMichael Brown2007-02-011-1/+1
|
* Changed to use the generic stream API.Michael Brown2007-01-311-299/+272
|
* Use stdio.h instead of vsprintf.hMichael Brown2007-01-191-1/+1
|
* Use total free memory as advertised window. This seems to be sufficientMichael Brown2007-01-181-2/+10
| | | | to avoid drops even on slow NICs.
* Switch from calloc() to malloc()+memset() to match the practices usedMichael Brown2007-01-181-1/+2
| | | | almost everywhere else.
* Make TCP give up immediately when it receives -ENETUNREACH fromMichael Brown2007-01-141-39/+55
| | | | | | | 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.
* Advertise a larger MSS to improve TCP performance.Michael Brown2007-01-131-1/+10
|
* Allow an explicit network device to be specified for IP-layerMichael Brown2007-01-101-2/+4
| | | | transmissions.
* Rename pkb_available() to pkb_tailroom() for consistency with Linux'sMichael Brown2007-01-091-3/+3
| | | | skb_tailroom(). Add pkb_headroom().
* Define "connected" asMichael Brown2007-01-091-1/+9
| | | | | | | | | | | | "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.
* Send RST packets when we get a non-matching connection, or receive anMichael Brown2007-01-031-9/+51
| | | | out-of-range ACK.
* Accept RST on received packetsMichael Brown2007-01-031-9/+49
|
* Improve consistency between TCP and UDP RX datapathsMichael Brown2007-01-031-12/+17
|
* Verify checksums on the RX datapath.Michael Brown2007-01-031-9/+16
| | | | Simplify checksum generation on the TX datapath.
* Use auto-colourisation for debug messages.Michael Brown2006-12-291-45/+44
| | | | | | | 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.
* Redefine TCP state to include "flags that have been sent" rather thanMichael Brown2006-12-291-19/+15
| | | | | | "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.
* Don't send a second FIN if we receive a FIN while in FIN_WAIT_2Michael Brown2006-12-271-5/+6
|
* Merge changes from mcb-tcp-fixes branch.Michael Brown2006-12-271-827/+669
|
* Work around another confused-by-RST bugMichael Brown2006-12-061-0/+8
|
* Work around another instance of the port re-use bug.Michael Brown2006-12-051-0/+8
|
* Call closed() method only when the connection is genuinely in theMichael Brown2006-12-051-14/+19
| | | | | TCP_CLOSED state (i.e. after the final FIN/ACK exchange), and has been removed from the list of TCP connections.
* Ensure that tcp_rx() always frees its received packet buffer.Michael Brown2006-12-051-1/+2
|
* Killed off spurious <stdio.h> inclusionMichael Brown2006-12-051-1/+0
|
* Avoid calling NULL methods!Michael Brown2006-12-051-12/+22
|
* added stdio.h to includes for DBG compilationMarty Connor2006-09-271-0/+1
|