History log of /haiku-fatelf/src/add-ons/kernel/network/stack/device_interfaces.cpp
Revision Date Author Comments
# e4a05be4 07-Jan-2013 Stefano Ceccherini <stefano.ceccherini@gmail.com>

Use close_module_list() to free the list.
There are a pair of Coverity CIDs for these two.


# 944235dd 22-Dec-2012 Evgeny Abdraimov <zelenoviy@gmail.com>

Initialization of net_device_interface::monitor_count corrected

Fixes #8839

Signed-off-by: Siarzhuk Zharski <zharik@gmx.li>


# 6d796a84 10-Aug-2012 Alex Smith <alex@alex-smith.me.uk>

Fixed up network stack and drivers for x86_64.

* Various compilation fixes.
* Fixes to the FreeBSD compatibility layer (from comparing the x86-
specific bits with the equivalent amd64 sources in FreeBSD).
* Compile all the Ethernet drivers except for sis900 and wb840, these
require a bit more work to fix (will file a ticket soon). Tested
ipro1000 and rtl81xx, no issues.


# 73fd6175 10-Dec-2010 Rene Gollent <anevilyak@gmail.com>

Since sdl_e_type is now stored in network byte order, device_consumer_thread()
needed a corresponding adjustment to convert it back to host order before
working with it. Fixes #6972.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39812 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cf064cc7 27-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* Set the new net_buffer::index field on retrieval of a buffer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38394 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 44a3d0d1 15-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* Spotted a few reference counting bugs that were probably responsible for
#6446, although I could not reproduce the exact problem.
* net_datalink::is_local_[link_]address() now releases a previous reference if
the _interfaceAddress arguments does not point to NULL.
* When a buffer is received from a device, it's interface_address should be NULL
already.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38118 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1f9c8c45 05-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* Changed the _SIZEOF_ADDR_IFREQ() macro such that it can be used how we are
using it - hopefully, that is actually correct (it's adopted from FreeBSD).
* Fixed bug that cut off the sockaddr_dl reported by the system, so that DHCP
wouldn't work anymore (and ifconfig wouldn't show the actual MAC address
anymore).
* Changed the listing code to actually pad to ifreq size, and leave the length
of the sockaddr untouched.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37941 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 715fed44 05-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* Make sure the SIOCGIFCONF never returns an address with an address length
smaller than sizeof(sockaddr). This fixes a compatibility issue with other
platforms - portable software often assumes that the amount of bytes to
add to an ifreq structure is the larger amount between sizeof(ifreq), and
basically what the _SIZEOF_ADDR_IFREQ() macro returns, instead of always
relying on that macro.
* Renamed UserBuffer::Copy() to Push, ConsumedAmount() to BytesConsumed(),
added Pad() method.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37927 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cc8eceb0 04-Aug-2010 Philippe Houdoin <philippe.houdoin@gmail.com>

Report the actual error when read() or write() a network device failed.
This enable to actually detect and handle device removal (USB...).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37897 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7aa2819c 03-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* Enabled removing the interface on device removal again.
* Made the return type of remove_interface() void, as it cannot fail.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37884 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


# 67678a98 02-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* put_device_interface() now also accepts a NULL pointer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37852 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


# 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


# 6d796a84bd484ccc4fb072a29c663b660180ae51 10-Aug-2012 Alex Smith <alex@alex-smith.me.uk>

Fixed up network stack and drivers for x86_64.

* Various compilation fixes.
* Fixes to the FreeBSD compatibility layer (from comparing the x86-
specific bits with the equivalent amd64 sources in FreeBSD).
* Compile all the Ethernet drivers except for sis900 and wb840, these
require a bit more work to fix (will file a ticket soon). Tested
ipro1000 and rtl81xx, no issues.


# 73fd6175319568e957531334d7e5b0761b9f2aa5 10-Dec-2010 Rene Gollent <anevilyak@gmail.com>

Since sdl_e_type is now stored in network byte order, device_consumer_thread()
needed a corresponding adjustment to convert it back to host order before
working with it. Fixes #6972.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39812 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cf064cc7b508b4ca535bd916bfc8b4ba22f9c525 27-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* Set the new net_buffer::index field on retrieval of a buffer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38394 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 44a3d0d1f699d16f8fc4a5443b5bd383d5267146 15-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* Spotted a few reference counting bugs that were probably responsible for
#6446, although I could not reproduce the exact problem.
* net_datalink::is_local_[link_]address() now releases a previous reference if
the _interfaceAddress arguments does not point to NULL.
* When a buffer is received from a device, it's interface_address should be NULL
already.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38118 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1f9c8c4576524824cf035824a9cac69ac8371aee 05-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* Changed the _SIZEOF_ADDR_IFREQ() macro such that it can be used how we are
using it - hopefully, that is actually correct (it's adopted from FreeBSD).
* Fixed bug that cut off the sockaddr_dl reported by the system, so that DHCP
wouldn't work anymore (and ifconfig wouldn't show the actual MAC address
anymore).
* Changed the listing code to actually pad to ifreq size, and leave the length
of the sockaddr untouched.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37941 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 715fed4479b4711a1c0e44b5f1411509ce34f725 05-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* Make sure the SIOCGIFCONF never returns an address with an address length
smaller than sizeof(sockaddr). This fixes a compatibility issue with other
platforms - portable software often assumes that the amount of bytes to
add to an ifreq structure is the larger amount between sizeof(ifreq), and
basically what the _SIZEOF_ADDR_IFREQ() macro returns, instead of always
relying on that macro.
* Renamed UserBuffer::Copy() to Push, ConsumedAmount() to BytesConsumed(),
added Pad() method.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37927 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cc8eceb0af9ece5bcea51b106fa73e83b6b750a8 04-Aug-2010 Philippe Houdoin <philippe.houdoin@gmail.com>

Report the actual error when read() or write() a network device failed.
This enable to actually detect and handle device removal (USB...).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37897 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7aa2819c12dc59c791f84ea19839528cf10bb9f2 03-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* Enabled removing the interface on device removal again.
* Made the return type of remove_interface() void, as it cannot fail.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37884 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


# 67678a989e49ff7bac0a79bf30c240c27f6f96d7 02-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* put_device_interface() now also accepts a NULL pointer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37852 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


# 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