Commit Graph

19523 Commits

Author SHA1 Message Date
Ingo Weinhold
e1d3054a28 Patch by Urias McCullough: Revived jam package for rtl8169.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20616 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-08 10:54:17 +00:00
Hugo Santos
89de666412 notify all monitors when a device is being removed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20615 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-08 09:30:00 +00:00
Hugo Santos
e53357d57a Prepared net_device_monitor to accept device removal events.
- Introduced public net_device_monitor.
 - Changed the link protocol to maintain a lock per instance instead of inside the FIFO. Now all of the link instance data is protected.
 - Adapted the link protocol to use net_device_monitor.
 - Introduced a private Fifo class which doesn't maintain it's own lock.
  - Maybe we should add something like a public net_protocol_implementation which maintains a fifo and a benaphore? With the fifo using the structure's lock instead of maintaining it's own.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20614 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-08 09:15:52 +00:00
Hugo Santos
ee18793052 updated some locking related comments.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20613 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-08 05:50:49 +00:00
Hugo Santos
ae074c5d15 moved IFF_LINK handling to the device module (ethernet in this case). Now domain interfaces only keep specific flags such as IFF_UP and the configuration flags. IFF_LINK, IFF_BROADCAST etc are maintained exclusively by the device.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20612 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-08 05:50:36 +00:00
Hugo Santos
fb300cfd25 introduced net_device_interface level locking.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20611 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-08 05:50:25 +00:00
Ingo Weinhold
315cfc48ca The ":" to identify a target for the "run" feature must be at the
beginning of the string; it was formerly matched anywhere.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20610 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-08 02:21:10 +00:00
Ingo Weinhold
4f4e5272fc Under Linux it is now possible to emulate the BeOS attribute support via
xattrs. It can be enabled with the configure switch "--use-xattr". Note
that the amount of data stored in attributes may be limited by the used
file system -- e.g. AFAIK ext3 has a limit of one block (usually 4 KB)
for all attributes of a file, which might not suffice. XFS should be
fine, as should ReiserFS 3.6 (or any FS which stores attributes in
hidden files).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20609 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-08 02:19:01 +00:00
Ingo Weinhold
055fa4f22f Assigning values to errno would not work; the next invocation would
overwrite them with the host platform errno again. We do now track
changes and use a hopefully reasonable strategy for updating the host
errno.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20608 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-08 02:04:21 +00:00
Ingo Weinhold
d307e81230 Added ENOATTR.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20607 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-08 02:01:07 +00:00
Ingo Weinhold
a9bf6ecbab libroot_build.so:
* Reorganized sources a bit:
  - The descriptor support is in a separate file now.
  - Disentangled the attribute support from the other stuff.
* Removed broken xattr use for attribute support.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20606 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-07 19:01:21 +00:00
Ingo Weinhold
ea3f7d3d8d Added an "isExecutable" parameter to the Translator rule. All
translators pass "true" (was used before), but I suppose most of them
don't really need it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20605 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-07 01:42:47 +00:00
Ingo Weinhold
1acbe440b8 Removed the obsolete second argument ("relpath") of the Addon rule and
shuffled "isExecutable" to the end. The new order favors the common use
cases. Adjusted all Addon invocations and while at it also removed
separate LinkAgainst invocations.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20604 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-07 01:27:19 +00:00
Jérôme Duval
0c93c0a807 change the way FileGameSound works : avoid using a port
code style, some clean up


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20603 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-06 22:40:23 +00:00
Ingo Weinhold
afed18de79 New build system feature to shorten the turn-around times when working
with image files. E.g.

  jam -q update-image libbe.so kernel_x86

will only build libbe.so and the kernel (if necessary) and copy them
onto the already existing Haiku image. The MIME DB will not be
reinstalled, and only those source directories will be copied for which
the AddSourceDirectoryToHaikuImage rule is given a second argument
(e.g. "1"). The image will otherwise remain unchanged.

The "update-vmware-image" and "update-install" work similarly for the
VMWare image and the directory installation respectively. Note that, due
to the way the VMWare image is created (prepending a header to the
standard image), the file itself is fully rebuilt, i.e. changes made
during the emulation will be lost after updating the VMWare image.

