haiku/headers/private/kernel
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
..
arch Patch by "notzed" (Ticket #5380): Add support for setting video mode for OMAP3. 2010-06-30 17:39:36 +00:00
boot boot_net: Add TCP support 2010-08-31 01:00:06 +00:00
disk_device_manager * Got rid of the duplicated functionalities provided by RWLocker.cpp, and 2009-10-12 14:29:05 +00:00
fs Reverted the part of r31520 that made devfs_unpublish_partition() take a raw 2010-01-09 03:55:38 +00:00
platform Convert line endings to LF 2010-06-26 17:38:03 +00:00
posix
slab Changed object_depot_store() return value to void. It is now always takes 2010-02-24 19:04:41 +00:00
util Patch by kaliber to fix some compiling errors with clang. Removed the #include <iostream> part, but otherwise not modified. 2010-07-17 10:33:24 +00:00
vm * Moved the vm_page initialization from vm_page.cpp:vm_page_init() to the new 2010-07-10 15:08:13 +00:00
block_cache.h
boot_device.h * vfs_boot.cpp now also exports gReadOnlyBootDevice which is true when the 2009-06-05 15:52:58 +00:00
boot_item.h
boot_splash.h
commpage.h Split the commpage initialization into two parts. The second part is executed 2009-06-24 13:53:58 +00:00
condition_variable.h Coding style cleanups. Thanks axeld. 2009-12-03 13:05:39 +00:00
console.h
cpu.h Removed unnecessary inclusions of <boot/kernel_args.h> in private kernel 2010-06-25 22:16:10 +00:00
debug_heap.h Replaced the temporary storage used in the kernel debug command parser. We now 2009-06-03 12:28:49 +00:00
debug_paranoia.h
debug.h Added STATIC_ASSERT() macro (from <Debug.h>, which cannot be included in the 2010-06-10 17:31:57 +00:00
debugger_keymaps.h
elf_priv.h * Added GNU style ELF symbol versioning support in the kernel, too. 2009-05-21 15:08:42 +00:00
elf.h * Allow to use symbols as variables (prefixed with '@'). Now only tab completion 2009-10-22 11:44:29 +00:00
file_cache.h * Moved the VM headers into subdirectory vm/. 2009-12-02 18:05:10 +00:00
frame_buffer_console.h * If the VESA driver remaps the frame buffer on init, it will now also make 2010-01-01 14:54:41 +00:00
generic_syscall.h
heap.h Added a heap_init_post_area() which is called right after areas can be 2010-05-18 15:51:27 +00:00
int.h Removed unnecessary inclusions of <boot/kernel_args.h> in private kernel 2010-06-25 22:16:10 +00:00
kdevice_manager.h
kdriver_settings.h
kernel_c++_structs.h Attempt at allowing to use C++ structures in C only code: We use the 2009-12-02 10:56:10 +00:00
kernel_daemon.h
kernel.h * Renamed the ROUNDOWN macro to ROUNDDOWN. Also changed the implementation of 2009-08-03 12:39:56 +00:00
kimage.h headers/private/kernel/util/OpenHashTable.h, Hugo's version, is a bit nicer than 2009-07-27 00:39:12 +00:00
kmodule.h * Call module_init_post_boot_device() right after the boot volume has 2008-09-26 23:59:53 +00:00
kscheduler.h Make scheduler_reschedule() an no-op until we're ready to start the 2010-04-29 15:10:37 +00:00
ksignal.h
ksyscalls.h
ksystem_info.h
listeners.h Changed ConditionVariable from class to struct to make it more C-friendly. 2009-06-22 23:49:05 +00:00
lock.h Added rw_lock_read_lock_with_timeout(). 2010-07-22 11:10:48 +00:00
low_resource_manager.h * The kernel's address space is now also a resource that is known to the low 2009-11-27 13:03:28 +00:00
messaging.h
MessagingServiceDefs.h
Notifications.h DefaultNotificationService: 2009-12-21 20:56:50 +00:00
port.h * delete_owned_ports() no longer scans the whole port array for ports belonging 2009-10-26 13:34:43 +00:00
real_time_clock.h Optimised passing around of timezone a bit 2010-08-16 22:01:28 +00:00
safemode.h
scheduling_analysis.h Changed ConditionVariable from class to struct to make it more C-friendly. 2009-06-22 23:49:05 +00:00
sem.h * Semaphores are now put into the team struct in a doubly linked list. 2009-10-23 02:06:51 +00:00
smp.h Added a rendez-vous variable parameter to smp_trap_non_boot_cpus() and make 2010-04-30 19:32:12 +00:00
syscall_restart.h
system_profiler.h * It seems we always have to specify all flags to make it work; removed "flags" 2009-07-21 12:09:15 +00:00
team.h Changed the team shutdown process a bit: 2010-01-20 09:34:53 +00:00
thread_types.h * Fixed typo. 2010-04-07 07:05:20 +00:00
thread.h * All scheduler implementations: 2009-12-13 21:18:27 +00:00
timer.h Fix gcc4 build. 2009-09-25 14:36:26 +00:00
tracing.h * arch_debug_get_stack_trace(): 2009-12-22 15:15:07 +00:00
user_atomic.h Some ppc fixes for #4115, patch by kallisti5 (without the #ifdef _BOOT_MODE): 2009-08-03 10:10:22 +00:00
user_debugger.h Correctly handle cases when a thread single-steps into the kernel as it can 2010-02-25 20:20:16 +00:00
user_mutex.h * Moved created subdirectory src/system/kernel/lock.cpp to new subdirectory 2010-04-11 16:07:39 +00:00
usergroup.h * Introduced ref-counting for the I/O contexts. 2009-03-02 00:26:22 +00:00
vfs.h * Introduced type generic_io_vec, which is similar to iovec, but uses types 2010-06-02 18:42:20 +00:00
wait_for_objects.h