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
* Small coding style improvements.
* Improved generating of debug .wav file.
* Incorporate the channel count in the audio buffer size! This was important
since the duration could then lead to rounding errors. 6 channel playback
is much improved, but still far from perfect.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38469 a95241bf-73f2-0310-859d-f6bbb57e9c96
* The menus are now only created when the menu bar is found.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38466 a95241bf-73f2-0310-859d-f6bbb57e9c96
system_time() was based on of_milliseconds(), which returns the number of
milliseconds since power-on. This would produce very similar or identical
results for subsequent boots due to limited clock resolution; therefore it
was unsuited as PRNG seed, e.g., for TCP ports.
Try to inquire the RTC device node with get-time to return an improved time
value, if possible.
Closes ticket #6061.
Changes from proposed patch:
* Obtain the RTC handle once and reuse it for each inquiry.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38465 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Got rid of the global styled_edit_app variable.
* Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38463 a95241bf-73f2-0310-859d-f6bbb57e9c96
sometimes not.
* This fixes CIDs 1755-1756, and 1505-1506.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38460 a95241bf-73f2-0310-859d-f6bbb57e9c96
in BLocale (which is accessible via be_locale)
* adjusted all users accordingly
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38459 a95241bf-73f2-0310-859d-f6bbb57e9c96
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
* renamed Locale.{h,cpp} to LocalePreflet.{h,cpp} as having two headers named
Locale.h confuses jam (as a result, the Locale preflet did not depend on
headers/os/locale/Locale.h)
* style adjustments (mostly order of headers)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38455 a95241bf-73f2-0310-859d-f6bbb57e9c96
* applied patch by VinDuv that adds a Perl-based implementation of readlink,
which is needed on Mac OX X, as that doesn't have any of the other fallbacks
- thanks!
IIRC, other people have managed to configure without this on Mac OS X, but
I suppose no harm can be done by providing this as last resort.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38454 a95241bf-73f2-0310-859d-f6bbb57e9c96
accepted. This should have been the reason for Duggan's problem with DHCP
as part of bug #6454.
* Stippi's router seems to answer DHCP requests with broadcasts to the future
broadcast IP address. Luckily, it's also a link layer broadcast, so we let
the upper protocols decide what to do with it, depending on that; this could
also be done depending on the existence of any unconfigured networks.
* This should fix Stippi's DHCP problems, and therefore bug #6454 - in any
case, this will be the last try before my vacation :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38450 a95241bf-73f2-0310-859d-f6bbb57e9c96
private accessor classes
* adjust style in BTimeZone::Private implementation to match other classes
of this kind
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38449 a95241bf-73f2-0310-859d-f6bbb57e9c96
there is only one track. I introduced this at diver's request,
but I think it's irritating. Also when the audio tracks will
be named after their language, it would be nice to know it,
or even perhaps other properties, like channel count.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38440 a95241bf-73f2-0310-859d-f6bbb57e9c96
that the graphical precision of the seeking slider is not
enough to seek to individual frames on purpose. So we filter
the requested seeking position to keyframes if there is a
video track. The difference in snappiness when seeking is
like night and day.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38439 a95241bf-73f2-0310-859d-f6bbb57e9c96
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
with the name "abc" existed, it would be returned when opening any attribute
starting with "abc".
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38432 a95241bf-73f2-0310-859d-f6bbb57e9c96
values
* added locking to BLocale (needed since the data of the global object may
change any time)
* BLocale no longer passes out pointers to internal objects, it fill objects
passed in by the client instead (just like be_locale_roster does)
* dropped default language as member from RosterData, it is no part of the
default locale
* fleshed out implementation of TimeUnitFormat and DurationFormat, both
of which can now be given a BLocale in order to set the strings being used
during formatting
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38428 a95241bf-73f2-0310-859d-f6bbb57e9c96
Based on a SCSI Command Reference Manual by Seagate and Wikipedia.
Tested against OpenSolaris iSCSI target on ppc. It choked on the READ (12) opcode.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38425 a95241bf-73f2-0310-859d-f6bbb57e9c96
This fixes (a harmless) out of bounds array access, and CID 1359.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38423 a95241bf-73f2-0310-859d-f6bbb57e9c96