History log of /haiku/src/add-ons/kernel/network/stack/link.cpp (Results 1 – 25 of 41)
Revision Date Author Comments
# 97f11716 04-Sep-2022 Niels Sascha Reedijk <niels.reedijk@gmail.com>

Merge remote-tracking branch 'origin/master' into dev/netservices

Change-Id: I588c4a840523995f820161d63741c137bc5c719c


# 44fa45df 14-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 fo

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.

show more ...


# 83ac9b72 14-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 user

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.

show more ...


# 071d7d3e 29-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: Ie53f10dc8d050dd

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>

show more ...


# c14bca29 13-Sep-2013 François Revol <revol@free.fr>

Merge branch 'master' into sam460ex


# 7e78b434 08-Jul-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Merge remote-tracking branch 'haiku/master' into package-management

Conflicts:
build/jam/HaikuImage
build/jam/OptionalPackageDependencies
build/jam/OptionalPackages
build/scripts/build_cross_too

Merge remote-tracking branch 'haiku/master' into package-management

Conflicts:
build/jam/HaikuImage
build/jam/OptionalPackageDependencies
build/jam/OptionalPackages
build/scripts/build_cross_tools_gcc4
src/add-ons/translators/icns/Jamfile
src/add-ons/translators/jpeg/Jamfile

show more ...


# 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 us

* 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

show more ...


# 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

* 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

show more ...


# 8b6048a2 06-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://

* 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

show more ...


# 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 03-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().
*

* 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

show more ...


# 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 cle

* 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

show more ...


# 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 a952

* 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

show more ...


# 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

* 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

show more ...


# 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 ye

* 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

show more ...


# 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 ye

* 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

show more ...


# 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 "

* 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

show more ...


# 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 29-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 02-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/

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

show more ...


12