Commit Graph

19497 Commits

Author SHA1 Message Date
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
Jérôme Duval
9e7de14057 added the usual weak symbols to fix bug #1134
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20566 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-04 20:56:57 +00:00
Hugo Santos
c96b101d4d net_socket: make recvfrom() use recvmsg() and sendto() use sendmsg() for code reusal
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20565 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-04 19:42:53 +00:00
Hugo Santos
babe239b7a copy back msg_flags after recvmsg() (we don't really use it yet though)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20564 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-04 19:42:33 +00:00
Hugo Santos
7245533300 some fixes to recvmsg() and sendmsg()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20563 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-04 19:17:04 +00:00
Hugo Santos
dae7f8ea46 initial recvmsg and sendmsg implementations
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20562 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-04 17:39:43 +00:00
Axel Dörfler
0cac8bd145 Forgot to set IFM_ETHER in all drivers; "ethernet" now also sets it just in case.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20561 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-04 17:04:54 +00:00
Hugo Santos
b7c0eba571 we want the argument's contents, don't use the size of the pointer (this would even be 8 bytes in a 64 bits platform).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20560 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-04 15:59:13 +00:00
Hugo Santos
183071cab3 ipro1000 knows when its link state changes (notified by interrupt). Use ETHER_SET_LINK_STATE_SEM to wake the ethernet device link state notifier sooner.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20559 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-04 15:54:50 +00:00
Hugo Santos
8df968341a tiny case but T/TX is copper, SX is fiber
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20558 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-04 15:36:10 +00:00
Axel Dörfler
bf256341b9 Only print the media state in case we're linked.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20557 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-04 14:20:32 +00:00
Axel Dörfler
eb70c5dd3b * Set default media type to IFM_ETHER.
* Added ETHER_INIT back in; we even have a driver in our repository that uses it,
  thanks to Michael for pointing that out.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20556 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-04 13:42:45 +00:00
Axel Dörfler
6d60dde7cd Added support for printing the media type.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20555 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-04 13:32:18 +00:00
Hugo Santos
f03d121241 handle all cases of SIOCSIFFLAGS in the same place
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20554 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-04 12:53:27 +00:00
Hugo Santos
ca2aa96377 don't overwrite the flags we set when the interface goes up or down, instead just update the flags in the same place.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20553 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-04 12:51:23 +00:00
Hugo Santos
e65e15292c set IFM_ACTIVE if ipro1000 has link and output media changes on update_link_state()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20552 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-04 12:51:09 +00:00
Hugo Santos
36883c5516 ipro1000: added ETHER_GET_LINK_STATE support
* use em_media_status to get link status
 * added IFM_1000_SX (Fiber Optic) to net/if_media.h


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20551 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-04 12:50:54 +00:00
Hugo Santos
c57dbb8b04 output IFF_LINK, IFF_AUTO_CONFIGURED and IFF_CONFIGURING flags
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20550 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-04 12:50:44 +00:00
Axel Dörfler
b92d0fce7c Rotated images still didn't work correctly; they were offseted.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20549 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-04 12:31:50 +00:00
Axel Dörfler
7e4913f545 * Rotated images did not work correctly.
* Removed ICO specific configuration, added copyright note about the source of this translator.
* Disabled test mode for the build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20548 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-04 11:57:33 +00:00
Axel Dörfler
00006796b4 net_device should come first in order to guaranty it will work together nicely
with C only code. Thanks Hugo!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20547 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-04 10:25:35 +00:00
Axel Dörfler
9206bb3779 * Changed ETHER_GET_LINK_STATE ethernet driver interface, added ETHER_SET_LINK_STATE_SEM.
* The device interface list now uses class DoublyLinkedList instead of struct list.
* Implemented SIOC[SG]IFMEDIA for setting (not supported by any device yet), and
  retrieving the device media information.
* Fixed a locking bug in list_domain_interfaces().
* Added new stack function device_link_changed() that should be called in case the
  link state (media) changed.
* The ethernet device module now spawns a thread and will periodically check the media
  state of all ethernet devices that support this (if any).
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20546 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-04 09:41:04 +00:00
Ingo Weinhold
3458a335ab Started documenting the FS API a bit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20544 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-04 01:27:50 +00:00
Hugo Santos
ecde9adfaf gcc 4 compilation fixes. Patch by Jerome Duval.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20543 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-03 18:50:27 +00:00
Hugo Santos
52e75b6236 TCP: initial shutdown() implementation and some general fixes
* set FLAG_NO_RECEIVE/FLAG_NO_SEND on shutdown() and send FIN on SHUT_WR
 * if a send() is attempted with FLAG_NO_SEND set return EPIPE
 * proper handling of recv timeout in ReadData(), using absolute timeout instead of relative
 * if FLAG_NO_RECEIVE is set, don't attached more segments to the receive queue, drop them instead


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20542 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-03 18:38:42 +00:00
Jérôme Duval
15fda8f547 implemented ETHER_GETLINKSTATE for bcm440x and bcm570x
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20541 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-03 18:27:24 +00:00
Hugo Santos
0c88e5eea3 implemented SO_LINGER support in TCP
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20540 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-03 17:35:56 +00:00