The feature requires Haiku's jam. With other jam versions a similar
effect can be reached by accordingly setting the HAIKU_IMAGE_UPDATE_ONLY
and HAIKU_INCLUDE_IN_IMAGE in the UserBuildConfig file.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20602 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-06 21:13:35 +00:00
Hugo Santos
20b534cd5f a bit more work towards proper locking including a fix to a refcount bug
- fixed a issue in add_interface_to_domain where the device interface's refcount was always incremented since that function was getting the device interface handle and not returning it unconditionlly
 - if the ethernet device goes down, and the fd is close()ed, return B_FILE_ERROR instead of calling into the driver again


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20601 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-06 09:48:02 +00:00
Hugo Santos
c64fecca78 started some work to properly handle device_removed() and setting interfaces down in general.
- remove all routes that use interfaces going down.
 - when a device is going down, remove associated domain interfaces.
 - interfaces weren't getting a properly referenced device interface, fixed.
 - down call down_device_interface when deleting a interface, instead set it down and let the upcounts do its job.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20600 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-06 06:23:35 +00:00
Hugo Santos
0b10ed0573 check if the device going down is the head of the check list and remove it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20599 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-06 06:23:27 +00:00
Ingo Weinhold
2c24a1a9f6 New handy build system feature: It is now possible to pass a command
line to jam that contains build targets and that will be executed by
the build system after building the targets and replacing their
occurrences in the command line by their paths. The keyword indicating
such a command line is "run", targets are marked by a leading ":".
E.g.:

  jam -q run ':<build>xres' -l :libtracker.so

This builds the xres tool for the host platform and libtracker.so for
Haiku, and afterwards lists the resources libtracker.so contains. Note,
that this feature requires using Haiku's jam version.

