Re: pessimistic NetworkManager and off-line mode
- From: Roy Marples <roy marples name>
- To: "Herriot, Nicholas, VF-Group" <Nicholas Herriot vodafone com>
- Cc: networkmanager-list gnome org
- Subject: Re: pessimistic NetworkManager and off-line mode
- Date: Thu, 07 May 2009 21:06:22 +0100
Herriot, Nicholas, VF-Group wrote:
> Having read this post I feel I have to add my bit in to the mix!
Allow me to add my bit too :)
I write dhcpcd [1], a DHCP client.
NM-0.7 supports dhcpcd-4, upwards.
dhcpcd-5 does a lot that NM does as well, but this is not a nyah nyah
mines better than yours post. However, what it does is relevant to this
discussion.
> There seems to be two methodologies around this:
>
> 1) You may have more than one connection manager (e.g. A Network Manager
> and a Modem Manger). Applications that run and require network
> connectivity would maybe ask Network Manager via D-Bus have you got a
> connection. If the answer is no, they move on to the Modem Manager and
> do the same thing. I'd like to hear peoples opinions on this?
>
> 2) Network manager has a way to pass connectivity information to it.
> (e.g. An API for an app to send info about a connection to Network
> Manager. Hence a Modem Manager could say "I've made a connection, here
> are the details about this connection."). Network manager would then be
> the global manager of the connection and still be the single point of
> contact for apps to talk to when discovering connections on the system.
> As before I'd like to here peoples opinions on this.
I would suggest a third way :)
dhcpcd-5 only configures the protocol - address, routing and any on disk
configuration required. It does not know anything about the link beyond
a few flags. This is by design. As dhcpcd doesn't know about PPP it
instead listens to the kernel for RTM_NEWADDR messages and reacts
accordingly.
So NM doesn't have to know about every type of link or modem manager in
existence - just listen to kernel messages that have been around for
years now. Yes, it won't know anything other than it's got an address,
but that should be enough for online/offline.
Lastly, I have a question, but this is a generic DBus one really.
As I said earlier, dhcpcd has NM functionality. dhcpcd-dbus [2] also
exists so that this information can be sent around in the current IPC
flavour and dhcpcd-gtk [3] listens to it and has a fancy online/offline
icon. So taking this as a given, can we have a generic, non NM specific,
non dhcpcd specific dbus interface for applications to use that provides
1) overall network status - online/offline/carrier (query and signal)
2) enumerate all network interfaces with an address (query)
3) signal address addition/removal on interfaces
I think that's more than enough info for an application to work out if
it's "online" or not.
And if this is possible, how do two installed applications "own" it?
I think we can assume only one is running at a given time - running
dhcpcd-5 as a full daemon AND NM is kinda silly and pointless :)
Thanks
Roy
[1] http://roy.marples.name/projects/dhcpcd
[2] http://roy.marples.name/projects/dhcpcd-dbus
[3] http://roy.marples.name/projects/dhcpcd-ui
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]