haiku/headers/private
Andreas Färber b7e825d6e7 boot_net: Add TCP support
Modelled after UDP, add limited TCP support to the boot net stack. The socket
works by queuing received packets as well as sent packets that have not yet
been ACK'ed. Some known issues are documented, especially there's only limited
congestion control. I.e., we send immediately and in unlimited quantity, thus
its use should be restricted to local networks, and due to a fixed window size
there is potential for our socket being overrun with data packets before they
are read. Some corner cases like wrapping sequence numbers may cause a timeout.

The TCP implementation is based on Andrew S. Tanenbaum's "Computer Networks",
4th ed., as well as lecture notes from Prof. W. Effelsberg, the relevant RFCs
and Wikipedia. The pseudo-random number Galois LFSR used for the sequence
number was suggested by Endre Varga.

Since the code is unlikely to get much smaller, better merge it now so that
subsequent changes get easier to review. No platform actively uses TCP sockets
yet, and the receiving code has been reviewed for endianness issues and should
terminate okay after verifying the checksum if no sockets are open.
Based on a version tested with custom code (#5240) as well as with iSCSI.
Compile-tested boot_loader_openfirmware, pxehaiku-loader with gcc4 and
haiku_loader with gcc2. Closes ticket #5240.

Changes from #5240 proposed patch:
* Various bug fixes related to queuing, some memory leaks fixed.
* Never bump the sequence number when dequeuing a packet. It's done afterwards.
* Don't bump the sequence number again when resending the queue or ACK'ing.
* Aggressively ACK while waiting for packets.
* Don't queue sent ACK-only packets.
* More trace output, esp. for queue inspection.
* Adapted use of TCP header flags to r38434.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38472 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-31 01:00:06 +00:00
..
app Remove unused PortLinkRef again. 2010-08-17 23:27:22 +00:00
audio
binary_compatibility Patch by Alex Wilson (minor changes by myself) related to the new archiving 2010-07-16 16:49:42 +00:00
bluetooth Fix #6373, second try 2010-08-19 15:29:02 +00:00
debug
device
drivers SCSI: Add struct for READ (16) and WRITE (16) commands 2010-08-29 13:03:05 +00:00
firewire
fs_shell Introduced types [__haiku_]generic_{addr,size}_t which are wide enough for 2010-06-02 18:22:38 +00:00
graphics Always set the LVDS panel to its native mode, except for the 'display' part. 2010-08-25 15:06:49 +00:00
haiku_package
input
interface Fix coding style. 2010-08-20 04:34:18 +00:00
kernel boot_net: Add TCP support 2010-08-31 01:00:06 +00:00
libbe
libroot Optimised passing around of timezone a bit 2010-08-16 22:01:28 +00:00
locale * removed all BLocale-related getters from BLocaleRoster - they're available 2010-08-30 19:58:19 +00:00
mail Mail: Always include posix/regex.h 2010-08-18 23:58:57 +00:00
media * Renamed _plugin_manager to gPluginManager. 2010-08-24 13:30:39 +00:00
midi
mount
net * Made an uint32 out of net_socket::bound_to_device. 2010-08-27 10:56:41 +00:00
notification
print
runtime_loader
screen_saver
shared * Renamed DescriptorCloser to FileDescriptorCloser as suggested by Ingo. 2010-08-09 21:23:05 +00:00
storage Add the possibility to load all add-ons in a directory immediately. 2010-08-29 22:05:33 +00:00
support
syslog_daemon
system Optimised passing around of timezone a bit 2010-08-16 22:01:28 +00:00
textencoding
tracker
usb_vision
userlandfs Should have been part of r37678. io_request_is_vip() support. 2010-07-22 11:09:32 +00:00
vmdk