History log of /haiku/headers/private/kernel/boot/net/NetDefs.h
Revision Date Author Comments
# fcf0b31f 26-Mar-2019 Augustin Cavalier <waddlesplash@gmail.com>

bootloader: Add the network endianness macros to NetDefs.h.

This file contains all the protocol- and interface-related
definitions, so this seems to be where they belong.

Required following previous commits.


# b7e825d6 30-Aug-2010 Andreas Färber <andreas.faerber@web.de>

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


# 30743318 30-Aug-2010 Andreas Färber <andreas.faerber@web.de>

boot net: Style fixes

Fix style issue, pointed out by Axel.

No functional changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38456 a95241bf-73f2-0310-859d-f6bbb57e9c96


# df66656f 29-Aug-2010 Andreas Färber <andreas.faerber@web.de>

boot net: Preparations for TCP

Add protocol number and struct for TCP header.

First minuscule part of ticket #5240.
Checked that pxehaiku_loader still compiles, too.

Changes from proposed patch:
* Simplify struct by merging flags into one 8-bit field.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38434 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b96cb616 29-Aug-2010 Andreas Färber <andreas.faerber@web.de>

boot net: Style fixes

No functional changes yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38431 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2f9a0494 26-Dec-2006 Marcus Overhagen <marcusoverhagen@gmail.com>

add array indexed access to mac_addr_t


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19627 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d561d0ad 27-Dec-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Added a mini networking stack to the boot loader. It speaks basic ARP,
IP, and UDP, as well as a home brewn UDP based protocol, "remote disk",
which provides random access to a single remote file/device. The Open
Firmware flavored boot loader automatically initializes the net stack,
searches for a remote disk, and tries to boot from it, if the boot
device is a network device (e.g. when loading the boot loader via
TFTP).

This is quite nice for developing with a two-machine setup, since one
doesn't even need to install Haiku on the test machine anymore, but can
serve it directly from the development machine. When the networking
support in the kernel is working, this method could even be used to
fully boot, not just for loading kernel and initial modules.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15689 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b7e825d6e742817cd52eca03f6f1897452fa68e7 30-Aug-2010 Andreas Färber <andreas.faerber@web.de>

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


# 30743318f1e634793b92f2f8202c16ea36b9a796 30-Aug-2010 Andreas Färber <andreas.faerber@web.de>

boot net: Style fixes

Fix style issue, pointed out by Axel.

No functional changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38456 a95241bf-73f2-0310-859d-f6bbb57e9c96


# df66656fec307db3911dc914f9abf828910f66c8 29-Aug-2010 Andreas Färber <andreas.faerber@web.de>

boot net: Preparations for TCP

Add protocol number and struct for TCP header.

First minuscule part of ticket #5240.
Checked that pxehaiku_loader still compiles, too.

Changes from proposed patch:
* Simplify struct by merging flags into one 8-bit field.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38434 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b96cb61620e55244051971a26fc217aaed7a31b1 29-Aug-2010 Andreas Färber <andreas.faerber@web.de>

boot net: Style fixes

No functional changes yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38431 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2f9a049400263abfde732460515ef91a48f77483 26-Dec-2006 Marcus Overhagen <marcusoverhagen@gmail.com>

add array indexed access to mac_addr_t


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19627 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d561d0ad6889135e08b83c18dede8872a75c6d75 27-Dec-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Added a mini networking stack to the boot loader. It speaks basic ARP,
IP, and UDP, as well as a home brewn UDP based protocol, "remote disk",
which provides random access to a single remote file/device. The Open
Firmware flavored boot loader automatically initializes the net stack,
searches for a remote disk, and tries to boot from it, if the boot
device is a network device (e.g. when loading the boot loader via
TFTP).

This is quite nice for developing with a two-machine setup, since one
doesn't even need to install Haiku on the test machine anymore, but can
serve it directly from the development machine. When the networking
support in the kernel is working, this method could even be used to
fully boot, not just for loading kernel and initial modules.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15689 a95241bf-73f2-0310-859d-f6bbb57e9c96