History log of /haiku/src/servers/net/AutoconfigLooper.cpp
Revision Date Author Comments
# a9abcc37 01-Apr-2013 Michael Lotz <mmlr@mlotz.ch>

Rework initial auto joining and add big TODOs.

* If we have a configured network, then we always try to connect to it
as soon as the interface has been brought up.
* If we don't have a configured network and are auto configuring, we
use the AutoconfigLooper to also do initial auto joins.
* Before issuing auto joins we need to wait for scan results to come
in, so we watch for corresponding messages.

For now auto joining is a one shot attempt as the infrastructure to
properly tell reasons for scans apart is not yet there.


# e484cc50 01-Apr-2013 Michael Lotz <mmlr@mlotz.ch>

Store the active flag if there is an initial link.

This ensures that we don't spuriously re-detect a link if we have a
race between starting to watch for link state changes and detecting the
initial link.


# 274b8be6 01-Apr-2013 Michael Lotz <mmlr@mlotz.ch>

Don't try to auto-configure network interfaces with no link.

We already start watching for link state changes, so as soon as a link
is established the configuration will be triggered.


# 56981da0 11-Apr-2012 Rene Gollent <anevilyak@gmail.com>

Fix slight oversight in previous commit.

Only trigger autoconfiguration if the link status changed from down
to up.


# 9cac658a 11-Apr-2012 Rene Gollent <anevilyak@gmail.com>

Keep more accurate track of media status changes.

AutoConfigLooper now remembers the last media state it received from the device,
and compares both to see if the active state actually changed. Should help with
quality changes where the link didn't actually drop. May also help on ethernet
if the chipset sends spurious link status change notifications.


# dd7f08b5 07-Feb-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

NetServer: Add IPv6 link local address to each nic on boot

* Remove old ioctl code, cleanup AutoLooper.
* Move link local code into NetServer
AutoLooper should only be used for things that
count as "auto-configuration" such as DHCP, router
advertisements, and DHCPv6
* Properly form IPv6 link local address from MAC address
* I think some IPv6 routes are needed still for proper
local link connectivity.
* Duplicate Address Detection is still a TODO
* Style cleanup


# 8a9d5e34 28-Apr-2011 Rene Gollent <anevilyak@gmail.com>

Patch by Atis Elsts from GSoC 2010 that was overlooked.
- Adds IPv6 fragmentation support and some partial work to enable configuration of IPv6 in net_server. Not currently in the build.



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


# 0892800f 27-Apr-2011 Philippe Houdoin <philippe.houdoin@gmail.com>

Implemented INIT-REBOOT DHCP state: as required per DHCP specs,
we now request the last address we got from DHCP server, and only on failure
we fallback on the whole INIT state (discover, collect offer, etc).
This should fix people losing their IP address at each renewal, or far worse,
after the link goes up again.
Closed #7346.


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


# e65843e8 22-Apr-2011 Philippe Houdoin <philippe.houdoin@gmail.com>

Revert files that were commit by mistake in previous commit. Sorry.


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


# 9ff5266f 22-Apr-2011 Philippe Houdoin <philippe.houdoin@gmail.com>

Avoid deadlock.


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


# af074561 23-Nov-2010 Axel Dörfler <axeld@pinc-software.de>

* Now uses the new network API instead of directly using socket ioctls.
This makes the code much cleaner and simpler.
* Completely untested, though (will do that next).


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


# 65cae88f 16-Feb-2009 Michael Lotz <mmlr@mlotz.ch>

Fix the build.

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


# 1a905a76 16-Feb-2009 Axel Dörfler <axeld@pinc-software.de>

* The auto-config looper now correctly sets the IFF_CONFIGURING flag - it
cannot be set in the AF_LINK level.
* It now also checks for this flag, so that the fallback configuration won't
overwrite a manually configured interface anymore.
* When an interface is configured, the IFF_CONFIGURING flag is now cleared as
it should.


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


# 293ed4fe 27-Dec-2008 Axel Dörfler <axeld@pinc-software.de>

* Pulled an AutoconfigClient class out of DHCPClient - all clients are supposed
to inherit from that one (there is still just a single client, though, this
just simplifies having a generic mechanism to register and use auto-config
clients).
* AutoconfigLooper now listens to link changes, and will reconfigure the
interface if a new link is there - this even seems to work in emulation, will
test on real hardware next.


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


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

