History log of /haiku/src/add-ons/kernel/network/stack/routes.cpp
Revision Date Author Comments
# ce08f03c 01-Apr-2023 Augustin Cavalier <waddlesplash@gmail.com>

kernel & add-ons: Adjustments to use DoublyLinkedList::InsertBefore.

The Insert(before, element) function has been marked deprecated since
2010, but still had many usage and kept accumulating more. It's long
past time we got rid of all them and actually deprecated the function
itself.

Insert(before, element) just calls InsertBefore, so no functional change.


# 359d64ed 18-Apr-2015 Michael Lotz <mmlr@mlotz.ch>

network stack: Style fix of constant name.


# d66114be 12-Apr-2015 Michael Lotz <mmlr@mlotz.ch>

network stack: Copy right amount of data from request buffer.

The full size of the entry, including the size of the following
addresses, was used when copying the request instead of just the request
buffer size. Also clear the request buffer to 0 as not all of it is
otherwise initialized.


# 8ccc01cf 13-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* Improved the output of the "net_domains" KDL command.


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


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

* Renamed the proprietary SIOC_* ioctls to B_SOCKET_* - no reason to pollute
global name space, and have ugly identifiers for nothing :-)
* Added a flags field to struct ifaliasreq. Added flags to mark an alias that
is currently being configured, or has been automatically configured.
Those flags aren't used yet, but they will replace IFF_CONFIGURING and
friends.
* Implemented deleting addresses only from interfaces via ifconfig.
* Added more command aliases for delete to ifconfig ("del", and "delete", for
more consistency with route).
* Fixed control_routes() to only release a reference to an address if it
actually got one before.
* If an interface address is deleted, its routes are now removed as well.
* InterfaceAddress now holds a reference to its interface as planned.
* Implemented removing interfaces. Works quite nicely.
* When downing an interface, all of its routes are now removed. When upping
it again, at least the default routes are added.
* datalink.cpp's get_interface_name_or_index() leaked a reference to the
interface found.
* SIOCAIFADDR would also leak a reference when new addresses were added.


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


# 4ea113cd 22-Jul-2010 Axel Dörfler <axeld@pinc-software.de>

* Make sure the interface matches to the route if given. This fixes problem 1 of
bug #6243.


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


# 0fc7ab7b 19-Jul-2010 Axel Dörfler <axeld@pinc-software.de>

* put_route() now survives being called with a NULL domain (TCP might do this).
* This fixes bug #6239.


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


# 4e32bf09 23-Jan-2010 Axel Dörfler <axeld@pinc-software.de>

* Simplified code a bit.


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


# 2e095ebc 03-Jan-2010 Axel Dörfler <axeld@pinc-software.de>

* Removed an assert that will now always trigger (due to the DoublyLinkedList
changes).


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


# 26153d0f 03-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* The net_domain's lock is now a recursive lock.
* Fixed all route locking problems, of which there were numerous
({add|remove}_route(), and list_routes() did not lock at all). Added
lock assertions in functions that don't do the locking themselves.
* A route will now be removed from the list in remove_route(), not in
put_route_internal(). Before, a route could easily be removed twice, causing
remove_route() to release references it did not own. This fixes bug #2706.


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


# b11680b7 03-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* Cleanup.


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


# f6874c7b 14-Feb-2009 Axel Dörfler <axeld@pinc-software.de>

* When there was no link, the wrong route was chosen as a candidate when trying
to get a local connection (the first candidate must be used, not the last).


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


# 27e0dea9 11-Oct-2008 Axel Dörfler <axeld@pinc-software.de>

* Actually implemented the SO_BINDTODEVICE socket option I added some time ago.
* This makes it possible to select a specific device, even if no interface
has been configured for it yet. To make it work, each interface now has a
private direct route which will be returned if a socket is bound to a device.
* This will be used for example in DHCP to make it work when more than one
adapter is attached.


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


# 573d0b4d 19-Mar-2008 Axel Dörfler <axeld@pinc-software.de>

