Commit Graph

36493 Commits

Author SHA1 Message Date
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
Rene Gollent
703b67c0ca Update Web+ to r545 to fix compatibility with recent Locale Kit ABI changes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38471 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-31 00:07:28 +00:00
Stephan Aßmus
82ffb1e6bd Improved tracing output.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38470 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-30 22:31:54 +00:00
Stephan Aßmus
cfe3295bcf * _FillNextBuffer(): performanceTime and startTime were duplicated variables.
* 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
2010-08-30 22:26:11 +00:00
Stephan Aßmus
0f7fb31be2 * Do not create converters if target format has wildcards
for the respective aspect.
 * Put back tracing output.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38468 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-30 22:23:08 +00:00
Stephan Aßmus
30816b7ebd * Coding style fixes.
* Fixed build with tracing enabled.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38467 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-30 22:22:15 +00:00
Axel Dörfler
252999c4e2 * Fixed CID 461 as well - same thing, only for adding a menu to the save panel.
* 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
2010-08-30 21:18:20 +00:00
Andreas Färber
56f837e265 boot_loader_openfirmware: Fix system_time()
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
2010-08-30 21:13:10 +00:00
Stephan Aßmus
eb01f516a3 The CodecID for raw-audio actually depends on the sample format
and can't be hard-coded in the EncoderTable.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38464 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-30 21:04:29 +00:00
Axel Dörfler
6387dbc3f2 * Fixed potential NULL menuBar. This fixes CID 462.
* 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
2010-08-30 21:04:06 +00:00
Axel Dörfler
4cdd7099dc * Fixed a potential crash (partition may be NULL). This fixes CID 1544.
* Added missing authors.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38462 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-30 20:47:22 +00:00
Axel Dörfler
506894b6a8 * Return an error on initialization error. This fixes CID 1566.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38461 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-30 20:21:06 +00:00
Axel Dörfler
73b1cb8240 * The IOCache always needs a DMAResource; it was sometimes checked, and
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
2010-08-30 20:06:52 +00:00
Oliver Tappe
b7f609650b * removed all BLocale-related getters from BLocaleRoster - they're available
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
2010-08-30 19:58:19 +00:00
Axel Dörfler
9910e4f1bf * The parent of an IOOperation cannot be NULL for completed operations.
* This fixes CID 1507.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38458 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-30 19:41:08 +00:00
Oliver Tappe
2bd0cd6cb8 * improved const-correctness of BLocale
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38457 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-30 18:57:17 +00:00
Andreas Färber
30743318f1 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
2010-08-30 18:50:14 +00:00
Oliver Tappe
6bb481c714 Adjustments to Locale preflet
* 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
2010-08-30 18:27:12 +00:00
Oliver Tappe
9a00115643 Last part of #3298:
* 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
2010-08-30 16:17:36 +00:00
Axel Dörfler
f097f90c70 * Fixed a bug in deciding whether or not an IP level broadcast should be
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
2010-08-30 14:58:08 +00:00
Oliver Tappe
6e30c4b8af * rename BTimeZone::Accessor to BTimeZone::Private to match the other
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
2010-08-30 14:30:22 +00:00
Stephan Aßmus
b543dbc293 Honor 80 chars/line limit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38448 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-30 13:02:48 +00:00
Stephan Aßmus
a6e0f877c3 Print the debug output only for the first channel,
more channels don't add more information.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38447 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-30 13:01:44 +00:00
Stephan Aßmus
4cc71346c4 Fixed more coding style violations.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38446 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-30 11:36:02 +00:00
Adrien Destugues
8276f81e0c Some more catalogs.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38445 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-30 11:34:29 +00:00
Adrien Destugues
0a9e47c7f9 Sync catalogs from hta. Not sure all of them are here...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38444 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-30 11:31:20 +00:00
Stephan Aßmus
cb7b1a3cee Fixed DEBUG build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38443 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-30 11:29:26 +00:00
Stephan Aßmus
c21a83bb46 A few more coding style fixes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38442 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-30 10:21:25 +00:00
Stephan Aßmus
0960b6d0f1 Fixed more coding style errors.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38441 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-30 10:20:05 +00:00
Stephan Aßmus
7e3a856975 Don't disable the audio/video track menus anymore when
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
2010-08-30 10:00:54 +00:00
Stephan Aßmus
21f2531ebc For videos that are longer than 240 frames, we anticipate
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
2010-08-30 09:52:32 +00:00
Stephan Aßmus
7516d989b1 Added FindKeyFrameForFrame() to the VideoTrackSupplier API
and the implementation to MediaTrackerVideoSupplier.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38438 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-30 09:50:47 +00:00
Stephan Aßmus
25e6c31893 Print the FillBuffer() error when running out of buffers only once.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38437 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-30 09:49:16 +00:00
Scott McCreary
10c5ff834d Second try at python-2.6.6
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38436 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-30 05:53:08 +00:00
Scott McCreary
843c2663c8 Update openssl to 1.0.0a and python to 2.6.6
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38435 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-30 02:37:40 +00:00
Andreas Färber
df66656fec 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
2010-08-29 22:12:17 +00:00
Clemens Zeidler
588b796bcb Add the possibility to load all add-ons in a directory immediately.
Rename _HandlePulse to _HandlePendingEntries.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38433 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-29 22:05:33 +00:00
Axel Dörfler
1e2c72fcfc * FindAttribute() was broken and would find partial names (ie. if an attribute
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
2010-08-29 21:34:35 +00:00
Andreas Färber
b96cb61620 boot net: Style fixes
No functional changes yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38431 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-29 21:34:16 +00:00
Axel Dörfler
001d7548ab * Style cleanup, no functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38430 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-29 21:25:12 +00:00
Axel Dörfler
977f0426ee * Fixed CID 1508: a corrupted rockridge entry could cause a kernel panic.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38429 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-29 21:12:35 +00:00
Oliver Tappe
a9faf94392 * reintroduced be_locale as global information point for the current locale
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
2010-08-29 20:55:00 +00:00
Oliver Tappe
279125fbd9 * added BTimeZone::Accessor class, which allows other LocaleKit classes to
access a BTimeZone's ICU-timeZone 

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38427 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-29 20:52:28 +00:00
Oliver Tappe
f3dd81ab9b * style adjustments
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38426 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-29 20:40:15 +00:00
Andreas Färber
3e9b601da1 SCSI: Add struct for READ (16) and WRITE (16) commands
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
2010-08-29 13:03:05 +00:00
Adrien Destugues
9b46a2b25d Fix more drawing problems in terminal, and remove an useless variable.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38424 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-29 10:43:54 +00:00
Axel Dörfler
1216557e1b * iso9660_volume::volSetIDString[] should have been 129 bytes in size, not 29.
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
2010-08-28 17:03:47 +00:00
Axel Dörfler
d2a6c05145 * Removed superfluous check, and fixed wrong indentation. This also closes
CID 1510.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38422 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-28 16:55:57 +00:00
Axel Dörfler
6195b696db * Added missing destructor; fString was leaked. This fixes CIDs 1411-1413.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38421 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-28 16:50:26 +00:00
Axel Dörfler
44260788fe * Fixed CID 1650: the "raw" buffer could be leaked.
* Automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38420 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-28 16:46:18 +00:00