Commit Graph

6040 Commits

Author SHA1 Message Date
Andreas Färber
267f107882 iSCSI: Add header for protocol
Define structs for iSCSI messages, to be used by boot loader and kernel add-on.
For now it will refuse to compile for Little Endian systems (e.g., x86).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38528 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-04 21:09:13 +00:00
Alex Wilson
82ab316723 Add default spacing for Layouts (#5614)
* introduce B_USE_DEFAULT_SPACING, which works somewhat like B_SIZE_UNSET and B_ALIGN_HORIZONTAL_UNSET
* introduce static float BControlLook::ComposeItemSpacing(float spacing), which checks uses be_control_look->DefaultItemSpacing().
* modify layouts to use BControlLook::ComposeItemSpacing() in SetInsets and SetSpacing methods.
* default insets are still 0, 0, 0, 0, but can be set to default spacing by passing B_USE_DEFAULT_SPACING
* I've found two regressions, patches incoming, please report others on #5614.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38512 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-02 22:58:24 +00:00
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
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
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
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
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
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
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
Oliver Tappe
81fe5a9200 * re-added GetAvailableTimeZones() to BCountry - it is now a convenience wrapper
around BLocaleRoster::GetAvailableTimeZonesForCountry()
* minor cleanup

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38412 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-28 09:23:26 +00:00
Axel Dörfler
89bf19ccde * Made an uint32 out of net_socket::bound_to_device.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38395 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-27 10:56:41 +00:00
Axel Dörfler
62d3dbd618 * Added a soon to be used index field.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38390 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-27 10:48:59 +00:00
Oliver Tappe
9ef134d918 * added timezone-support to some more date/time-formatting methods in BLocale
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38381 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-26 22:17:40 +00:00
Oliver Tappe
c91aa9f4e6 * moved support for getting timezones-by-country from BCountry to LocaleRoster,
since we'd like to be able to get the timezones of the global (i.e. empty)
  country, too.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38380 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-26 22:16:40 +00:00
Axel Dörfler
db4015a5f8 * Work in progress of reworking the net80211 stack a bit, implementing some of
the missing notifications.
* Renamed ieee80211_haiku.c to .cpp, and made it compile (this part requires
  the updated GCC2, as it uses the ISO-C varargs macros).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38378 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-26 14:35:03 +00:00
Axel Dörfler
ef3f86e723 * Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38364 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-26 09:16:18 +00:00
Axel Dörfler
4cd42050fa * Cleanup, no functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38362 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-26 08:42:58 +00:00
Adrien Destugues
124a502a7a Always set the LVDS panel to its native mode, except for the 'display' part.
This allows to use lower resolution screen modes with black border.

Added a set of TODOs :
 * The smaller scren is not centered, but aligned top-left
 * The base resolution used is the one reported from edid 1.1, because I'm still not sure how to parse EDID 1.2. This resolution is too small on my laptop, but it works.

Also added two ways of setting 8-to-6 dithering for 18-bit LVDS panel. No visible result for me, unfortunately.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38354 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-25 15:06:49 +00:00
Oliver Tappe
aa8372c486 * changed BTimeZone to use BLanguage instead of BLocale, as that what represents
the locale of messages (timezone names in this case)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38340 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-24 18:32:59 +00:00
Adrien Destugues
4f5f77e6e4 Missing from previous commit. Sorry !
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38339 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-24 17:49:12 +00:00
Oliver Tappe
3bdedcf3f1 * added support for getting the names of a timezone for a specific locale
(not currently used anywhere, but should be part of the BTimeZone interface)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38333 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-24 15:03:54 +00:00
Stephan Aßmus
e4f3cf203c * Renamed _plugin_manager to gPluginManager.
* Improved tracing in PluginManager.cpp when loading an add-on.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38330 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-24 13:30:39 +00:00
Oliver Tappe
750e57b842 Optimized Time preflet:
* use upon-demand initialization in BTimeZone to avoid unnecessary work
* renamed BTimeZone::Code() to BTimeZone::ID() and adjusted all callers
* avoid using BCountry in the Time preflet for the time being, this means
  the icon-flags are gone for now (but they could be re-added if the demand
  is pressing ;-)
* group the timezones by regions and then by country instead
The performance improvement is considerable and I personally think the new grouping is an improvement, too. Please share your thoughts!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38322 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-23 15:17:49 +00:00
Oliver Tappe
039ad7e757 Added support for getting a list of all available timezone IDs to LocaleRoster.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38321 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-23 14:46:54 +00:00
Fredrik Holmqvist
d7b1a83fc3 Add get_current_resources call to ACPI module which allows us to read out a device current resources.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38288 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-20 19:23:33 +00:00
Clemens Zeidler
6acb83bf61 Fix coding style.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38286 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-20 04:34:18 +00:00
Stephan Aßmus
2faa1532f8 * Refactored a lot of repetitive code and made
everything more readible.
 * Once I understood better how everthing is supposed
   to work, I've fixed some bugs.
 * The most important problem was that AddDirectory()
   placed the wrong entry (resolved symlinks) into the
   entry list it keeps for each directory. This resulted
   in the mechanisms not working at all when an add-on
   was a symlink.
 * There was a hidden TODO, which would mean that moving
   an add-on from one watched directory into another,
   like from home/config/add-ons/... into common/add-ons/...
   would drop the client application (media_server,
   input_server, ...) into the debugger.
 * The fFormerEntries list did not seem to serve any
   purpose. Basically it would not disable add-ons
   removed from a watched directory unless it changed
   it's name at the same time. I've removed it completely,
   since it didn't seem to be an optimization
   (entry cache) either.
 * Each actual add-on file is now node-monitored for
   stat changes. So if you have a link in the add-on
   folder, and the linked to add-on changes, it triggers
   a reload of the add-on now. This will make it much
   more pleasant to develop add-ons and have them affective
   immediately.

I tested with a fresh image, but there are no immediate
regressions I am aware of. I could imagine that messing
with certain add-ons can have a bad effect now, like
removing the keyboard input_server add-on may trigger the
keyboard to stop working immediately without an input_server
restart, but Tracker should warn before it happens.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38280 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-19 19:52:19 +00:00
Oliver Tappe
269ebc04b9 Fix #6373, second try
* make BDADDR_* macros refer to value types instead of addresses
* adjust all interfaces using bdaddr_t* to use (mostly const) refs instead,
  which IMHO makes the interface & code clearer
* that got rid of a couple of const incorrectness casts
* some cleanup along the way


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38265 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-19 15:29:02 +00:00
Oliver Tappe
32a2294fdc * revert r38213, as it introduces initialization problems
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38263 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-19 14:40:17 +00:00
Stefano Ceccherini
2aef272550 Change Path() to GetPath(), and made it accept a reference instead of
a pointer. Style changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38260 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-19 03:57:58 +00:00
Andreas Färber
f7d8abc530 Mail: Always include posix/regex.h
PowerPC was special-cased to not include posix/regex.h but a local copy.
This caused a warning for undefining __STDC__ and a pointer signedness error.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38257 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-18 23:58:57 +00:00
Andreas Färber
eb7f7576c9 OpenGL: Fix warnings on ppc
#pragma export on
and
#pragma export off
result in warnings on ppc, which are now treated as errors.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38256 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-18 23:42:48 +00:00
Stefano Ceccherini
2d05ca4e7a Actually return B_NO_MEMORY in case of error (was a regression introduced
in r38247.
Small style fixes (more to come)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38250 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-18 20:03:07 +00:00
Stefano Ceccherini
d3485a2648 Renamed some members to fit our guidelines
(and to make the code more readable)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38249 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-18 19:57:53 +00:00
Axel Dörfler
28de0904dc * Added non-const sockaddr casts.
* Automatic whitespace cleanup.
* This also fixes the build; I wanted to commit this earlier.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38237 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-18 15:41:33 +00:00
Stephan Aßmus
c6077ae7ec Cleanup: No need to check the BMessenger status twice. No need to
keep the BMessageRunner message around.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38234 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-18 13:50:50 +00:00
Stephan Aßmus
132cbf8cf7 Updated indentation and style.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38226 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-18 10:59:56 +00:00
Stephan Aßmus
81db321da2 Updated header indentation, no functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38225 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-18 10:38:30 +00:00
Clemens Zeidler
c0eff34541 Remove unused PortLinkRef again.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38217 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-17 23:27:22 +00:00
Clemens Zeidler
ee9246d5f5 Remove unused communication port, pointed out by Axel.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38216 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-17 23:23:02 +00:00
Clemens Zeidler
94892dc091 Make arguments const if appropriated. Style issues and port_id error check. Thanks Stippi.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38214 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-17 22:54:00 +00:00
Oliver Tappe
e0ef64750f * fix #6373 by switching the BD... macros to take the address of corresponding
constants, which had to be defined in several places in order to be available
  in the kernel addons, network protocols and the server/kit.
* enable -Werror for all servers

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38213 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-17 21:46:32 +00:00
Clemens Zeidler
7640bbb6cd Fix coding style.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38212 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-17 21:35:16 +00:00
Clemens Zeidler
488c90defe Fix style issues, thanks Axel.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38211 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-17 21:15:13 +00:00
Alex Wilson
1d6c7b6cb6 Big change deriving BLayout from BLayoutItem, and allowing viewless BLayouts.
a few highlights:
* BLayout now derives publicly from BLayoutItem
* Added BAbstractLayout class, which our layouts now derive from
* updated layout builders to avoid creating views when they don't need to
* updated layout classes
* updated AboutSystem to fix a little regression
* more details on #6407
* please tell me about any regressions, I've tried to find them all, but some
  may have slipped by.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38207 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-17 18:43:41 +00:00