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 Move this to media/, seems audio/ is only for old stuff. 2007-08-29 12:31:55 +00:00
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 Added UnhandledDebugMessage() hook which is called by the base class 2010-03-26 21:18:08 +00:00
device Fix Device Kit build in debug mode. 2009-09-13 01:30:38 +00:00
drivers SCSI: Add struct for READ (16) and WRITE (16) commands 2010-08-29 13:03:05 +00:00
firewire wakeup() means wake any waiting threads, so we use the relevant flags. this gives a reliable dv receive stream here. 2009-05-24 23:15:04 +00:00
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 Implemented a tool ("package") that implements creation and extraction of 2009-11-13 13:45:49 +00:00
input * Removed the at_kbd_io and AT keyboard stuff; this is now done within the PS/2 2010-04-14 19:19:14 +00:00
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 olta+pulkomandy: 2010-04-12 18:07:09 +00:00
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 Made all server version and signatures consistent, and thus closing bug #909. 2006-10-22 17:56:02 +00:00
mount * Removed now obsolete notification (this was not even used in Tracker 2009-10-07 19:31:57 +00:00
net * Made an uint32 out of net_socket::bound_to_device. 2010-08-27 10:56:41 +00:00
notification Patch by plfiorini: Integration of InfoPopper as a system service. See ticket 2010-05-27 14:48:27 +00:00
print * first steps towards a new printer api... 2008-08-10 23:26:38 +00:00
runtime_loader Removed unused elf_version_info::hidden field. 2009-05-21 13:11:54 +00:00
screen_saver Fixed various errors/warnings reported by cppcheck: 2010-02-08 22:50:38 +00:00
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 More style guide fixes. Removed a lot of preprocessing / conditional building, with intent to fix or remove. Moved urlwrapper class declaration to its header file. Renamed things for clarity. Removed 5 extra mimetypes for IE shortcuts. (We have one, with sniffing rule and extension.) Moved the UnurlString() back to urlwrapper.cpp and renamed it _DecodeUrlString(). Tweaked copyright clauses. A lot more needs fixing, esp. in urlwrapper but also in BUrl, and I intend to keep working on this until we're satisfied. Let me know of any remaining/added style violations! Feedback welcome. 2009-05-13 22:19:42 +00:00
syslog_daemon Implemented syslog support for the kernel debug output. Not fancy at all yet, but 2006-01-24 20:28:52 +00:00
system Optimised passing around of timezone a bit 2010-08-16 22:01:28 +00:00
textencoding missing comment tokens 2007-06-20 21:20:11 +00:00
tracker Overlooked this with my previous Trash-related changes: updated NavMenu to be 2010-01-17 17:35:06 +00:00
usb_vision some copyright headers clean up 2010-04-12 21:02:09 +00:00
userlandfs Should have been part of r37678. io_request_is_vip() support. 2010-07-22 11:09:32 +00:00
vmdk Moved vmdkimage.h to a shareable place, cleaned it up a bit, and renamed it to 2009-10-01 03:08:46 +00:00