haiku/headers/private/kernel/boot
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
..
net boot_net: Add TCP support 2010-08-31 01:00:06 +00:00
platform Boot loader (x86 mmu.cpp): 2010-03-02 18:13:06 +00:00
addr_range.h Added ignore_physical_memory_ranges_beyond_4gb() which removes the memory 2010-06-23 11:10:01 +00:00
arch.h Convert line endings to LF 2010-06-26 17:38:03 +00:00
bootdir.h Merged changes from branch build_system_redesign at revision 14573. 2005-10-29 16:27:43 +00:00
disk_identifier.h [Sorry, couldn't split this one up any further.] 2007-07-15 02:10:15 +00:00
driver_settings.h Added driver_settings support to the kernel_args structure. 2005-01-10 07:36:08 +00:00
elf.h [Sorry, couldn't split this one up any further.] 2007-07-15 02:10:15 +00:00
FileMapDisk.h Convert line endings to LF 2010-06-26 17:38:03 +00:00
heap.h heap size is now part of stage2_args. 2003-10-07 22:10:55 +00:00
images-sans-tm.h Added a boot splash header file that contains only the boot icons. Later, 2010-07-25 18:44:52 +00:00
images.h Patch by David Powell: 2008-08-28 16:59:34 +00:00
kernel_args.h x86 mmu_init(): Sum up the physical memory we ignore for whatever reason -- 2010-06-12 15:57:21 +00:00
menu.h * Added shortcut handling to the boot loader menu (in preparation of adopting 2010-04-15 18:07:40 +00:00
partitions.h Add FAT32 support. This allows the bootloader to find a BFS image file (currently named BEOS\IMAGE.BE) and start booting for it, until the kernel tries to mount the boot partition. 2008-10-15 23:54:04 +00:00
platform.h * The boot loader now adds all block devices in case the BIOS doesn't give enough 2006-03-27 14:50:37 +00:00
stage2_args.h - introduced an "argumetns" field in stage2_args to hold command line args from chaining loader, 2009-08-03 14:39:41 +00:00
stage2.h gKernelEntry is no longer necessary. 2004-05-31 23:11:47 +00:00
stdio.h Removed execute property that was set accidently (since CVS days). 2005-03-18 01:50:45 +00:00
vfs.h * Added Directory::CreateFile() which can be implemented by file systems to 2010-03-16 17:29:58 +00:00