#
44fa45df |
|
13-Jun-2022 |
Augustin Cavalier <waddlesplash@gmail.com> |
net/if: Drop ifmediareq and just use the regular ifreq for SIOCGIFMEDIA. This was introduced into the main API in 2010 (d72ede75fb252c24c8a5fcc39395f9ae1c202322), but was actually only fully used for the past month (c2a9a890f3ac7795602d11c0edaa20ac2db48202) when SIOCGIFMEDIA was supported for all *BSD drivers and not just WiFi. Most userland consumers of this structure did not use it correctly, as was the case in #17770, and only worked because in the fallback case the network stack just treated it as if it were an ifreq. Nothing actually used the ifm_count/ifm_ulist (though tentative APIs were exposed for it) as noted by previous commits; and the fact that Haiku's IFM_* declarations are so spartan makes most of the returned values unintelligible to userland without using FreeBSD compat headers. If, in the future, we decide to implement ifmedia listing and selection properly, that should likely be done with separate ioctls instead of having multi-function ones like this. This is technically an ABI break, but in practice it should not matter: ifmediareq::ifm_current aligns with ifreq::ifr_media, so the things that used this structure like our in-tree code did will continue to work. Until this past May, the only other field that was usually set was ifm_active, but in the absence of setting ifm_status all non-Haiku consumers should ignore it completely. The only consumer of this ioctl that I know of out of the tree, wpa_supplicant, still works after these changes.
|
#
83ac9b72 |
|
13-Jun-2022 |
Augustin Cavalier <waddlesplash@gmail.com> |
network/stack: Do not invoke SIOCGIFMEDIA but just return the already-fetched media. This functionally disables most of the functionality of the BSD-style SIOCGIFMEDIA, but it was never used in userland (because if it had, it would have triggered SMAP violations in the compatibility layer.) SIOCGIFMEDIA returns BSD-style media values, which mostly overlap with Haiku ones but have a few differences still. These are taken care of in the compat layer by ETHER_GET_LINK_STATE, which is where this media value comes from, but are not by SIOCGIFMEDIA which just passes back whatever the drivers do. Fixes #17770, at least for ethernet drivers.
|
#
071d7d3e |
|
28-Oct-2020 |
Jérôme Duval <jerome.duval@gmail.com> |
network/stack: assume zero length ioctl requests are valid posix ioctl calls don't provide a request length. Theorically these length checks could be removed altogether. Change-Id: Ie53f10dc8d050dd3bdf2e5a792ed79f139a24d29 Reviewed-on: https://review.haiku-os.org/c/haiku/+/3364 Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
|
#
34751079 |
|
03-Jun-2013 |
Axel Dörfler <axeld@pinc-software.de> |
network stack: added missing put_device_interface(). * Part of #7040, thanks diver!
|
#
4cde5cc2 |
|
01-Jul-2011 |
Michael Lotz <mmlr@mlotz.ch> |
* Fix binding to link level sockets. The bound type was constructed using the sdl_e_type in network byte order, causing such a socket not to receive anything. When working around that by not using htons() on bind, sending would then fail on such a socket because the byte order is actually required to be swapped there. * Extend the comment for the B_NET_FRAME_TYPE macro to document that the input types are supposed to be in host byte order to avoid future confusion. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42357 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
2cae3e88 |
|
08-Dec-2010 |
Axel Dörfler <axeld@pinc-software.de> |
* SIOCGIFMEDIA now also works on the AF_LINK level. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39776 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
04f8af7b |
|
04-Dec-2010 |
Axel Dörfler <axeld@pinc-software.de> |
* net_protocol::bind() needs to set the socket's address. This now gives the correct sender MAC address in outgoing link level packets. * SocketStatus() now also works correctly for bound protocols, ie. receiving data from a bound link level socket is now working as well. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39722 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
8b6048a2 |
|
05-Aug-2010 |
Axel Dörfler <axeld@pinc-software.de> |
* The sockaddr_dl can actually be longer than sockaddr, so we need to use a sockaddr_storage here (wasn't that bad before, as ifreq has a 30 bytes buffer after the sockaddr. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37940 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
2b415445 |
|
04-Aug-2010 |
Axel Dörfler <axeld@pinc-software.de> |
* Finished groundwork on ICMP by introducing a completely protocol agnostic error mechanism. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37896 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
2651e51d |
|
02-Aug-2010 |
Axel Dörfler <axeld@pinc-software.de> |
* Renamed net_datalink_module::send_data() to send_routed_data(), and send_datagram() to send_data(). * Renamed DatagramSocket::SocketEnqueue() to EnqueueClone(), SocketDequeue() to Dequeue(). * Ordered the methods in ProtocolUtilities.h according to their declaration. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37870 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
03e02ed9 |
|
03-Aug-2010 |
Axel Dörfler <axeld@pinc-software.de> |
* Introduced a datalink layer (2) independent way of specifying the packet type one wants to receive. Changed ipv6_datagram to use that (but note that it currently does not compile). * Header cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37868 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
cd08b9f7 |
|
02-Aug-2010 |
Axel Dörfler <axeld@pinc-software.de> |
* Work in progress of extending the AF_LINK protocol to be able to send and receive raw packets (only without the ethernet framing). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37853 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
ca215dfe |
|
02-Aug-2010 |
Axel Dörfler <axeld@pinc-software.de> |
* Replaced more occurences of EOPNOTSUPP with B_NOT_SUPPORTED. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37847 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
fee56868 |
|
02-Aug-2010 |
Axel Dörfler <axeld@pinc-software.de> |
* Added a dedicated lock for the device monitors. This fixes a locking issue in interface_protocol_send_data() which accessed the monitors unlocked. * Changed SIOCCPACKETCAP to check if the device name matches the one used with SIOCSPACKETCAP. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37845 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
41f05b86 |
|
02-Aug-2010 |
Axel Dörfler <axeld@pinc-software.de> |
* Made datalink and interface protocol module functions static. * Got rid of datalink.h. * Only allow sending/receiving of packets through AF_LINK for root (not that sending would be implemented yet). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37844 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
d72a2493 |
|
29-Jul-2010 |
Axel Dörfler <axeld@pinc-software.de> |
* Replaced ENODEV with B_DEVICE_NOT_FOUND. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37803 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
61729d93 |
|
28-Jul-2010 |
Axel Dörfler <axeld@pinc-software.de> |
* Reworked the complete stack to allow more than one address per network interface - this caused quite a number of changes. * Network interfaces, and its addresses are now reference counted (not yet complete, though, InterfaceAddresses need to hold references to their interface as well). * There are two known regressions of this commit that I will fix later: - you cannot remove interfaces anymore - IPv4 multicast was broken anyway, but now it's disabled, too. * Moved a device_interfaces.cpp|h out of interfaces.cpp. * The datalink layer chain is now instantiated per domain per interface, not just per interface anymore. * When a buffer reaches the network layer, it has no known interface yet, ie. the ipv4|6|whatever modules need to set this manually. * Added more debug output, and some new debugger commands, the control option is now printed in clear text. * Added hash_address() function to the address modules. Added "const" to set_to_defaults() where needed. * Fixed net_buffer's restore header functions offset use as reported by Atis. * Improved buffer dump output, use the domain module to print the address if available. * Moved net_buffer::type into the union, as it's not needed by the upper layers anymore. * Moved IPv6 specific code from {add|remove}_default_route() to where it belongs, but disabled it for the time being. * Completely discarded useless ipv4_datagram module. * Added ping6 to the build. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37794 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
d62ee168 |
|
23-Jul-2010 |
Axel Dörfler <axeld@pinc-software.de> |
* Corrected naming/visibility of the DatagramSocket methods (protected methods do not get the '_' prefix, only private ones do). * Added a "peek" argument to SocketStatus() (and generally renamed "clone" to "peek" where it made sense). * Implemented the base version of SocketStatus() to return the actual socket error. This enables returning ICMP errors back to the socket user. * Other minor cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37712 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
86a0cf15 |
|
16-Feb-2009 |
Axel Dörfler <axeld@pinc-software.de> |
* You can now use SIOCGIFFLAGS on the AF_LINK level as well. * Cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29231 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
2e71ef29 |
|
27-Dec-2008 |
Axel Dörfler <axeld@pinc-software.de> |
* Minor cleanup, removed TODO that doesn't make much sense. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28824 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
2b07b8e0 |
|
28-May-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Replaced all instances of benaphores in the kernel code by mutexes. * Removed kernel benaphores. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25690 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
3dba513f |
|
01-May-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
This fixes the crashes when calling {g,s}etsockopt() on an AF_LINK socket. Not sure, if there are any cases where there is a next protocol, though. Please review. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25287 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
6f58064f |
|
07-Feb-2008 |
Axel Dörfler <axeld@pinc-software.de> |
* Added flags field in net_protocol_module_info; there is currently a single defined flag: NET_PROTOCOL_ATOMIC_MESSAGES. * socket_send() now honours NET_PROTOCOL_ATOMIC_MESSAGES and returns either EMSGSIZE if the data to be send is larger than net_socket::send::buffer_size, or divides the data in appropriately sized chunks. * This fixes sending >=64K over a TCP socket at once (TCP would just have returned an error in that case). * TCP now overrides the default send buffer size (to 32768 for now). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23915 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
be2f6ac3 |
|
23-May-2007 |
Hugo Santos <hugosantos@nowhere.fake> |
net_device_interface: remove redundant fields git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21222 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
45b5203b |
|
08-May-2007 |
Hugo Santos <hugosantos@nowhere.fake> |
network stack: getsockopt/setsockopt are no longer optional for protocols, as suggested by Axel. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21085 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
53f23f85 |
|
25-Apr-2007 |
Hugo Santos <hugosantos@nowhere.fake> |
partially rewrote TCP's endpoint manager. Fixes #1173 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20814 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
74b0e858 |
|
19-Apr-2007 |
Hugo Santos <hugosantos@nowhere.fake> |
merged a bit more of functionality into DatagramSocket so we don't require a custom ReadData in the link protocol. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20765 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
2445c00e |
|
19-Apr-2007 |
Hugo Santos <hugosantos@nowhere.fake> |
some internal reorganization of getsockopt()/setsockopt() handling. TCP is now able to fully use the application requested sender/receiver buffer sizes for improved performance. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20764 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
6a606180 |
|
15-Apr-2007 |
Hugo Santos <hugosantos@nowhere.fake> |
glued the multicast filter handling to the receive path: we are now capable of receiving multicast frames in datagram sockets. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20695 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
49f3c71e |
|
13-Apr-2007 |
Hugo Santos <hugosantos@nowhere.fake> |
respect SO_BROADCAST for received and sent datagrams. - check if the destination address is specified in IPv4's SendData() - minor cleanups to IPv4's TRACE()s. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20681 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
bfb45f71 |
|
12-Apr-2007 |
Hugo Santos <hugosantos@nowhere.fake> |
introduced a new helper class DatagramSocket which provides a consistent base interface and functionality for the implementation of datagram-based sockets. - made the ipv4 raw, udp and link protocols use DatagramSocket. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20672 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
9261b129 |
|
08-Apr-2007 |
Hugo Santos <hugosantos@nowhere.fake> |
packet capture sockets are now properly notified when the device is going down. - modified LinkProtocol::ReadData() a bit so it can safely react to external changes such as the device being monitored going down. - fixed an issue in invalidate_routes() where in some cases the default route was being kept. - fixed another issue related with the fifo implementation, the notifier semaphore was being created with count of 1, instead of 0. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20622 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
e53357d5 |
|
08-Apr-2007 |
Hugo Santos <hugosantos@nowhere.fake> |
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
|
#
0d5afa4d |
|
05-Apr-2007 |
Hugo Santos <hugosantos@nowhere.fake> |
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
|
#
abe1ec18 |
|
05-Apr-2007 |
Hugo Santos <hugosantos@nowhere.fake> |
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
|
#
df247f14 |
|
04-Apr-2007 |
Hugo Santos <hugosantos@nowhere.fake> |
added select() support to packet capturing git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20570 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
9c4477d3 |
|
01-Apr-2007 |
Axel Dörfler <axeld@pinc-software.de> |
SIOCGIFCONF will now also report the size of the written buffer in ifconf.ifc_len to cover the case the list of interfaces changed since SIOCGIFCOUNT was called. Patch by Hugo Santos. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20491 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
c22d69bf |
|
08-Aug-2006 |
Axel Dörfler <axeld@pinc-software.de> |
* Completed the previous commit and merger of the team/network/new_stack branch. * Removed ppp_up and pppcontrol from the image for now. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18457 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
34751079813333bb652f874ae9994c0b140596cb |
|
03-Jun-2013 |
Axel Dörfler <axeld@pinc-software.de> |
network stack: added missing put_device_interface(). * Part of #7040, thanks diver!
|
#
4cde5cc2281605a6aae698448132d807011cab79 |
|
01-Jul-2011 |
Michael Lotz <mmlr@mlotz.ch> |
* Fix binding to link level sockets. The bound type was constructed using the sdl_e_type in network byte order, causing such a socket not to receive anything. When working around that by not using htons() on bind, sending would then fail on such a socket because the byte order is actually required to be swapped there. * Extend the comment for the B_NET_FRAME_TYPE macro to document that the input types are supposed to be in host byte order to avoid future confusion. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42357 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
2cae3e8847f05662334e50b9a43627cc0043afec |
|
08-Dec-2010 |
Axel Dörfler <axeld@pinc-software.de> |
* SIOCGIFMEDIA now also works on the AF_LINK level. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39776 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
04f8af7bf95044f5d625dfce492fc2814c78393b |
|
04-Dec-2010 |
Axel Dörfler <axeld@pinc-software.de> |
* net_protocol::bind() needs to set the socket's address. This now gives the correct sender MAC address in outgoing link level packets. * SocketStatus() now also works correctly for bound protocols, ie. receiving data from a bound link level socket is now working as well. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39722 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
8b6048a28553498b6c4fb099588da984830ded0f |
|
05-Aug-2010 |
Axel Dörfler <axeld@pinc-software.de> |
* The sockaddr_dl can actually be longer than sockaddr, so we need to use a sockaddr_storage here (wasn't that bad before, as ifreq has a 30 bytes buffer after the sockaddr. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37940 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
2b4154458a820aa0b55b2800de9f0a13ea6ec1e2 |
|
04-Aug-2010 |
Axel Dörfler <axeld@pinc-software.de> |
* Finished groundwork on ICMP by introducing a completely protocol agnostic error mechanism. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37896 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
2651e51d92770a979fee2e99c4a4b27c3ac03e82 |
|
02-Aug-2010 |
Axel Dörfler <axeld@pinc-software.de> |
* Renamed net_datalink_module::send_data() to send_routed_data(), and send_datagram() to send_data(). * Renamed DatagramSocket::SocketEnqueue() to EnqueueClone(), SocketDequeue() to Dequeue(). * Ordered the methods in ProtocolUtilities.h according to their declaration. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37870 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
03e02ed9836f03018a146f791ee65a3ec3ab7842 |
|
03-Aug-2010 |
Axel Dörfler <axeld@pinc-software.de> |
* Introduced a datalink layer (2) independent way of specifying the packet type one wants to receive. Changed ipv6_datagram to use that (but note that it currently does not compile). * Header cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37868 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
cd08b9f7bcc33dc652bffd344aeb9155540bebae |
|
02-Aug-2010 |
Axel Dörfler <axeld@pinc-software.de> |
* Work in progress of extending the AF_LINK protocol to be able to send and receive raw packets (only without the ethernet framing). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37853 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
ca215dfe683e040f0a44917f26cef0d7d439e59a |
|
02-Aug-2010 |
Axel Dörfler <axeld@pinc-software.de> |
* Replaced more occurences of EOPNOTSUPP with B_NOT_SUPPORTED. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37847 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
fee56868a14c1580d9c22a8edfec33d01b002762 |
|
02-Aug-2010 |
Axel Dörfler <axeld@pinc-software.de> |
* Added a dedicated lock for the device monitors. This fixes a locking issue in interface_protocol_send_data() which accessed the monitors unlocked. * Changed SIOCCPACKETCAP to check if the device name matches the one used with SIOCSPACKETCAP. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37845 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
41f05b86075aaec56018e9b6ffe277e48d560f54 |
|
02-Aug-2010 |
Axel Dörfler <axeld@pinc-software.de> |
* Made datalink and interface protocol module functions static. * Got rid of datalink.h. * Only allow sending/receiving of packets through AF_LINK for root (not that sending would be implemented yet). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37844 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
d72a2493e6eff7a91868b567965fe5ec45c4865c |
|
29-Jul-2010 |
Axel Dörfler <axeld@pinc-software.de> |
* Replaced ENODEV with B_DEVICE_NOT_FOUND. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37803 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
61729d9323a555b9025ef6ebeb85dc1627f8acf7 |
|
28-Jul-2010 |
Axel Dörfler <axeld@pinc-software.de> |
* Reworked the complete stack to allow more than one address per network interface - this caused quite a number of changes. * Network interfaces, and its addresses are now reference counted (not yet complete, though, InterfaceAddresses need to hold references to their interface as well). * There are two known regressions of this commit that I will fix later: - you cannot remove interfaces anymore - IPv4 multicast was broken anyway, but now it's disabled, too. * Moved a device_interfaces.cpp|h out of interfaces.cpp. * The datalink layer chain is now instantiated per domain per interface, not just per interface anymore. * When a buffer reaches the network layer, it has no known interface yet, ie. the ipv4|6|whatever modules need to set this manually. * Added more debug output, and some new debugger commands, the control option is now printed in clear text. * Added hash_address() function to the address modules. Added "const" to set_to_defaults() where needed. * Fixed net_buffer's restore header functions offset use as reported by Atis. * Improved buffer dump output, use the domain module to print the address if available. * Moved net_buffer::type into the union, as it's not needed by the upper layers anymore. * Moved IPv6 specific code from {add|remove}_default_route() to where it belongs, but disabled it for the time being. * Completely discarded useless ipv4_datagram module. * Added ping6 to the build. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37794 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
d62ee168ed34ed29e6d11d84ea0712733ad1041f |
|
23-Jul-2010 |
Axel Dörfler <axeld@pinc-software.de> |
* Corrected naming/visibility of the DatagramSocket methods (protected methods do not get the '_' prefix, only private ones do). * Added a "peek" argument to SocketStatus() (and generally renamed "clone" to "peek" where it made sense). * Implemented the base version of SocketStatus() to return the actual socket error. This enables returning ICMP errors back to the socket user. * Other minor cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37712 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
86a0cf15e4df5194fcd056ee92c26a1f9a5697ce |
|
16-Feb-2009 |
Axel Dörfler <axeld@pinc-software.de> |
* You can now use SIOCGIFFLAGS on the AF_LINK level as well. * Cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29231 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
2e71ef292f09548381048d1c79e7e3172e72667c |
|
27-Dec-2008 |
Axel Dörfler <axeld@pinc-software.de> |
* Minor cleanup, removed TODO that doesn't make much sense. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28824 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
2b07b8e0f1a7f1e76f31db24a21a42cbb01d7b9c |
|
28-May-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Replaced all instances of benaphores in the kernel code by mutexes. * Removed kernel benaphores. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25690 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
3dba513f4cb1c5a23796b97e02e461cd631ee7da |
|
01-May-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
This fixes the crashes when calling {g,s}etsockopt() on an AF_LINK socket. Not sure, if there are any cases where there is a next protocol, though. Please review. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25287 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
6f58064f104ef231faed3c2259885065c4242eaa |
|
07-Feb-2008 |
Axel Dörfler <axeld@pinc-software.de> |
* Added flags field in net_protocol_module_info; there is currently a single defined flag: NET_PROTOCOL_ATOMIC_MESSAGES. * socket_send() now honours NET_PROTOCOL_ATOMIC_MESSAGES and returns either EMSGSIZE if the data to be send is larger than net_socket::send::buffer_size, or divides the data in appropriately sized chunks. * This fixes sending >=64K over a TCP socket at once (TCP would just have returned an error in that case). * TCP now overrides the default send buffer size (to 32768 for now). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23915 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
be2f6ac347c515343af9eb6222725fd9ca8718b9 |
|
23-May-2007 |
Hugo Santos <hugosantos@nowhere.fake> |
net_device_interface: remove redundant fields git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21222 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
45b5203b786a318040f09aafd9b7d86877d30fe9 |
|
08-May-2007 |
Hugo Santos <hugosantos@nowhere.fake> |
network stack: getsockopt/setsockopt are no longer optional for protocols, as suggested by Axel. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21085 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
53f23f85a2725c8fc31c7a874256084c7c623d86 |
|
25-Apr-2007 |
Hugo Santos <hugosantos@nowhere.fake> |
partially rewrote TCP's endpoint manager. Fixes #1173 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20814 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
74b0e8584522bf131e46c544e9abbd3ee4a21011 |
|
19-Apr-2007 |
Hugo Santos <hugosantos@nowhere.fake> |
merged a bit more of functionality into DatagramSocket so we don't require a custom ReadData in the link protocol. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20765 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
2445c00e6420e2b365cba47c758b66fc04e75f59 |
|
19-Apr-2007 |
Hugo Santos <hugosantos@nowhere.fake> |
some internal reorganization of getsockopt()/setsockopt() handling. TCP is now able to fully use the application requested sender/receiver buffer sizes for improved performance. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20764 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
6a60618094d288e845e7384ec6ab5b4e63f742e5 |
|
15-Apr-2007 |
Hugo Santos <hugosantos@nowhere.fake> |
glued the multicast filter handling to the receive path: we are now capable of receiving multicast frames in datagram sockets. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20695 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
49f3c71e21b3b4f09905bf967b84e909fa24cd2b |
|
13-Apr-2007 |
Hugo Santos <hugosantos@nowhere.fake> |
respect SO_BROADCAST for received and sent datagrams. - check if the destination address is specified in IPv4's SendData() - minor cleanups to IPv4's TRACE()s. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20681 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
bfb45f717c648c5cd68e84c8ca1f805d099ba3c5 |
|
12-Apr-2007 |
Hugo Santos <hugosantos@nowhere.fake> |
introduced a new helper class DatagramSocket which provides a consistent base interface and functionality for the implementation of datagram-based sockets. - made the ipv4 raw, udp and link protocols use DatagramSocket. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20672 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
9261b129886d285ddb488b27b608efb25c733e88 |
|
08-Apr-2007 |
Hugo Santos <hugosantos@nowhere.fake> |
packet capture sockets are now properly notified when the device is going down. - modified LinkProtocol::ReadData() a bit so it can safely react to external changes such as the device being monitored going down. - fixed an issue in invalidate_routes() where in some cases the default route was being kept. - fixed another issue related with the fifo implementation, the notifier semaphore was being created with count of 1, instead of 0. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20622 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
e53357d57adc145e4c36a3dc35cecde8bea07297 |
|
08-Apr-2007 |
Hugo Santos <hugosantos@nowhere.fake> |
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
|
#
0d5afa4decb83fc03232a420d85c7838f70d2266 |
|
05-Apr-2007 |
Hugo Santos <hugosantos@nowhere.fake> |
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
|
#
abe1ec18ac0e70d36b0cc595fc176ea4dd9df818 |
|
05-Apr-2007 |
Hugo Santos <hugosantos@nowhere.fake> |
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
|
#
df247f1480415f8b5258df3926e5db7cf53d9938 |
|
04-Apr-2007 |
Hugo Santos <hugosantos@nowhere.fake> |
added select() support to packet capturing git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20570 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
9c4477d3bf7ba915564c31106c177cde3998ed26 |
|
01-Apr-2007 |
Axel Dörfler <axeld@pinc-software.de> |
SIOCGIFCONF will now also report the size of the written buffer in ifconf.ifc_len to cover the case the list of interfaces changed since SIOCGIFCOUNT was called. Patch by Hugo Santos. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20491 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
c22d69bf1f5f60f7ebddd79108a53c8f97f300fe |
|
08-Aug-2006 |
Axel Dörfler <axeld@pinc-software.de> |
* Completed the previous commit and merger of the team/network/new_stack branch. * Removed ppp_up and pppcontrol from the image for now. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18457 a95241bf-73f2-0310-859d-f6bbb57e9c96
|