Commit Graph

18375 Commits

Author SHA1 Message Date
Jérôme Duval
a00a227627 Stop gcc4 complaining about "type qualifiers ignored on function return type" (from a next mesa release)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19438 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-06 21:34:04 +00:00
Axel Dörfler
fb81684f81 The beginnings of automatic configuration of network devices using DHCP; this is
currently only triggered when there is no configuration file - it can't be configured
this way yet.
All DHCP currently does is to send a UDP broadcast DHCP discover message. More to come.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19437 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-06 19:00:00 +00:00
Axel Dörfler
26cbcedb9c Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19436 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-06 18:38:38 +00:00
Axel Dörfler
4818d3b627 IPv4 send_routed_data() can now also work with a route whose address is NULL; this
is useful for bringing up (and using) an unconfigured interface. Specifically, DHCP
will be using this method to get the broadcast out.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19435 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-06 18:38:08 +00:00
Stefano Ceccherini
f17a85d17d set the extrarect also for menubars (but it's not yet used)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19434 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-05 13:53:51 +00:00
Stefano Ceccherini
8071d85b5a fixed the build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19433 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-05 13:34:14 +00:00
Axel Dörfler
9172931102 Updated the Netscript to the syntax of the new commands.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19432 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-05 12:38:02 +00:00
Axel Dörfler
bcb0dd2b3b The R5 compatibility is now turned off when the socket functions are used
within the library - theoretically, this mechanism could be extended to
turn the compatibility layer on and off based on the images that call the
functions (allowing to mix R5 and BONE network add-ons in a single executable).
This change fixes R5 networking apps such as Vision, and NetworkTime (both
now seem to work fine under Haiku).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19431 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-05 03:03:15 +00:00
Axel Dörfler
40eb4ed30d * Header prediction was a bit too generous (and thus used too often)
* SendData() could return an error and still wanted to own the buffer passed in
* Removed the timeout computations from SendData() - looks like it's usually
  done the simple way when the data has to be submitted in smaller packets.
* ReadData() no longer blocks in case the peer has closed the connection.
* More debug output.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19430 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-05 02:26:13 +00:00
Axel Dörfler
d344e18b94 Calmed down net_buffer and IPv4 a bit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19429 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-05 02:21:06 +00:00
Axel Dörfler
5869c1e7f3 * sending now detect partial writes and does not return an error in that case.
* writev() now also calls bind() if needed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19428 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-05 02:15:20 +00:00
Stephan Aßmus
2cfe93e780 * renamed HWInterface locking to LockParallelAccess() and
LockExclusiveAccess() (meaning more or less access to the
  frame buffer)
* extracted the AGGTextRenderer to be a global instance used
  by each Painter instance (currently, it is thread safe because
  of the global font lock, so there is some work left in this
  regard)
* gave every ServerWindow it's own DrawingEngine instance, this
  is work in progress. So far, there doesn't seem to be a regression,
  but less fighting over the exclusive access to the frame buffer, now
  each ServerWindow thread can draw in parallel. There is room for
  improvement, plus I think I'm leaking the DrawingEngine...
* changed the locking for the software cursor. ShowSoftwareCursor()
  can only be called if HideSoftwareCursor(BRect) returned true, or
  if you called the generic HideSoftwareCursor(), since it needs
  to keep the cursor lock and unlocks in Show...!
* some clean up and renaming in Decorator and friends
* moved PatternHandler.h to live along with the .cpp


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19427 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-04 22:25:17 +00:00
Axel Dörfler
c31e5df06c count_iovecs() and get_iovecs() now only take nodes into account that contain data.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19426 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-04 17:49:47 +00:00
Axel Dörfler
545be9ce4c We shouldn't try to unlock a no-longer-existing endpoint.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19425 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-04 17:28:14 +00:00
Axel Dörfler
03a536148f TCPEndpoint::fEndpointNextWithSamePort was not initialized when binding to an ephemeral port.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19424 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-04 17:15:36 +00:00
Axel Dörfler
f4b9215615 Don't hold the socket's lock when calling socket_read_avail() or socket_send_avail().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19423 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-04 16:54:05 +00:00
Axel Dörfler
6cf91f9542 Before freeing "next", it should have been removed already...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19422 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-04 16:15:21 +00:00
Axel Dörfler
64222e845d Make sure that buffers that have more than one iovec can still be sent (by copying them).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19421 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-04 16:14:07 +00:00
Stefano Ceccherini
a675fc2864 Let go what I said about bug #890. This was the real problem
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19420 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-04 15:37:51 +00:00
Axel Dörfler
9299a7ff2a Now use a random (based on system_time()) initial sequence number - this also
revealed a bug in the recognition of faulty SYNs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19419 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-04 15:09:02 +00:00
Axel Dörfler
442c097946 Renamed class TCPConnection to TCPEndpoint.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19418 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-04 14:49:58 +00:00
Axel Dörfler
10fdb28c47 * Some minor work on TIME_WAIT state, and its timer.
* endpoints are no longer deleted without unbinding them.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19417 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-04 14:41:12 +00:00
Axel Dörfler
9cbe6ce200 Rewrote how bind() works:
* there are now two hash tables: one for connections, and one for ports
* the first one is used to find the endpoint for incoming connections
* the latter is used to check if the address to bind() to is still available
  (incl. support for SO_REUSEADDR, and SO_REUSEPORT). Specialising an existing
  socket is not allowed, though; wildcard sockets need to be started last.
* the TCPConnection class now has a pointer to the next endpoint with the
  same port number - this list is scanned for the existing bound sockets
  on that port.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19416 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-04 13:44:35 +00:00
Axel Dörfler
f7d2a39699 Binding the server shouldn't have worked before - sin_len was set to zero...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19415 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-04 13:32:47 +00:00
Ingo Weinhold
20fa6fad79 FreeBSD build fix. Must have overlooked this one. Thanks to Samuel Rodriguez Perez.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19414 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-02 16:13:15 +00:00
Stephan Aßmus
64dd737cf3 * fixed the dirty canvas when Icon-O-Matic is started in Haiku
(and also improved performance of rendering icons, the background
  was cleared for no reason on each Draw() call) However there
  must be a bug still in the app_server which causes GetClippingRegion()
  to return an out-of-date clipping region (R5 has the very same bug
  though)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19413 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-02 11:12:12 +00:00
Stephan Aßmus
ab12785c61 * I think I finally caught that bug where the test environment crashed
so frequently when unflattening R5 messages (each mouse event arrives
  as an R5 message in the test environment): unflatten_r5_message()
  retrieved the pointer to the message header, but afterwards cleared
  the message... resulting in the header pointer to be invalid.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19412 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-02 11:08:12 +00:00
Axel Dörfler
489caaef82 setitimer() allows the second argument to be NULL.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19411 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-01 13:08:24 +00:00
Axel Dörfler
d081f61f0c * The driver did not handle any non-networking opcodes - including B_SET_NONBLOCKING_IO
and friends; the correct behaviour is to not let those opcodes go deeper in the stack
  (ie. when calling control() on the socket).
* Fixed compilation with debugging output turned on.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19410 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-01 12:54:54 +00:00
Axel Dörfler
379cdb69ee Added _socket_interrupt() for compatibility.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19409 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-01 12:41:21 +00:00
Axel Dörfler
cdd2dcca7f * Forgot to set the data_node::located in clone_buffer().
* No need to set data_node::header in the loop - this is already done in add_data_node().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19408 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-01 11:58:37 +00:00
Axel Dörfler
78e96e0cfe * If you send more than the maximum buffer size at once, TCP will now block
until it could send all the data.
* The window shift option can now also be send if the actual option is zero to
  indicate we support this option.
* If the window shift is not specified, we'll fall back to 0 for our receive
  window as well now.
* _SendQueued() now resets the segment options after SYN.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19407 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-01 10:18:49 +00:00
Axel Dörfler
8ad667cb0b * After my recent change, append_size() did not work correctly anymore, if
the initial buffer wasn't empty.
* Enlarged the minimum header size a bit (one more data_node).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19406 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-01 09:45:23 +00:00
Axel Dörfler
b9a724e79f panic() now results in a debugger call - it now longer exits the app.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19405 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-01 08:31:54 +00:00
Stefano Ceccherini
d75bff02b3 fixed the build under haiku
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19404 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-01 08:25:48 +00:00
Axel Dörfler
7e85d85e7a * TCPConnection::SendData() now waits until there is enough free space in
the send queue (however, if the buffer sent is larger than the maximum
  buffer, it will just hang for now...). The check is also not thread-safe.
* BufferQueue::Get() did not correctly maintain the fFirstSequence member
  in remove mode.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19403 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-30 22:36:45 +00:00
Axel Dörfler
1d891ef80b Changed the default server port to be used to 1234.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19402 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-30 20:48:16 +00:00
Axel Dörfler
02894e3670 * Reintroduced the accept semaphore: it will be inherited by the new connections
of a LISTEN socket.
* Reading data should now more or less work, too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19401 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-30 20:47:26 +00:00
Axel Dörfler
94fb808a48 * socket_spawn_pending() forgot to set the socket's parent field.
* socket_recv[from]() now accept a NULL buffer in case there was nothing to read.
* the tcp_tester's server thread now actually reads the data it receives.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19400 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-30 20:43:24 +00:00
Axel Dörfler
41c6726359 Moved the starting of the network stack into the driver (from the socket module)
to allow other protocols (like TCP) using the socket module.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19399 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-30 17:56:17 +00:00
Axel Dörfler
5131b5bcf6 The window and application server threads now run at B_DISPLAY_PRIORITY, too; this
was a stupid oversight, and should improve the responsiveness of the UI under load
a lot. Thanks Stefano!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19398 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-30 13:15:15 +00:00
Jérôme Duval
66581f3731 moved acpi_thermal to new driver API
improved a bit the read output
published the acpi device module
minor cleanup in pci module


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19397 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-30 00:36:36 +00:00
Axel Dörfler
26417177e7 More work-in-progress:
* Added some timer methods
* Fixed removing the connection too early (and thus replying with a RST instead of nothing
  when the peer acknowledged our FIN).
* BufferQueue::RemoveUntil() did not bump the buffer's sequence
* Delayed acknowledge, and retransmitting should work now (the latter is *very* basic
  right now)
* Completed TCPConnection::_ShouldSendSegment()
* fReceiveNext was always updated on a received buffer, even if there was a buffer
  missing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19396 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-29 21:53:06 +00:00
Stephan Aßmus
54c22262f6 * cleanup (it is still used btw, at least in ServerFont)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19395 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-29 20:29:03 +00:00
Jérôme Duval
c20e9eefcd added a jam rule AddDriverRegistrationToHaikuImage to add device mappings on the image
commented the insertion of the attribute name in patterns in the case of a string attribute
notify_probe_by_file chooses a module based on a bus specific suffix
dm_register_child_device has a parameter to optionally check the support for the node
added scanning of bus devices after the boot filesystem is mounted
fixed dm_rescan, locking was misbehaving
fixed SYSTEM_DRIVER_REGISTRATION definition
added B_DRIVER_MAPPING attributes for PCI and ACPI devices:
  %vendor%_%device% for PCI, hid_%hid% and type_%type% for ACPI
moved acpi_device_module_info definition to public ACPI.h


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19394 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-29 19:09:45 +00:00
Axel Dörfler
2bd388f696 Added two more utility functions to the timer service:
* cancel_timer() cancels a timer, and returns true if the timer was running
* is_timer_active() determines if the timer is currently running or not.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19393 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-29 19:09:19 +00:00
Ingo Weinhold
69b1f76d66 FreeBSD build platform support. Original patches courtesy of
Samuel Rodriguez Perez, somewhat hacked by myself.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19392 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-29 18:08:00 +00:00
Stephan Aßmus
67491d2adc * introduced a listener mechanism to be notified of frame buffer
changes in the HWInterface (ie on mode switch)
* initialization and shutdown of the HWInterface instance no longer
  go through DrawingEngine, which had nothing to do with it in the
  first place
(this is in preparation of giving each ServerWindow it's own
DrawingEngine instance)
* small performance improvement in ViewLayer::ScrollBy()
* some cleanup in ServerConfig.h


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19391 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-29 09:27:23 +00:00
Stephan Aßmus
264fe59ded * introduced IntPoint and IntRect, which are just like BPoint and BRect,
but use integer coordinates. These are now used in ViewLayer for the
  coordinate system (layout, scrolling offset, view bitmap layout)
* modest performance improvements by inlining some very often used
  methods, and by preventing to go down the entire layer tree too often,
  for example InvalidateScreenClipping was always called in the deep
  mode, therefor it is save to assume that the tree does not have to
  be traversed as soon as the clipping is already invalid


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19390 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-29 03:20:07 +00:00
Stephan Aßmus
ba688f3640 * small fix
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19389 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-29 03:16:51 +00:00