* Routes that belong to an interface without a link are no longer
ignored, but other routes will be preferred if available.
* This fixes problems with networking cards that don't report their
link status correctly (ipro100, see bug #1936), or too late
(nforce, ipro1000, see bug #1941). Drivers that did not report any
status at all were not affected, though.


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


# e30b6f26 17-Mar-2008 Axel Dörfler <axeld@pinc-software.de>

* There can now be one default route per interface, not just one
default route in the whole stack. The default routes are ordered by
link speed, so faster interfaces are preferred.
* find_route() by net_route now also checks for the equality of the
RTF_DEFAULT flag
* find_route() by address now ignores routes that point to interfaces
that have no link; if you have more than one configured interface in
your system, the one with a link is now always chosen.
* get_route_internal() now recognizes AF_LINK addresses, and allows
one to specify a route by interface this way.
* Implemented update_route_info().
* Minor cleanup, moved copy_address(), and fill_route_entry() into the
private part of the file.


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


# 5d27657b 16-Mar-2008 Bruno G. Albuquerque <bga@bug-br.org.br>

- Fix building with TRACE enabled.



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


# 3c7287cc 03-Nov-2007 Hugo Santos <hugosantos@nowhere.fake>

r10168@haiku-devel: hugo | 2007-11-03 12:35:29 +0100
find_route() is not really IPv4 specific.


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


# 9004a564 25-Oct-2007 Axel Dörfler <axeld@pinc-software.de>

* Made some functions static that should have been.
* Added a commented out dump_routes() function for debugging purposes.
* Removed weird spaces, fixed indentation.


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


# 79a0d252 22-May-2007 Hugo Santos <hugosantos@nowhere.fake>

net_buffer: preparing for better metadata management


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


# 6c353509 11-Apr-2007 Hugo Santos <hugosantos@nowhere.fake>

moved address selection logic to a new 'get_buffer_route'.

- IPv4 now assumes the addresses it is supplied in send_routed_data are already the appropriate ones.
- made the Data(), operator* and operator-> methods in NetBufferFieldReader const so we can use them in the same expression as the constructor.
- fixed an issue with UDP where the wrong source address could be used in the calculating the checksum.
- changed ipv4_print_address to use the more common 0.0.0.0 format.


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


# fb300cfd 07-Apr-2007 Hugo Santos <hugosantos@nowhere.fake>

introduced net_device_interface level locking.


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


# c64fecca 06-Apr-2007 Hugo Santos <hugosantos@nowhere.fake>

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


# 5333836f 01-Apr-2007 Hugo Santos <hugosantos@nowhere.fake>

use generic UserBuffer in fill_route_entry


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


# b6d25ffb 31-Mar-2007 Axel Dörfler <axeld@pinc-software.de>

Missed an improvement Hugo sent me a bit later.


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


# 2d55afcd 31-Mar-2007 Axel Dörfler <axeld@pinc-software.de>

Support getting route information for a specific destination
using SIOCGETRT. Patch by Hugo Santos.


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


# af3a31f7 01-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

Calmed down the networking stack a lot - since it basically works, there is no
reason to slow it down with debug output that much; this will also help investigating
some issues where you just aren't interested in most of the output.


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


# d1d0d5c6 19-Oct-2006 Axel Dörfler <axeld@pinc-software.de>

There can only be one default route per interface - so match anything if
RTF_DEFAULT is set in the query.


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


# 891a127f 17-Sep-2006 Marcus Overhagen <marcusoverhagen@gmail.com>

various gcc 4 related build fixes


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


# 359d64ed663e922f6aa68d3da8d8fa5c614da9eb 18-Apr-2015 Michael Lotz <mmlr@mlotz.ch>

network stack: Style fix of constant name.


# d66114beceb122b4ab24410dd1178ff475411fef 12-Apr-2015 Michael Lotz <mmlr@mlotz.ch>

network stack: Copy right amount of data from request buffer.

The full size of the entry, including the size of the following
addresses, was used when copying the request instead of just the request
buffer size. Also clear the request buffer to 0 as not all of it is
otherwise initialized.


# 8ccc01cf2d7ee051e7a38e045ba08aebb4445e4d 13-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* Improved the output of the "net_domains" KDL command.


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


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

* Renamed the proprietary SIOC_* ioctls to B_SOCKET_* - no reason to pollute
global name space, and have ugly identifiers for nothing :-)
* Added a flags field to struct ifaliasreq. Added flags to mark an alias that
is currently being configured, or has been automatically configured.
Those flags aren't used yet, but they will replace IFF_CONFIGURING and
friends.
* Implemented deleting addresses only from interfaces via ifconfig.
* Added more command aliases for delete to ifconfig ("del", and "delete", for
more consistency with route).
* Fixed control_routes() to only release a reference to an address if it
actually got one before.
* If an interface address is deleted, its routes are now removed as well.
* InterfaceAddress now holds a reference to its interface as planned.
* Implemented removing interfaces. Works quite nicely.
* When downing an interface, all of its routes are now removed. When upping
it again, at least the default routes are added.
* datalink.cpp's get_interface_name_or_index() leaked a reference to the
interface found.
* SIOCAIFADDR would also leak a reference when new addresses were added.


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


# 4ea113cd533d6abe289bc694f3ea3d49367a2720 22-Jul-2010 Axel Dörfler <axeld@pinc-software.de>

* Make sure the interface matches to the route if given. This fixes problem 1 of
bug #6243.


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


# 0fc7ab7be6fc2178c9bcdde01b83080611ca4f9c 19-Jul-2010 Axel Dörfler <axeld@pinc-software.de>

* put_route() now survives being called with a NULL domain (TCP might do this).
* This fixes bug #6239.


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


# 4e32bf0954a037c8b9dc56c358aa209b77f2103d 23-Jan-2010 Axel Dörfler <axeld@pinc-software.de>

* Simplified code a bit.


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


# 2e095ebca84962e43b13571da3f4a5af43549559 03-Jan-2010 Axel Dörfler <axeld@pinc-software.de>

* Removed an assert that will now always trigger (due to the DoublyLinkedList
changes).


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


# 26153d0f67e36b509dade3b8aed43ba7b753578b 03-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* The net_domain's lock is now a recursive lock.
* Fixed all route locking problems, of which there were numerous
({add|remove}_route(), and list_routes() did not lock at all). Added
lock assertions in functions that don't do the locking themselves.
* A route will now be removed from the list in remove_route(), not in
put_route_internal(). Before, a route could easily be removed twice, causing
remove_route() to release references it did not own. This fixes bug #2706.


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


# b11680b741dc97d3c3870bd9d0e4cef3426dc155 03-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* Cleanup.


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


# f6874c7b31c336c5f2e910e73fc37a567f6f6943 14-Feb-2009 Axel Dörfler <axeld@pinc-software.de>

* When there was no link, the wrong route was chosen as a candidate when trying
to get a local connection (the first candidate must be used, not the last).


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


# 27e0dea9f0bbc7db87e04d09fa707f8790575918 11-Oct-2008 Axel Dörfler <axeld@pinc-software.de>

* Actually implemented the SO_BINDTODEVICE socket option I added some time ago.
* This makes it possible to select a specific device, even if no interface
has been configured for it yet. To make it work, each interface now has a
private direct route which will be returned if a socket is bound to a device.
* This will be used for example in DHCP to make it work when more than one
adapter is attached.


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


# 573d0b4d6dfb468929b3d5bc33679e52425fc1e8 19-Mar-2008 Axel Dörfler <axeld@pinc-software.de>

* Routes that belong to an interface without a link are no longer
ignored, but other routes will be preferred if available.
* This fixes problems with networking cards that don't report their
link status correctly (ipro100, see bug #1936), or too late
(nforce, ipro1000, see bug #1941). Drivers that did not report any
status at all were not affected, though.


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


# e30b6f26939306bad4b97dbf36b58b8fc5ca42d3 17-Mar-2008 Axel Dörfler <axeld@pinc-software.de>

* There can now be one default route per interface, not just one
default route in the whole stack. The default routes are ordered by
link speed, so faster interfaces are preferred.
* find_route() by net_route now also checks for the equality of the
RTF_DEFAULT flag
* find_route() by address now ignores routes that point to interfaces
that have no link; if you have more than one configured interface in
your system, the one with a link is now always chosen.
* get_route_internal() now recognizes AF_LINK addresses, and allows
one to specify a route by interface this way.
* Implemented update_route_info().
* Minor cleanup, moved copy_address(), and fill_route_entry() into the
private part of the file.


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


# 5d27657bfd91dd9d41052e45397d5cb68879c0fc 16-Mar-2008 Bruno G. Albuquerque <bga@bug-br.org.br>

- Fix building with TRACE enabled.



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


# 3c7287cce1b4c74a167840a78cd53f6394d23ad8 03-Nov-2007 Hugo Santos <hugosantos@nowhere.fake>

r10168@haiku-devel: hugo | 2007-11-03 12:35:29 +0100
find_route() is not really IPv4 specific.


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


# 9004a5643771d7f501c21016faf25e65e1809cbe 25-Oct-2007 Axel Dörfler <axeld@pinc-software.de>

* Made some functions static that should have been.
* Added a commented out dump_routes() function for debugging purposes.
* Removed weird spaces, fixed indentation.


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


# 79a0d25245275ef5f65afd610279dc9befffd65e 22-May-2007 Hugo Santos <hugosantos@nowhere.fake>

net_buffer: preparing for better metadata management


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


# 6c35350908905903b5c150154b0da9698ca8943a 11-Apr-2007 Hugo Santos <hugosantos@nowhere.fake>

moved address selection logic to a new 'get_buffer_route'.

- IPv4 now assumes the addresses it is supplied in send_routed_data are already the appropriate ones.
- made the Data(), operator* and operator-> methods in NetBufferFieldReader const so we can use them in the same expression as the constructor.
- fixed an issue with UDP where the wrong source address could be used in the calculating the checksum.
- changed ipv4_print_address to use the more common 0.0.0.0 format.


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


# fb300cfd25fe641020485e7b21a0be2580b6479d 07-Apr-2007 Hugo Santos <hugosantos@nowhere.fake>

introduced net_device_interface level locking.


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


# c64fecca780b8dcf6ce2cb5994977a79e14ce936 06-Apr-2007 Hugo Santos <hugosantos@nowhere.fake>

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


# 5333836f716469d6c2078a08a2aa9d98ff525b11 01-Apr-2007 Hugo Santos <hugosantos@nowhere.fake>

use generic UserBuffer in fill_route_entry


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


# b6d25ffbd26dae9b72d3daba6f25d79bfe41a7b6 31-Mar-2007 Axel Dörfler <axeld@pinc-software.de>

Missed an improvement Hugo sent me a bit later.


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


# 2d55afcdf7379a36f3eb63515ef347139949565d 31-Mar-2007 Axel Dörfler <axeld@pinc-software.de>

Support getting route information for a specific destination
using SIOCGETRT. Patch by Hugo Santos.


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


# af3a31f770fcd8b7e8c5171342cba155bef6dc9e 01-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

Calmed down the networking stack a lot - since it basically works, there is no
reason to slow it down with debug output that much; this will also help investigating
some issues where you just aren't interested in most of the output.


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


# d1d0d5c6f72955ef25d2b65cf8f2bf2570ae2127 19-Oct-2006 Axel Dörfler <axeld@pinc-software.de>

There can only be one default route per interface - so match anything if
RTF_DEFAULT is set in the query.


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


# 891a127fecd553cc2168db11ccc564f5ba38fad6 17-Sep-2006 Marcus Overhagen <marcusoverhagen@gmail.com>

various gcc 4 related build fixes


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