- Changed default address for failed DHCP requests from 192.168.0.x to
169.254.0.x, as this is the IANA reserved address for default
configuration.



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


# f01106c3 11-Apr-2007 Axel Dörfler <axeld@pinc-software.de>

* Moved the network status replicant into its own application, similar to what
ProcessController and PowerStatus are doing.
* Currently polls for info only - later, the stack should support listeners for
interface related changes.
* Also works under BONE (although it doesn't make much sense to use it there).


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


# 37c50abf 02-Apr-2007 Hugo Santos <hugosantos@nowhere.fake>

net_server: initial replicant version.

* Still picture-less and thus ugly.
* It provides updated information on what the net_server is doing in terms of interface configuration.
* It is also able to show simplistic address information for configured interfaces.


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


# 6cc7630f 12-Dec-2006 Axel Dörfler <axeld@pinc-software.de>

* Implemented lease time renewal.
* The DHCPClient is now added to its looper before doing the negotiation, so that
it's BMessenger is already valid.


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


# f9af6566 11-Dec-2006 Axel Dörfler <axeld@pinc-software.de>

* Work-in-progress of DHCP - the interface should now be correctly configured.
* Lease times are currently ignored, though.


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


# fb81684f 06-Dec-2006 Axel Dörfler <axeld@pinc-software.de>

The beginnings of automatic configuration of network devices using DHCP; this is
currently only triggered when there is no configuration file - it can't be configured
this way yet.
All DHCP currently does is to send a UDP broadcast DHCP discover message. More to come.


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


# a9abcc37cdc361a6cd3b35e8791e9603d793c424 01-Apr-2013 Michael Lotz <mmlr@mlotz.ch>

Rework initial auto joining and add big TODOs.

* If we have a configured network, then we always try to connect to it
as soon as the interface has been brought up.
* If we don't have a configured network and are auto configuring, we
use the AutoconfigLooper to also do initial auto joins.
* Before issuing auto joins we need to wait for scan results to come
in, so we watch for corresponding messages.

For now auto joining is a one shot attempt as the infrastructure to
properly tell reasons for scans apart is not yet there.


# e484cc509885ab02ddd4dd99e277b745ffa61b28 01-Apr-2013 Michael Lotz <mmlr@mlotz.ch>

Store the active flag if there is an initial link.

This ensures that we don't spuriously re-detect a link if we have a
race between starting to watch for link state changes and detecting the
initial link.


# 274b8be6c415dfb623f95ca9e4709c9f79836ae9 01-Apr-2013 Michael Lotz <mmlr@mlotz.ch>

Don't try to auto-configure network interfaces with no link.

We already start watching for link state changes, so as soon as a link
is established the configuration will be triggered.


# 56981da0080fdc4ad0ffefd0e6e5773f2ce3f0f5 11-Apr-2012 Rene Gollent <anevilyak@gmail.com>

Fix slight oversight in previous commit.

Only trigger autoconfiguration if the link status changed from down
to up.


# 9cac658a9fb6d9f6304abb5c99941ec336510159 11-Apr-2012 Rene Gollent <anevilyak@gmail.com>

Keep more accurate track of media status changes.

AutoConfigLooper now remembers the last media state it received from the device,
and compares both to see if the active state actually changed. Should help with
quality changes where the link didn't actually drop. May also help on ethernet
if the chipset sends spurious link status change notifications.


# dd7f08b519348fc0fb96ec52f841cd09e40da8b8 07-Feb-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

NetServer: Add IPv6 link local address to each nic on boot

* Remove old ioctl code, cleanup AutoLooper.
* Move link local code into NetServer
AutoLooper should only be used for things that
count as "auto-configuration" such as DHCP, router
advertisements, and DHCPv6
* Properly form IPv6 link local address from MAC address
* I think some IPv6 routes are needed still for proper
local link connectivity.
* Duplicate Address Detection is still a TODO
* Style cleanup


# 8a9d5e34febe5626f9037b6eba9eb3acd4ca0f49 28-Apr-2011 Rene Gollent <anevilyak@gmail.com>

Patch by Atis Elsts from GSoC 2010 that was overlooked.
- Adds IPv6 fragmentation support and some partial work to enable configuration of IPv6 in net_server. Not currently in the build.



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


# 0892800f69bcfb0478aeeeb12171d998d2a315af 27-Apr-2011 Philippe Houdoin <philippe.houdoin@gmail.com>

Implemented INIT-REBOOT DHCP state: as required per DHCP specs,
we now request the last address we got from DHCP server, and only on failure
we fallback on the whole INIT state (discover, collect offer, etc).
This should fix people losing their IP address at each renewal, or far worse,
after the link goes up again.
Closed #7346.


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


# e65843e8c981b8537e1c0dd1d20c09c6404e5dfb 22-Apr-2011 Philippe Houdoin <philippe.houdoin@gmail.com>

Revert files that were commit by mistake in previous commit. Sorry.


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


# 9ff5266f3a21c5a8983c4cfacf2442edf3e4f740 22-Apr-2011 Philippe Houdoin <philippe.houdoin@gmail.com>

Avoid deadlock.


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


# af0745618fc4fca86016d858e5ba9dc64dab16ea 23-Nov-2010 Axel Dörfler <axeld@pinc-software.de>

* Now uses the new network API instead of directly using socket ioctls.
This makes the code much cleaner and simpler.
* Completely untested, though (will do that next).


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


# 65cae88fb50f41863e82dc599c52c4b9174af78d 16-Feb-2009 Michael Lotz <mmlr@mlotz.ch>

Fix the build.

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


# 1a905a762aa791f366d5381ab8fed94bb99c1ea9 16-Feb-2009 Axel Dörfler <axeld@pinc-software.de>

* The auto-config looper now correctly sets the IFF_CONFIGURING flag - it
cannot be set in the AF_LINK level.
* It now also checks for this flag, so that the fallback configuration won't
overwrite a manually configured interface anymore.
* When an interface is configured, the IFF_CONFIGURING flag is now cleared as
it should.


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


# 293ed4fe5b1e467f2008fa2c0df5c339c989c00d 27-Dec-2008 Axel Dörfler <axeld@pinc-software.de>

* Pulled an AutoconfigClient class out of DHCPClient - all clients are supposed
to inherit from that one (there is still just a single client, though, this
just simplifies having a generic mechanism to register and use auto-config
clients).
* AutoconfigLooper now listens to link changes, and will reconfigure the
interface if a new link is there - this even seems to work in emulation, will
test on real hardware next.


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


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

- Changed default address for failed DHCP requests from 192.168.0.x to
169.254.0.x, as this is the IANA reserved address for default
configuration.



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


# f01106c3cfc01f5706583d75c6d75d3b7cd98b77 11-Apr-2007 Axel Dörfler <axeld@pinc-software.de>

* Moved the network status replicant into its own application, similar to what
ProcessController and PowerStatus are doing.
* Currently polls for info only - later, the stack should support listeners for
interface related changes.
* Also works under BONE (although it doesn't make much sense to use it there).


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


# 37c50abfaf936ab1b604a6566b04901a2789ad33 02-Apr-2007 Hugo Santos <hugosantos@nowhere.fake>

net_server: initial replicant version.

* Still picture-less and thus ugly.
* It provides updated information on what the net_server is doing in terms of interface configuration.
* It is also able to show simplistic address information for configured interfaces.


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


# 6cc7630f36e2801c9cfb04571e07431f0d4c1149 12-Dec-2006 Axel Dörfler <axeld@pinc-software.de>

* Implemented lease time renewal.
* The DHCPClient is now added to its looper before doing the negotiation, so that
it's BMessenger is already valid.


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


# f9af65667d67cd6f0a9a0cae09f7071268dbde16 11-Dec-2006 Axel Dörfler <axeld@pinc-software.de>

* Work-in-progress of DHCP - the interface should now be correctly configured.
* Lease times are currently ignored, though.


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


# fb81684f819c432b2cdc30db597e08ccd88b5a25 06-Dec-2006 Axel Dörfler <axeld@pinc-software.de>

The beginnings of automatic configuration of network devices using DHCP; this is
currently only triggered when there is no configuration file - it can't be configured
this way yet.
All DHCP currently does is to send a UDP broadcast DHCP discover message. More to come.


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