The functionality is implemented by the new RunCommandLine rule, which
can, of course, also be used in the UserBuildConfig.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20598 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-06 03:14:58 +00:00
Ingo Weinhold
f51c147043 Added rules NextID, which returns an numerical ID incremented with each
invocation, and NewUniqueTarget, which returns a unique target name.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20597 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-06 02:39:37 +00:00
Ingo Weinhold
25b12e83ae Added rules for performing basic integer arithmetics (+, -, *). The rules
operate manually on digit lists, so they are certainly not fast and shouldn't
be used excessively, but at least it's possible to do calculations in Jam now,
should the need arise.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20596 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-06 02:37:12 +00:00
Hugo Santos
1340c38e52 added message_args decoding support to strace (used by net_stack's RECEIVE/SEND).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20595 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-06 02:02:29 +00:00
Hugo Santos
3785f4f0f0 check if receive timeout is infinite before doing the usual preparation for ABSOLUTE_TIMEOUT
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20594 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-06 02:02:18 +00:00
Hugo Santos
8d00b95aa9 The Open Group base specification mentions that EINTR should be returned if the recv() is interrupted before _any data_ is available. So we actually check if there is data, and if so, push it to the user.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20593 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-05 23:26:39 +00:00
Hugo Santos
d86f48f3f5 tiny TCP cleanups, move the read notifications to _NotifyReader().
- Also fixed the buffer size check in UDP's SendData() since UDP's length field includes the size of the header we need to check that as well. IPv4 is correct since we check for the size after prepending the header (due to it being possibly already included).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20592 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-05 22:42:45 +00:00
Hugo Santos
a5d8483183 small cleanup, use get_node_at_offset().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20591 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-05 20:45:10 +00:00
Hugo Santos
4168e54af8 send buffer size is irrelevant for UDP, instead check if the fed buffer is larger than the maximum payload UDP supported. Do the same in IPV4.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20590 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-05 19:19:38 +00:00
Hugo Santos
9e084902c1 small cleanups in UDP
- don't set_to_empty_address, instead consider NULL to be the empty address and use is_empty_address().
 - most ipv4 address module calls already consider NULL to be the empty address, ipv4_hash_address_pair didn't, fixed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20589 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-05 18:57:15 +00:00
Hugo Santos
c3e054c876 fixed an issue in UDP due to copying addresses to sockaddr, which may be too small for protocols other than IPv4. In fact, we don't need to copy the addresses at all, we can use the original address pointers in the hash key for lookup and hashing.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20588 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-05 18:35:22 +00:00
Hugo Santos
0d5afa4dec introduced fifo_socket_enqueue_buffer which clones the buffer, enqueues it to the fifo and notifies the socket.
- changed the link, ipv4 and udp modules to use fifo_socket_enqueue_buffer


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20587 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-05 17:56:20 +00:00
Hugo Santos
a5e9026688 copy back the source address even when the data is truncated
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20586 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-05 17:56:09 +00:00
Hugo Santos
daad608a3a Sigh, ignore previous commit, Open Group Specification is ambiguous. Now we properly support MSG_WAITALL.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20585 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-05 16:23:04 +00:00
Hugo Santos
8927167d28 support MSG_WAITALL in TCP
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20584 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-05 16:16:51 +00:00
Hugo Santos
485a82e613 as per the Open Group Specification, MSG_TRUNC should be set in flags whenever the packet is truncated
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20583 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-05 16:09:06 +00:00
Hugo Santos
abe1ec18ac properly support MSG_TRUNC. we don't even have to trim the buffer, just try to fill the user buffers as much as possible
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20582 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-05 16:05:07 +00:00
Hugo Santos
17b77c3b92 consolidate all RECV/SEND ioctls into a single RECEIVE/SEND pair
- changed the socket module to use thew new RECEIVE/SEND in all forms of recv() and send()
 - changed libnetwork to use the new RECEIVE/SEND
 - remove transfer_args processing from strace since the structure was removed


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20581 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-05 14:26:46 +00:00
Axel Dörfler
d1fca1ccb8 Translate print the output formats twice instead of the input formats.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20580 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-05 14:26:06 +00:00
Axel Dörfler
df004988d8 ioExtension can of course be NULL...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20579 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-05 13:33:07 +00:00
Axel Dörfler
0663933acc Now also exports the JPEG thumbnails as images using the translator service :-)
Note, this did not work with an older libtranslation.so from Haiku, so it might
also not work correctly on BeOS.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20578 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-05 13:31:17 +00:00
Axel Dörfler
580d7b0441 No longer let translators overwrite the ioExtension message when they aren't
the chosen one.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20577 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-05 13:29:55 +00:00
Axel Dörfler
ce694927b7 The TIFF translator overwrote the document count before it was clear that it could
handle the image.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20576 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-05 13:17:55 +00:00
Axel Dörfler
9468eca38a * Implemented support for the "header only" extension.
* Added missing header when compiling RAWTranslator in test mode for Haiku.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20575 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-05 12:15:56 +00:00
Axel Dörfler
09c3a92d0a Now handles two cases of incorrectly built trees gracefully (instead of crashing).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20574 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-05 11:44:35 +00:00
Axel Dörfler
b754aa3dbd RemoveItems() implementation was missing; more or less copied the one from BListView
(which is slow, but works).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20573 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-05 11:16:43 +00:00
Hugo Santos
f2893088ba fixed another TCP issue: if we were in TIME_WAIT and we received a retransmission or delayed ack, TCP would wrongly bindly immediatly acknowledge.
* Moved TIME_WAIT and CLOSED handling to common Receive() path that does Sequence checking and further tests.
 * Moved setting FLAG_NO_RECEIVE to the end of Receive() when FIN is set so we can check for NO_RECEIVE before processing the segment text just after processing FIN.
 * Added a new action DELETE to be used when in TIME_WAIT and we receive a good RST


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20572 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-05 06:56:58 +00:00
Hugo Santos
2cff90bf94 fixed a critical issue with TCP's FIN handling: if FIN was set on a packet with data, fReceiveNext would be rewritten with the queue's LastSeuence which would be effectively the required sequence - 1. Increment instead fReceiveNext with the buffer's size.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20571 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-05 04:24:29 +00:00
Hugo Santos
df247f1480 added select() support to packet capturing
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20570 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-05 04:24:21 +00:00
Hugo Santos
fcd6d8cd92 keep PUSH'ed pointer in receiver side of TCP so we can wait for more data in recv()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20569 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-05 00:21:22 +00:00
Ingo Weinhold
8338b05a30 More FS interface documentation. All FS hooks required for writing a basic
read-only FS are documented, now. Be encouraged to review and add more. :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20568 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-04 23:46:05 +00:00
Hugo Santos
8c43814982 fix locking in TCP's ReadData()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20567 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-04 21:22:48 +00:00