Commit graph

369 commits

Author SHA1 Message Date
Gary Ching-Pang Lin 5e3e19d02b wifi: add on-demand WiFi scan support
A new D-Bus method was added to invoke the on-demand WiFi scan.
2012-06-07 15:06:48 -05:00
Dan Winship 960c1ae8ff vpn: support IPv6 over VPNs
Add new API to allow passing both IPv4 and IPv6 configuration
information from VPN plugins to the backend.

Now instead of a single Ip4Config, a plugin has Config, Ip4Config, and
Ip6Config. "Config" contains information which is neither IPv4 nor
IPv6 specific, and also indicates which of Ip4Config and Ip6Config are
present. Ip4Config now only contains the IPv4-specific bits of
configuration.

There is backward compatibility in both directions: if the daemon is
new and the VPN plugin is old, then NM will notice that the plugin
emitted the Ip4Config signal without having emitted the Config signal
first, and so will assume that it is IPv4-only, and that the generic
bits of configuration have been included with the Ip4Config. If the
daemon is old and the plugin is new, then NMVPNPlugin will copy the
values from the generic config into the IPv4 config as well. (In fact,
NMVPNPlugin *always* does this, because it's harmless, and it's easier
than actually checking the daemon version.)

Currently the VPN is still configured all-at-once, after both IPv4 and
IPv6 information has been received, but the APIs allow for the
possibility of configuring them one at a time in the future.
2012-05-30 14:24:46 -04:00
Jiří Klimeš 6d9338f2c6 core: add "Autoconnect" property to NMDevice
It is bound to autoconnect_inhibit private variable (has opposite meaning).
While 'Autoconnect' is TRUE (default value) the device can automatically
activate a connection. If it is changed to FALSE, the device will not
auto-activate until 'Autoconnect' is TRUE again.
Disconnect() method sets 'Autoconnect' to FALSE. NMPolicy monitors the property
and schedules auto activation when FALSE->TRUE transition is made.
2012-05-22 17:11:44 +02:00
Pantelis Koukousoulas d125296eb1 adsl: initial PPPoE support for ADSL devices 2012-05-18 15:42:56 -05:00
Pantelis Koukousoulas 0e6f5ce38e adsl: settings and initial "scaffolding"
This patch adds the settings code (NMSettingAdsl) and the initial
"scaffolding" i.e., a tiny stub version of NMDeviceAdsl and the
udev handler code to get the device detected.

With this patch you should be able to see an atm device being detected
by networkmanager in the logs, although of course it doesn't
do anything useful yet.

Extract from the logs:

 [1304668252.341354] [nm-udev-manager.c:562] adsl_add(): adsl_add: ATM Device detected from udev. Adding ..
(ueagle-atm0): failed to look up interface index
(ueagle-atm0): new ADSL device (driver: 'ueagle-atm' ifindex: -1)
(ueagle-atm0): exported as /org/freedesktop/NetworkManager/Devices/2
(ueagle-atm0): now managed
(ueagle-atm0): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
(ueagle-atm0): deactivating device (reason: 2).
 [1304668252.345102] [nm-system.c:1349] flush_routes(): (ueagle-atm0) failed to lookup interface index
 [1304668252.347821] [nm-device.c:3912] nm_device_state_changed(): (ueagle-atm0): device is available,

In this version, we hack the nm-device.c:nm_device_get_priority() to get better priority
instead of changing the DeviceType enum.

Signed-off-by: Pantelis Koukousoulas <pktoss@gmail.com>
2012-05-18 15:42:55 -05:00
Dan Winship 49214066a4 Fix capitalization of "InfiniBand"
"InfiniBand" has a capital "B". Fix that everywhere it's being used as
a human-readable string.

In particular, the RH initscripts recognize "TYPE=infiniband" and
"TYPE=InfiniBand", but not "TYPE=Infiniband", which is what we were
writing before.
2012-03-06 13:23:29 -05:00
Dan Williams 33d0cff3e4 core: use active connection dependency master instead of manually setting it
We already have the master device kept in the active connection, so
we can just use that instead of having the Policy determine and set
it manually.  This also should allow slaves to auto-activate their
master connections if the master is able to activate.
2012-03-01 17:40:18 -06:00
Dan Williams db94e37eb5 core: wait for dependencies before continuing with device activation
Before jumping to activation stage 1, make sure dependencies are activated.
2012-03-01 17:40:17 -06:00
Dan Williams 65a13f9d8a core: convert VLAN interfaces to a device subclass
Many different interface types can support VLANs, including
Infiniband, WiFi, etc.  So we have to create a new device class
for them instead of keeping the support in NMDeviceEthernet.
2012-03-01 17:40:17 -06:00
Dan Williams 0c61a51614 bond: move bond master interfaces to NMDeviceBond
This way clients know it's a bond master, and it allows us to more
cleanly separate the code for bonding and non-bonding cases.
2012-02-16 15:20:50 -06:00
Dan Williams cd2603c713 api: fix various Infiniband introspection XML omissions 2012-02-15 17:32:41 -06:00
Dan Winship ec35d47253 introspection: add missing error description for INFINIBAND_MODE 2012-02-02 12:02:11 -06:00
Thomas Bechtold 775ec828b9 core: add device property "StateReason"
Allows clients to retrieve the reason a device changed to
the given state along with the state itself, preventing
race conditions if the state were retrieved separately
from the reason.  Reason codes were not previously
accessible without listening to the StateChanged signal.
2012-02-02 12:02:11 -06:00
Thomas Bechtold fe5392ccd9 core: add missing device state reasons
Some NMDeviceStateReason 's are not available in
introspection/nm-device.xml

Tom
2012-01-25 11:26:57 -06:00
Thomas Graf 1ba50e2f1b bonding: export path of master device property over DBUS
Adds a new "master" property to NMActiveConnection containing the path
of the master NMDevice if the connection has a master.

Signed-off-by: Thomas Graf <tgraf@redhat.com>
2012-01-25 11:12:43 -06:00
Dan Winship 5366c3d6d4 wired: split NMDeviceWired out of NMDeviceEthernet and add NMDeviceInfiniband 2011-12-02 13:09:16 -06:00
Dan Williams 49dc2068ed docs: add Secret Agent API bits to HTML spec 2011-09-06 17:31:27 -05:00
Dan Williams 6c901ab040 api: update version based on configure version
Instead of manually which is error-prone.
2011-08-06 11:19:33 +02:00
Dan Williams 310880a104 api: fix up node names
Not sure if it really makes a difference, but...
2011-08-06 10:46:21 +02:00
Dan Williams 220fb52621 api: update documentation about secret agents and SaveSecrets() 2011-07-01 15:38:38 -05:00
Dan Williams 459e7b9518 api/core: add ActiveConnection property to device objects
Enables easier traversal of the object hierarchy; if a client is
watching signals on a device they can easily get back to the
parent NMActiveConnection object to grab connection details or
status.
2011-05-26 19:19:32 -05:00
Dan Williams e56f0ea18f api: update some documentation for Connection.Active 2011-05-26 19:19:32 -05:00
Dan Williams 9ee83c18aa api: clarify usage of SetLogging 2011-05-04 17:22:05 -05:00
Dan Williams 8cce42f2a5 core: add GetDeviceByIpIface method
Allow clients to get a device by its IP interface name instead
of having to get the device list and iterate through each one,
and read the interface name to get what they want.
2011-04-22 12:29:07 -05:00
Dan Williams 4cae0bb0fa settings: add a GetConnectionByUuid method
If the client knows the UUID, add a convenience function to get
the connection path directly, instead of having to iterate the
whole connection list and get each connection's details and then
check the UUID.
2011-04-22 12:29:07 -05:00
Dan Williams bb8e9a0b18 api: add "Uuid" property to ActiveConnection interface
A convenience so that clients which might key certain operations off
which connections are active (checking work mail only when on VPN for
example) can more easily get which connections are active.  This would
allow those apps to store the UUID (which they would already be doing)
and not have to create a Connection proxy and then get the connection
properties just to retrieve the UUID of the connection.  Instead they
can now get it from GetAll of the ActiveConnection object, which they
would already be doing.
2011-04-22 12:29:07 -05:00
Dan Williams aeb02e457a api: clarify meaning of 'hints' property in Agent interface
At some point we'll be passing other info like whether we need
the 802.1x identity too, or unknown CA certificate data for the
Agent to accept, etc.  Basically state that instead of only
hints from the setting, we can pass other stuff as well.
2011-04-19 12:57:49 -05:00
Dan Williams 6f49afaea0 api: remove unused CDMA and GSM introspection files 2011-03-21 16:48:15 -05:00
Dan Williams 1701df4b75 core: add active connection state DEACTIVATING
Not used yet, but will be when device deactivating state gets
used.  Should be 100% backwards compatible with users that don't
know about it for now.
2011-03-17 14:23:21 -05:00
Dan Williams 1c3a67aaa5 api: clarify function and usage of the Device.Udi property 2011-03-15 12:56:19 -05:00
Dan Williams c74dd8b0b7 api: fix mistakenly absent Dhcp6Config device property
It was still on the bus, but not in the introspection for some
reason.
2011-03-10 09:53:07 -06:00
Dan Williams 62ad893a4a core: bring the state() D-Bus method back
It's a lot easier for app developers to use.
2011-03-08 12:57:35 -06:00
Dan Williams 0def159d1f trivial: whitespace fix 2011-03-04 12:51:05 -06:00
Dan Williams 69f2c75956 api: fix up introspection and header documentation for modem consolidation 2011-03-03 20:16:16 -06:00
Dan Williams b44b1747fa api: document more VPN connection failure codes (bgo #643324) 2011-02-25 14:00:01 -06:00
Dan Williams 2140dad5e0 core: consolidate mobile broadband device types
These days more and more devices are showing up that support a
number of different access technology families in the same hardware,
like Qualcomm Gobi (CDMA and GSM), Pantech UM190 (CDMA and GSM),
Pantech UML290 (CDMA and LTE), LG VL600 (CDMA and LTE), Sierra
320U (GSM and LTE), etc.  The previous scheme of having device
classes based on access technology family simply cannot handle
this hardware and attempting to add LTE to both the CDMA and GSM
device classes would result in a bunch of code duplication that
we don't want.  There's a better way...

Instead, combine both CDMA and GSM device classes into a generic
"Modem" device class that provides capabilities indicating what
access technology families a modem supports, and what families
it supports immediately without a firmware reload.  (Gobi devices
for example require a firmware reload before they can switch
between GSM and CDMA).  This provides the necessary flexibility
to the client and allows us to keep the API stable when the
same consolidation change is made in ModemManager.

The current code doesn't yet allow multi-mode operation internally,
but the API is now what we want it to be and won't need to be
changed.
2011-02-25 10:16:17 -06:00
Dan Williams c5cc53a557 core: add new SECONDARIES device state for dependent connections
Will be used for things like activating a VPN connection before
signaling that the device is activated, or maybe for bridges and
bonds, to ensure that applications don't think the system has
connectivity before everything is set up.
2011-02-23 10:25:49 -06:00
Dan Williams ec115ed442 api: add additional NM daemon states
DISCONNECTING: the only active network connection is now being disconnected
LOCAL, SITE, GLOBAL: one-stop items for level of connectivity, which
we'll use to show when we think we're actually connected to the internet
or behind a captive portal or something
2011-02-14 17:55:27 -06:00
Dan Williams a661f78890 api: remove deprecated methods and signals
sleep, wake, StateChange, all deprecated in 0.8, are now removed.

sleep & wake are replaced with the Sleep() method, while
StateChange is replaced with the StateChanged signal which has
the same arguments.
2011-02-14 17:33:16 -06:00
Dan Williams 85e87bd509 api: update version and copyright info 2011-02-14 17:32:35 -06:00
Dan Williams 7971227011 api: add two more device states (IP_CHECK and DEACTIVATING)
We'll use IP_CHECK for detecting whether we're behind a captive
portal or on a network that does not have access to the Internet.
We'll probably run some variety of plugins during this stage to
help detect this, and possibly handle it for us (auto-login to
captive portal for example).

DEACTIVATING will be used for tearing down network shares or
cleanly closing network sessions when we're able to clean up
an activation.  ie, "pre-down" for Debian.
2011-02-14 17:09:36 -06:00
Dan Williams 915dd85d23 api: update device types to match NetworkManager.h 2011-02-14 16:37:50 -06:00
Dan Williams 0ba142690a build: make sure nm-secret-agent.xml gets into the tarball 2011-02-02 21:39:03 -06:00
Dan Williams 77239854f4 agents: send system-owned secrets to the agent if it has 'modify' permission
If we can authenticate the agent for 'modify' permission, then send
any existing system secrets to it as the user has permission to change
those secrets.  This means the agent doesn't have to call GetSecrets()
itself, which means simpler code on the agent side for a slight LoC
hit in NM itself.

This also moves the permissions checking into the NMAgentManager to
check each agent, which is sub-optimal since now the agent manager
has to do PolicyKit stuff, but hey that's life.  Agents need secrets,
and we do need to authenticate every agent before we send secrets to
them, and the NMSettingsConnection doesn't know about individual
agents at all.
2011-02-02 16:19:15 -06:00
Dan Williams 570c0eb2df settings: implement deleting secrets from agents when connection is deleted 2011-01-31 23:33:46 -06:00
Dan Williams b3959aefa3 core: rename NMSysconfigConnection -> NMSettingsConnection 2011-01-26 11:38:12 -06:00
Dan Williams d1979ba63e secrets: simplify GetSecrets call flow
The Settings.Connection interface is now only provided by NetworkManager
itself since there is only one settings service.  NM can validate
requests for secrets internally and thus there's no need to lock down
GetSecrets using a separate D-Bus interface, since PolicyKit provides
that functionality on systems where this is desirable (ie multi-user).
Single-user systems that do not have PolicyKit will inherently trust
the user already, or if not D-Bus auth is flexible enough to lock
down the GetSecrets method individually even if it's not on a separate
D-Bus interface.

Second, since only clients like connection editors or applets will be
calling the GetSecrets method, there's no need for 'hints' or
'request_new' arguments here since this  method should never trigger
an interactive secrets request.  Only NM should send those requests
when it knows it needs to ask the user, either during connection or
after validating the incoming GetSecrets request.  A connection editor
type application should never be able to trigger the normal
"What's your passphrase" dialog thats provided by the secret agent
for that user's session.
2011-01-26 10:17:07 -06:00
Dan Williams b7259fd2a8 Merge remote branch 'origin/master' into rm-userset 2011-01-25 15:41:03 -06:00
Dan Williams bc6fc7b910 vpn: fix VPN active connection D-Bus API handling (bgo #569294)
Due to limitations in dbus-glib, where one GObject cannot have more
than one introspection XML object attached to it, we used to include
more than one <interface> in the VPNConnection object introspection
XML.  This was suboptimal for two reasons:

1) it duplicated the Connection.Active introspection XML which
made it harder for clients to use the introspection data in a
dynamic fashion, besides looking ugly in the docs

2) not many other programs use this feature of dbus-glib, which
means it didn't get a lot of testing, and broke, which sucks
for NM.

To fix this issue, create a base class for NMVpnConnection that
handles the Connection.Active API, and make NMVpnConnection itself
handle just the VPN pieces that it layers on top.  This  makes
dbus-glib happy because we aren't using two <interface> blocks
in the same introspection XML, and it makes the NM code more
robust because we can re-use the existing Connection.Active
introspection XML in the NMVpnConnectionBase class.
2011-01-25 12:41:03 -06:00
Dan Williams 9cf13cc3e1 agent: request_new -> flags
Use some flags to modify GetSecrets behavior instead of just the
request_new boolean.
2011-01-18 14:17:18 -06:00
Dan Williams a2f36e8bd4 agent: add CancelGetSecrets D-Bus API
Allows NM to signal to an agent that an in-progress secrets
request is no longer needed.  This could happen if the device
for which the request was started was removed, disabled, or the
network being connected to changed, or whatever.
2011-01-18 13:19:29 -06:00
Dan Williams acd16ceeed api: fix argument direction for SecretAgent API calls 2011-01-13 14:08:36 -06:00
Dan Williams f9ceafd4a1 Merge remote branch 'origin/master' into rm-userset 2011-01-12 15:46:37 -06:00
Dan Williams 063859ba66 libnm-glib: add nm_client_add_and_activate_connection() 2011-01-12 00:39:34 -06:00
Dan Williams 215306f5a1 core: add AddAndActivate D-Bus method
Given connection details, complete the connection as well as possible
using the given specific object and device, add it to system
settings, and activate it all in one method.
2011-01-10 23:39:12 -06:00
Dan Williams 9d24269e30 wimax: add Center Frequency, RSSI, CINR, TX Power, and BSID properties
Useful diagnostic/support info when device is connected.
2011-01-06 15:18:19 -06:00
Dan Williams 9e80c1e85d wimax: make WiMAX mostly work
Heavily modify Inaky's Intel WiMAX SDK glue (originally from connman)
to be more generic and more thread-safe, and suitable for use with
NetworkManager instead of rolling our own client code.  Rewrite the
NMDeviceWimax code to mostly work.

Still to be done: actual connection logic, DHCP handling, spawning
wimaxd if it's not started yet
2011-01-03 23:55:38 -06:00
Dan Williams 0587ef1179 Merge remote branch 'origin/master' into wimax 2011-01-02 17:24:23 -06:00
Dan Williams 1496f8056f libnm-glib: add secret agent base class 2010-12-14 00:03:22 -06:00
Dan Williams a30cf19858 agent: add agent manager and minimal agent class 2010-12-10 12:38:19 -06:00
Dan Williams 9d077444a9 settings: remove settings dict from connection 'updated' signal
New connections should not be pushed out in the Updated signal
because signals cannot be restricted to particular clients, and
some clients may not have permission to view the connection.

Upon receiving the Updated signal, clients should re-read the
connection using GetSettings to ensure that the client still
has permissions to view the connection, and to get the updated
settings.
2010-12-02 14:34:38 -06:00
Dan Williams 37845af954 settings: return new connection object path from AddConnection
Finally.
2010-10-29 14:34:33 -05:00
Dan Williams e5adfcbabe settings: remove remnants of unused CheckPermissions signal 2010-10-26 11:40:43 -05:00
Dan Williams 8b41f70dd5 Merge remote branch 'origin/master' into rm-userset 2010-09-27 10:30:46 -05:00
Jiří Klimeš facf6b176f core: add Version property to org.freedesktop.NetworkManager interface 2010-09-27 10:34:56 +02:00
Dan Williams 3945f75bda core: consolidate all permissions checking into main D-Bus interface
Moves the system settings permissions checking into the core service's
permissions checking, which at the same time enables 3-way permission
reporting (yes, no, auth) instead of the old yes/no that we had for
system settings permissions before.  This allows UI to show a lock
icon or such when the user could authenticate to gain the permission.

It also moves the wifi-create permissions' namespace to the main
namespace (not .settings) since they really should be checked before
starting a shared wifi connection, rather than having anything to do
with the settings service.
2010-08-26 14:26:12 -05:00
Daniel Gnoutcheff 6ebc201636 WIP: NMSysconfig: enforce access controls 2010-08-15 03:25:58 -04:00
Daniel Gnoutcheff f98e2528a6 NetworkMangerSettings -> NetworkManager.Settings
Just for consistency, make settings related stuff live under the
org.freedesktop.NetworkManager namespace, rather than its own
org.freedesktop.NetworkManagerSettings namespace. Renames are done for
DBus interface names, DBus object paths, and polkit actions.
2010-08-07 01:19:46 -04:00
Daniel Gnoutcheff aee48901f4 Merged NM{Exported,Sysconfig}Connection
In continuation of the theme, the removal of user settings services
means that the distinction between NMSysconfigConnection and
NMExportedConnection is no longer needed. Merge NMExportedConnection
into NMSysconfigConnection.
2010-08-06 13:05:46 -04:00
Daniel Gnoutcheff da6816a03b nm-glib/DBus: merge nm-settings{,-system} iface
Much as with nm-remote-settings and nm-remote-settings-system, the
removal of user settings services means there is no more need for
separate interfaces for user and system settings services.

In libnm-glib, this commit merges everything in
nm-settings-system-interface into nm-settings-interface.  Alongside with
that, we merge everything in the
org.freedesktop.NetworkManagerSettings.System DBus interface into
org.freedesktop.NetworkManagerSettings.
2010-08-06 13:05:46 -04:00
Daniel Gnoutcheff d503c09466 DBus API: removing user settings support
Remove bits from the external DBus API that were once needed for user
settings support.
2010-08-06 13:05:46 -04:00
Dan Williams 664ccd4464 Revert "core: fix compilation on glib < 2.23.4"
This reverts commit 8a1fe31b31.

This commit was not intended to be pushed, as it's not ready yet
and isn't even my commit (thus attribution is wrong).
2010-07-12 18:20:09 -07:00
Dan Williams 8a1fe31b31 core: fix compilation on glib < 2.23.4
Where G_FILE_MONITOR_EVENT_MOVED isn't defined yet.
2010-07-02 10:42:32 -07:00
Jiří Klimeš 1b49f941a6 core: MAC address spoofing/cloning (rh #447827) (bgo #553771)
This commit implements MAC cloning feature in NetworkManager. To support that,
'PermHwAddress' property is added into *.Device.Wired and *.Device.Wireless
interfaces. The permanent MAC address is obtained when creating the device, and
is used for 'locking' connections to the device. If a cloned MAC is specified
in connection to be activated, the MAC is set to the interface in stage1. While
disconecting, the permanent MAC is set back to the interface.
2010-06-22 14:21:25 +02:00
Dan Williams 763f2f1d01 core: expose device's IP interface when activated
Lets apps find out what the actual kernel interface name is for the
device so they can do fun stuff with it.
2010-06-10 10:16:39 -07:00
Dan Williams ae4b47ca99 core: PolicyKit protect Deactivate and Disconnect 2010-06-04 00:42:10 -07:00
Dan Williams 65818d517e core: PolicyKit-protect sleep/wake
Default to 'not allowed', distros that need backwards compatibility
can flip this to 'yes' if they need to. At this point, only power
management scripts should call these functions.
2010-05-29 23:11:45 -07:00
Dan Williams c013490ba3 core: PolicyKit-protect enable/disable networking method 2010-05-29 23:00:46 -07:00
Dan Williams 716a9c6c0d core: add permissions framework for various operations (rh #585182) (bgo #619323) 2010-05-28 18:23:00 -07:00
Dan Williams fea6431a20 core/libnm-glib: implement better missing firmware support (rh #594578)
Track missing firmware and ensure the device can't be used when firmware
is missing.  Add a property for missing firmware so that clients can do
something intelligent with this information.
2010-05-25 10:52:25 -07:00
Dan Williams fa70542c61 core: add networking enable/disable knob distinct from sleep/wake (rh #589108) (bgo #346615)
Since forever we've used sleep/wake as the way to implement
Networking Enabled.  When the state file was introduced to make the
networking and wifi states persistent, we ran into a bug where
a failed suspend (like if the machine ran out of power while
suspended) would result in networking being disabled on reboot
since suspend/resume used the same knob as enable/disable.

This patch adds a distinct call for enable/disable networking
which changes the state file, while sleep/wake no longer change
the state file.
2010-05-22 09:51:22 -07:00
Dan Williams c4f3bf002b Merge remote branch 'origin/master' into wimax 2010-05-19 08:55:26 -07:00
Dan Williams e99ad94411 api: fix SetLogging description typo 2010-05-04 10:04:55 -07:00
Dan Williams 1d409aeb53 core: fix Address property type of IP6Config objects
We can change the property's D-Bus signature (and thus API) here
because querying the IP6Config object's properties caused NM to
crash.  Apparently we forgot to change the type of the Address
property when we C&P-ed the IP4Config into the IP6Config, and
DBUS_TYPE_G_ARRAY_OF_ARRAY_OF_UINT is certainly the wrong type
to use since the backing object that dbus-glib would marshal
into the ARRAY_OF_ARRAY_OF_UINT wasn't that type, causing a
crash in dbus-glib when a client got the IP6Config.
2010-04-17 17:19:30 -07:00
Dan Williams e2ad8c2a54 core: add 'default6' property for ActiveConnection objects
Since IPv4 and IPv6 have different routing one device can have the
active IPv4 connection and a completely different one can have the
active IPv6 one.
2010-04-15 15:18:08 -07:00
Dan Williams 02002ef9d1 logging: add D-Bus method to change logging 2010-04-08 08:56:17 -07:00
Dan Williams 6773cc6a63 api: clarify Connection.Updated arguments 2010-03-24 14:10:34 -07:00
Dan Williams b95c390015 bluetooth: add timeout for bluetooth connection request 2010-03-23 23:07:17 -07:00
Dan Williams c5eb684718 Merge remote branch 'origin/btdun' 2010-02-18 10:18:20 -08:00
Dan Williams 86e4843902 introspection: sync device state reason codes with NetworkManager.h 2010-01-28 12:15:00 -08:00
Dan Williams 133c86ee92 introspection: fix inclusion of Dhcp6Config XML 2010-01-20 17:30:48 -08:00
Dan Williams ac2505b64c Merge commit 'origin/master' into dhcp6 2010-01-20 15:42:26 -08:00
Dan Williams d20c61a1d6 olpc-mesh: fix companion path and active channel property types
Companion device should be an object path instead of a string, and
the introspection data property type for the active channel was
wrong.
2010-01-14 14:30:02 -08:00
Dan Williams 439768db3d dhcp: add the NMDHCP6Config object 2010-01-13 22:30:40 -08:00
Tambet Ingo 20a4c6c6b6 wimax: Implement RFKILL handling
Implement and export over DBus WiMAX enable/disable and hardware state query.
2009-12-29 11:27:10 +02:00
Tambet Ingo ac0f32537e Merge branch 'master' into wimax 2009-12-29 11:25:37 +02:00
Dan Williams 8f4d4c0463 manager: add WWAN enable/disable support 2009-12-23 01:30:54 -08:00
Tambet Ingo 75c734f1a9 wimax: Implement WiMAX support 2009-12-18 15:41:27 +02:00
Dan Williams b94510e3b3 doc: update D-Bus API specification version and dates 2009-11-11 14:34:07 -08:00
Dan Williams 671f00c86f introspection: synchronize VPN ActiveConnection interface
Due to dbus-glib limitations we still have to keep two copies of this,
and furthermore PropertiesChanged won't yet trigger for the VPN bits
since there's no way to push out signals on a different interface.
2009-10-28 10:41:18 -07:00
Dan Williams bf8d3b027b introspection: document ip4-config argument formats 2009-10-23 15:38:06 -07:00
Dan Williams 8d65515435 manager: automatically pick a base connection for VPNs
If let callers pass "/" for the specific object, and NM will
automatically pick the default device.
2009-10-16 11:52:27 -07:00
Dan Williams 1b9496bbef introspection: clarify wired device 'Speed' property units 2009-10-05 16:58:07 -07:00
Dan Williams 99fb844657 core: device disconnection cleanups
Return an error when trying to disconnect an already-disconnected
or deactivated device.
2009-09-18 09:05:11 -07:00
Alexander Sack 2be94b44c3 core: implement manual disconnect feature
In the past networkmanager did not allow to manually disconnect devices.

Manually disconnected devices will not be automatically reconnected until one
of the following events occur:
 1. user activates a connection for the currently disconnected device
 2. network manager awakes from hibernate/suspend
 3. network manager is restarted (e.g. reboot)

Add a Disconnect method to generic NMDevice dbus interface; set a new private
autoconnect_inhibit flag if Disconnect method is called through dbus.
Based on this auto activation for devices gets inhibited until one
of the above events occur.
2009-09-18 17:06:48 +02:00
Dan Williams 393bdd3737 core: generalize unavailable -> disconnected delayed transition
Instead of doing this in every device subclass, do it in the NMDevice
superclass.  nm_device_can_activate() already did the same logic that
each of the subclass device_state_changed() handlers were doing to
figure out whether they could do the transition from unavailable
to disconnected, so just use that in NMDevice and kill lots of code.
2009-09-14 13:24:29 -07:00
Dan Williams 2dbaab2221 system-settings: add permissions
Since the new PolicyKit does away with easy checking of authorizations,
we get to implement it by ourselves, but that's OK since we can actually
use it for a lot more stuff.  So add the GetPermissions call which returns
the permissions the caller actually has, and a signal informing callers
that their permissions might have changed.  Hook this all up to
PolicyKit so it's useful.
2009-08-24 13:03:09 -05:00
Dan Williams 624708ac5d introspection: whitespace fixup 2009-08-24 09:38:38 -05:00
Dan Williams def14729b9 introspection: fix Removed signal detail 2009-08-24 09:38:14 -05:00
Dan Williams e2b13be3d9 Merge commit 'origin/master' into polkit1
Conflicts:
	libnm-glib/Makefile.am
	src/system-settings/nm-sysconfig-settings.c
	system-settings/plugins/ifcfg-rh/plugin.c
2009-08-21 14:12:31 -05:00
Dan Williams 0877323e8d libnm-glib: add NMIP6Config object that proxies device's IP6 config 2009-08-20 11:30:52 -05:00
Dan Williams 890866bef9 system-settings: clean up settings service classes
Make NMSettingsService implement most of the NMSettingsInterface
API to make subclasses simpler, and consolidate exporting of
NMExportedConnection subclasses in NMSettingsService instead of
in 3 places.  Make NMSysconfigSettings a subclass of
NMSettingsService and save a ton of code.
2009-08-10 23:25:11 -05:00
Dan Williams f64354d0cc Merge commit 'origin/master' into polkit1
Conflicts:
	system-settings/plugins/ifcfg-rh/nm-ifcfg-connection.c
2009-08-10 16:27:16 -05:00
Dan Williams 38f732a721 Merge branch 'iscsi' 2009-08-10 15:52:28 -05:00
Dan Williams 39feeeb065 introspection: add a few missing files 2009-08-10 11:50:26 -05:00
Dan Williams 78bb1c01b7 core: implement connection assumption
Mark activation requests that contain connections to be assumed,
and use that to short-circuit various parts of the activation
process by not touching various device attributes, since they
are already set up.  Also ensure the device is not deactivated
when it initially becomes managed, because that would kill the
connection we are about to assume.
2009-08-05 18:03:09 -04:00
Daniel Drake ff88cf12c2 olpc: add mesh device logic and config setting 2009-08-05 16:34:02 -04:00
Dan Williams 4bab33405b ipv6: fix missing introspection file in distcheck 2009-08-04 14:55:22 -04:00
Dan Winship b67b1afb1a Backend IP6 config 2009-07-29 21:34:52 -04:00
Dan Williams f1d8033044 build: add BT introspection to dist tarball 2009-07-28 10:12:27 -04:00
Dan Williams 0d69dfe39e libnm-glib: implement new settings interfaces
The old NMExportedConnection was used for both client and server-side classes,
which was a mistake and made the code very complicated to follow.  Additionally,
all PolicyKit operations were synchronous, and PK operations can block for a
long time (ie for user input) before returning, so they need to be async.  But
NMExportedConnection and NMSysconfigConnection didn't allow for async PK ops
at all.

Use this opportunity to clean up the mess and create GInterfaces that both
server and client objects implement, so that the connection editor and applet
can operate on generic objects like they did before (using the interfaces) but
can perform specific operations (like async PK verification of callers) depending
on whether they are local or remote or whatever.
2009-07-23 09:20:52 -04:00
Dan Williams 1bb492935a bluetooth: fixes and addition of NMDeviceBt to libnm-glib 2009-07-10 10:45:24 -04:00
Dan Williams 139ed09f67 introspection: back out erroneously committed change to NMDevice properties 2009-06-11 01:33:08 -04:00
Dan Williams c9067d8fed everything: use libgudev instead of HAL; merge NM and nm-system-settings
The only thing that doesn't work yet is the system-settings service's
"auto eth" connections for ethernet devices that don't have an existing
connection.  Might also have issues with unmanaged devices that can't
provide a MAC address until they are brought up, but we'll see.
2009-06-11 00:39:12 -04:00
Dan Williams 7d88a87214 bluetooth: NMDeviceBt and associated fixes 2009-05-14 11:01:56 -04:00
Dan Williams 196c2055c7 introspection: add missing "Vpn" property on ActiveConnection interface (bgo #570030) 2009-02-03 06:27:33 -05:00
Dan Williams 65c4eff185 introspection: add missing NMDeviceType enum (bgo #569934) 2009-02-03 06:24:15 -05:00
Dan Williams 8a1e437eca spec: clarify behavior of Update() 2009-01-26 11:22:11 -05:00
Dan Williams a020ed21da Re-add WINS support to the IPv4 config
Don't do anything with WINS servers (dispatcher scripts installed with
samba could certainly update samba's idea of WINS servers), but at least
provide them so that the VPNs that can get upstream WINS servers can
at least make other stuff aware of them.
2008-12-19 17:01:06 -05:00
Dan Williams c531e1cd9e 2008-11-14 Dan Williams <dcbw@redhat.com>
* introspection/nm-settings-system.xml
	  system-settings/src/dbus-settings.c
	  system-settings/src/dbus-settings.h
		- Add a "CanModify" property to indicate if any plugins support
			connection modification



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4286 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-11-14 18:24:38 +00:00
Dan Williams d001936125 Doc updates
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4273 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-11-06 16:04:49 +00:00
Dan Williams db77f88bfb D-Bus API doc fixes
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4272 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-11-06 15:56:59 +00:00
Dan Williams f029b6f4e9 2008-10-22 Dan Williams <dcbw@redhat.com>
* include/NetworkManager.h
	  introspection/nm-device.xml
		- Add device state change reason for carrier changes

	* src/nm-device-ethernet.c
		- (set_carrier): use the carrier change reason when changing device
			state in response to carrier changes



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4203 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-10-22 13:35:07 +00:00
Dan Williams f078992e4d 2008-10-11 Dan Williams <dcbw@redhat.com>
* include/NetworkManager.h
	  introspection/nm-device.xml
	  include/NetworkManagerVPN.h
		- Add a few more state reasons for the device deactivated state

	* src/nm-device-interface.c
	  src/nm-device-interface.h
		- (nm_device_interface_deactivate): add a 'reason' argument

	* src/nm-device.c
	  src/nm-device.h
		- (nm_device_deactivate, nm_device_take_down): add a 'reason' argument
		- (nm_device_state_changed): pass the state change reason to
			nm_device_take_down()
		- (nm_device_set_managed): take a 'reason' argument, and pass it along
			to the state change function

	* src/nm-manager.c
	  src/nm-manager.h
		- (remove_one_device, handle_unmanaged_devices, sync_devices,
		   impl_manager_sleep): pass a reason code to nm_device_set_managed()
		- (nm_manager_deactivate_connection): add a 'reason' argument and pass
			something reasonable along to VPN deactivation

	* src/vpn-manager/nm-vpn-manager.c
	  src/vpn-manager/nm-vpn-manager.h
		- (nm_vpn_manager_deactivate_connection): add a 'reason' argument and
			pass that along to nm_vpn_connection_disconnect()



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4174 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-10-11 19:57:45 +00:00
Dan Williams bcd7a1075c Make argument names consistent
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4137 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-10-02 13:13:21 +00:00
Tambet Ingo b37fc86385 2008-09-22 Tambet Ingo <tambet@gmail.com>
* src/vpn-manager/nm-vpn-connection.c: Add a signal handler for the
	"Failure" signal from VPN plugins, store the failure reason, and
	use it when the state is changed to failure.

	* introspection/nm-vpn-plugin.xml: Fix the "Failure" signal's type
	description.

	* include/NetworkManagerVPN.h (NMVPNConnectionStateReason): Add a new
	reason to the end of the list to not break the API.
	(NMVPNPluginFailure): Move it here (from libnm-glib/nm-vpn-plugin.h)
	so it can be shared by plugins and daemon.

git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4088 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-09-22 15:29:00 +00:00
Dan Williams 3a0b1d645b SaveHostname should be async
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4081 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-09-19 17:14:08 +00:00
Dan Williams 9d5a2291f7 2008-09-18 Dan Williams <dcbw@redhat.com>
Implement support for honoring configured and automatic hostnames, and for
	setting the configured hostname.

	* introspection/nm-ip4-config.xml
	  src/nm-ip4-config.c
	  src/nm-ip4-config.h
	  src/dhcp-manager/nm-dhcp-manager.c
		- Remove useless hostname property; it's not really part of the IPv4
			config

	* introspection/nm-settings-system.xml
	  libnm-glib/nm-dbus-settings-system.c
	  libnm-glib/nm-dbus-settings-system.h
		- Add SetHostname() call to system settings D-Bus interface
		- Add Hostname property to system settings D-Bus interface
		- (nm_dbus_settings_system_save_hostname,
		   nm_dbus_settings_system_get_hostname): implement

	* src/nm-device.c
	  src/nm-device.h
		- (nm_device_get_dhcp4_config): implement

	* src/nm-manager.c
	  src/nm-manager.h
		- Fetch and track system settings service hostname changes, and proxy
			the changes via a GObject property of the manager

	* system-settings/src/nm-system-config-interface.c
	  system-settings/src/nm-system-config-interface.h
		- Replace nm_system_config_interface_supports_add() with a capabilities
			bitfield

	* system-settings/src/nm-system-config-error.c
	  system-settings/src/nm-system-config-error.h
		- Add additional errors

	* system-settings/src/dbus-settings.c
	  system-settings/src/dbus-settings.h
		- (get_property, nm_sysconfig_settings_class_init): add hostname
			property; first plugin returning a hostname wins
		- (impl_settings_add_connection): use plugin capabilities instead of
			nm_system_config_interface_supports_add()
		- (impl_settings_save_hostname): implement hostname saving

	* src/NetworkManagerPolicy.c
		- (lookup_thread_run_cb, lookup_thread_worker, lookup_thread_new,
		   lookup_thread_die): implement an asynchronous hostname lookup thread
			which given an IPv4 address tries to look up the hostname for that
			address with reverse DNS
		- (get_best_device): split out best device code from
			update_routing_and_dns()
		- (update_etc_hosts): update /etc/hosts with the machine's new hostname
			to preserve the 127.0.0.1 reverse mapping that so many things require
		- (set_system_hostname): set a given hostname
		- (update_system_hostname): implement hostname policy; a configured
			hostname (from the system settings service) is used if available,
			otherwise an automatically determined hostname from DHCP, VPN, etc.
			If there was no automatically determined hostname, reverse DNS of
			the best device's IP address will be used, and as a last resort the
			hostname 'localhost.localdomain' is set.
		- (update_routing_and_dns): use get_best_device(); update the system
			hostname when the network config changes
		- (hostname_changed): update system hostname if the system settings
			service signals a hostname change
		- (nm_policy_new): list for system settings service hostname changes
		- (nm_policy_destroy): ensure that an in-progress hostname lookup thread
			gets told to die

	* system-settings/plugins/keyfile/plugin.c
	  system-settings/plugins/ifcfg-suse/plugin.c
		- (get_property, sc_plugin_ifcfg_class_init): implement hostname and
			capabilities properties

	* system-settings/plugins/ifcfg-fedora/shvar.c
		- (svOpenFile): re-enable R/W access of ifcfg files since the plugin
			writes out /etc/sysconfig/network now

	* system-settings/plugins/ifcfg-fedora/plugin.c
		- (plugin_get_hostname): get hostname from /etc/sysconfig/network
		- (plugin_set_hostname): save hostname to /etc/sysconfig/network
		- (sc_network_changed_cb): handle changes to /etc/sysconfig/network
		- (sc_plugin_ifcfg_init): monitor /etc/sysconfig/network for changes
		- (get_property, set_property, sc_plugin_ifcfg_class_init): implement
			hostname get/set and capabilities get



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4077 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-09-18 15:16:44 +00:00
Dan Williams d5b4329735 Add missing introspection files to tarball (Robert Piasek)
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4023 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-08-28 14:12:09 +00:00
Dan Williams 81f8f39920 2008-08-26 Dan Williams <dcbw@redhat.com>
Add connection UUIDs, since connection names can be changed, and since
	old-style connection IDs could change over the life of the connection.  The
	UUID should be assigned at connection creation time, be stable for a given
	connection, and should be unique among all connections for a given settings
	service.

	* configure.in
	  libnm-util/Makefile.am
		- Require libuuid

	* introspection/nm-exported-connection.xml
		- Remove "GetID" method

	* libnm-glib/nm-dbus-connection.c
	  libnm-glib/nm-settings.c
	  libnm-glib/nm-settings.h
		- Remove id-related stuff

	* libnm-util/nm-utils.c
	  libnm-util/nm-utils.h
	  libnm-util/libnm-util.ver
		- (nm_utils_uuid_generate, nm_utils_uuid_generate_from_string): Add
			utility functions to generate UUIDs

	* libnm-util/nm-setting-connection.c
	  libnm-util/nm-setting-connection.h
		- Add 'uuid' member to the connection setting
		- (verify): require valid 'uuid' for a valid connection

	* system-settings/plugins/ifcfg-fedora/nm-ifcfg-connection.c
	  system-settings/plugins/ifcfg-fedora/reader.c
	  system-settings/plugins/ifcfg-suse/nm-suse-connection.c
	  system-settings/plugins/ifcfg-suse/parser.c
	  system-settings/plugins/keyfile/nm-keyfile-connection.c
	  system-settings/src/main.c
		- Remove id-related stuff
		- Give connections UUIDs where needed



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4013 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-08-27 02:57:21 +00:00
Dan Williams 728dccd92c 2008-08-18 Dan Williams <dcbw@redhat.com>
* include/NetworkManager.h
	  introspection/nm-device.xml
		- Add a "missing firmware" device state reason

	* src/NetworkManagerSystem.c
	  src/NetworkManagerSystem.h
		- (nm_system_device_set_up_down): add a no_firmware argument
		- (nm_system_device_set_up_down_with_iface): if the result of setting
			IFF_UP is ENOENT, that almost always means missing firmware

	* src/backends/NetworkManagerGeneric.c
	  src/nm-device-ethernet.c
	  src/nm-device-private.h
	  src/nm-device-wifi.c
	  src/nm-device.c
	  src/nm-device.h
	  src/nm-hso-gsm-device.c
	  src/vpn-manager/nm-vpn-connection.c
		- Pass no_firmware along; check it where appropriate



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3983 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-08-18 18:29:47 +00:00
Dan Williams afe47b8d3a 2008-08-17 Dan Williams <dcbw@redhat.com>
* include/NetworkManager.h
	  introspection/nm-device.xml
	  src/nm-gsm-device.c
		- Finer-grained GSM registration failure error codes



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3978 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-08-17 23:41:41 +00:00
Dan Williams 5611f4c4d0 2008-08-12 Dan Williams <dcbw@redhat.com>
Revert most of the 'hostname' patch.  Too much stuff still breaks when
	hostname is updated at runtime.  Distros or users who want hostname updates
	can use dispatcher scripts to update the hostname if they need it.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3945 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-08-12 22:37:08 +00:00
Dan Williams a3be3b6e90 2008-08-12 Dan Williams <dcbw@redhat.com>
* introspection/nm-settings-system.xml
	  system-settings/src/dbus-settings.c
	  system-settings/src/dbus-settings.h
		- Add a 'Hostname' property (rw) which represents the configured
			hostname and domain of the system, if any

	* system-settings/src/nm-system-config-error.c
	  system-settings/src/nm-system-config-error.h
	  system-settings/src/nm-system-config-interface.c
	  system-settings/src/nm-system-config-interface.h
		- Add a 'hostname' property to the plugin interface
		- Add a method to send updated hostname to plugins to save in their
			backing configuration store

	* system-settings/plugins/keyfile/nm-keyfile-connection.c
	  system-settings/plugins/keyfile/plugin.c
	  system-settings/plugins/keyfile/writer.c
	  system-settings/plugins/keyfile/writer.h
	  system-settings/plugins/ifcfg-suse/plugin.c
		- Add minimal hostname support

	* system-settings/plugins/ifcfg-fedora/plugin.c
		- Add support for updating system hostname in /etc/sysconfig/network



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3941 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-08-12 18:39:03 +00:00
Dan Williams bcae312905 2008-08-07 Dan Williams <dcbw@redhat.com>
* introspection/nm-ip4-config.xml
	  libnm-glib/libnm-glib-test.c
	  libnm-glib/nm-ip4-config.c
	  libnm-glib/nm-ip4-config.h
	  src/NetworkManagerSystem.h
	  src/backends/NetworkManagerArch.c
	  src/backends/NetworkManagerDebian.c
	  src/backends/NetworkManagerFrugalware.c
	  src/backends/NetworkManagerGeneric.c
	  src/backends/NetworkManagerGeneric.h
	  src/backends/NetworkManagerGentoo.c
	  src/backends/NetworkManagerMandriva.c
	  src/backends/NetworkManagerPaldo.c
	  src/backends/NetworkManagerRedHat.c
	  src/backends/NetworkManagerSlackware.c
	  src/backends/NetworkManagerSuSE.c
	  src/dhcp-manager/nm-dhcp-manager.c
	  src/nm-device.c
	  src/nm-ip4-config.c
	  src/nm-ip4-config.h
		- Remove NIS logic; should be done from dispatcher scripts instead



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3909 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-08-07 19:22:23 +00:00
Dan Williams 2c31b5499b 2008-08-06 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-ip4-config.c
	  libnm-glib/nm-ip4-config.h
		- Add 'routes' property

	* libnm-util/nm-setting-vpn.c
	  libnm-util/nm-setting-vpn.h
		- Remove 'routes' property

	* libnm-util/nm-setting-ip4-config.c
	  libnm-util/nm-setting-ip4-config.h
		- 'ignore-dhcp-dns' renamed to 'ignore-auto-dns'
		- Add 'ignore-auto-routes' property
		- 'routes' exposed over D-Bus is now an array of array of uint (4) to 
			accomodate route metrics
		- 'routes' exposed in C is now a list of NMSettingIP4Route structures

	* libnm-util/nm-utils.c
	  libnm-util/nm-utils.h
		- Add helpers for marshalling IP4 routes

	* src/NetworkManagerUtils.c
		- (nm_utils_merge_ip4_config): handle property renames and new route
			structure

	* src/NetworkManagerSystem.c
		- (nm_system_device_set_ip4_route, nm_system_device_set_from_ip4_config,
		   nm_system_vpn_device_set_from_ip4_config): respect route metrics

	* src/dhcp-manager/nm-dhcp-manager.c
		- (nm_dhcp_manager_get_ip4_config): handle new route structure

	* system-settings/plugins/ifcfg-fedora/reader.c
	  system-settings/plugins/ifcfg-fedora/writer.c
		- Handle routes separately from addresses now that routes have a different
			format

	* introspection/nm-ip4-config.xml
	  src/nm-ip4-config.c
	  src/nm-ip4-config.h
		- Rename internal routing functions
		- 'static-routes' renamed to 'routes'



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3898 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-08-06 22:23:48 +00:00
Dan Williams edda4463bc 2008-07-17 Dan Williams <dcbw@redhat.com>
* introspection/Makefile.am
	  introspection/nm-device.xml
	  introspection/nm-dhcp4-config.xml
		- Add bits for the DHCP4Config property of the device, and the DHCP4Config
			itself
	* src/nm-device-interface.c
	  src/nm-device-interface.h
		- Add the DHCP4Config property

	* src/nm-device.c
		- Keep track of DHCP4 options via a new DHCP4Config property and notify
			D-Bus clients when it changes

	* src/nm-dhcp4-config.c
	  src/nm-dhcp4-config.h
		- Simple object to store DHCP4 options, export them over D-Bus, and
			notify when they change

	* src/dhcp-manager/nm-dhcp-manager.c
	  src/dhcp-manager/nm-dhcp-manager.h
		- (nm_dhcp_manager_set_dhcp4_config, copy_dhcp4_config_option): copy and
			filter server-returned DHCP options into an NMDHCP4Config object



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3829 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-07-17 17:04:13 +00:00
Dan Williams f4f0752ca3 2008-07-16 Dan Williams <dcbw@redhat.com>
* introspection/nm-device.xml
		- Add device state reasons



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3828 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-07-17 15:22:12 +00:00
Dan Williams 7d0e1d691b Update documented device states to match actual states
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3822 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-07-16 15:49:20 +00:00
Dan Williams 95bb76aa7f 2008-07-11 Dan Williams <dcbw@redhat.com>
Modify the NMDevice::state-changed signal to include the previous state
	and reason. Enables the applet to provide more information why device
	activation failed.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3819 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-07-11 10:28:53 +00:00
Dan Williams e1e4100f76 2008-07-07 Dan Williams <dcbw@redhat.com>
Convert to using IPv4 prefixes instead of netmasks.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3812 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-07-07 18:57:37 +00:00
Dan Williams 5348be4d0b 2008-07-02 Dan Williams <dcbw@redhat.com>
* introspection/nm-active-connection.xml
	  introspection/nm-vpn-connection.xml
	  libnm-glib/nm-active-connection.c
	  src/nm-activation-request.c
	  src/nm-active-connection.h
	  src/vpn-manager/nm-vpn-connection.c
		- Remove "SharedServiceName" and "SharedConnection" bits from the D-Bus
			and libnm-glib API since sharing didn't get implemented that way



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3797 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-07-02 13:00:14 +00:00
Tambet Ingo 628f271791 2008-06-09 Tambet Ingo <tambet@gmail.com>
* Add missing files.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3746 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-06-11 09:31:16 +00:00
Dan Williams 0fdb07ca3d 2008-06-10 Dan Williams <dcbw@redhat.com>
The grand 802-11-wireless rename.  Get rid of the 802-11/80211/802_11 bits
	and use "wifi" everwhere instead.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3742 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-06-10 16:32:39 +00:00
Dan Williams 2b00116361 2008-06-10 Dan Williams <dcbw@redhat.com>
The grand 802-3-ethernet rename.  Get rid of the 802-3/8023/802_3 bits.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3741 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-06-10 15:54:23 +00:00
Dan Williams 6919b29f11 2008-06-10 Dan Williams <dcbw@redhat.com>
Patch from Tambet Ingo <tambet@gmail.com>

	* src/ppp-manager/nm-ppp-manager.c: Add ppp stats monitoring, signal the
		changes.

	* src/nm-serial-device.c: Monitor "ppp-stats" signals from NMPPPManager. Add
		a signal to emit these changes over dbus.

	* src/Makefile.am: Genereate nm-serial-device-glue.

	* libnm-glib/nm-serial-device.[ch]: Implement.

	* libnm-glib/nm-cdma-device.[ch]
	  libnm-glib/nm-gsm-device.[ch]: Inherit from NMSerialDevice.

	* libnm-glib/Makefile.am: Add nm-serial-device.[ch].

	* introspection/nm-device-serial.xml: Implement.

	* introspection/all.xml: Fix a couple of typos, add nm-device-serial.xml.

	* introspection/Makefile.am: Add nm-device-serial.xml.

	* include/NetworkManager.h: Add a DBus interface for serial device.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3740 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-06-10 14:59:22 +00:00
Dan Williams 5e64c21d5f Fix documented enum types (Will Stephenson)
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3671 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-14 16:41:02 +00:00
Tambet Ingo d2cf6fa75c 2008-05-08 Tambet Ingo <tambet@gmail.com>
Use PolicyKit to authorize the system settings' AddConnection method
    	and the system settings connections' Update and Delete methods.

    	* libnm-glib/nm-settings.c (impl_exported_connection_update)
    	(impl_exported_connection_delete, nm_exported_connection_update)
    	(nm_exported_connection_delete): Return boolean and fill GError
    	to notify the callers of the reasons why it might have failed.

    	* libnm-glib/nm-dbus-settings-system.c
    	(nm_dbus_settings_system_add_connection): Return the error from dbus
    	call so that the callers can see why it failed.

    	* libnm-glib/nm-dbus-connection.c (update, delete): Update the
    	signatures.

    	* system-settings/src/nm-polkit-helpers.[ch]: Implement.

    	* system-settings/src/nm-sysconfig-connection.[ch]: Implement. New
    	abstract base class that checks PolicyKit permissions.

    	* system-settings/src/dbus-settings.c:
    	(impl_settings_add_connection): Check the policy before carring out
    	the request.

    	* system-settings/plugins/keyfile/nm-keyfile-connection.c:
    	Inherit from NMSysconfigConnection, check the policies before
    	allowing updating or removing.

    	* system-settings/plugins/ifcfg-suse/nm-suse-connection.c:
    	Inherit from NMSysconfigConnection.

    	* introspection/nm-exported-connection.xml: Annotate "Update" and
    	"Delete" methods with async flag so that the implementations can get
    	access to DBusGMethodInvocation.

    	* system-settings/src/dbus-settings.c
    	(settings_add_connection_check_privileges): Implement.
    	(impl_settings_add_connection): Check the privileges before adding a new
    	connection. Improve error reporting.

    	* introspection/nm-settings-system.xml: Make the 'AddConnection' method
    	async so that the implementation can access DBusGMethodInvocation.

    	* configure.in: Check for PolicyKit.

    	* policy/org.freedesktop.network-manager-settings.system.policy:
    	New file.

    	* policy/Makefile.am: Install the policy file.

    	* configure.in: Add 'policy' subdir.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3646 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-09 06:33:30 +00:00
Dan Williams 51503b2d5f 2008-05-06 Dan Williams <dcbw@redhat.com>
* src/dhcp-manager/nm-dhcp-manager.c
		- (nm_dhcp_manager_get_ip4_config): clean up; update for changes to
			NMIP4Config to support multiple IP addresses

	* src/NetworkManagerUtils.c
		- (nm_utils_merge_ip4_config): update for multiple IP addresses

	* src/nm-ip4-config.c
	  src/nm-ip4-config.h
		- Store a list of IPv4 address/netmask/gateway tuples
		- (nm_ip4_config_get_gateway, nm_ip4_config_set_gateway,
		   nm_ip4_config_get_netmask, nm_ip4_config_set_netmask,
		   nm_ip4_config_get_broadcast, nm_ip4_config_set_broadcast,
		   nm_ip4_config_set_address): remove
		- (nm_ip4_config_take_address, nm_ip4_config_add_address,
		   nm_ip4_config_replace_address, nm_ip4_config_get_num_addresses):
			new functions; handle multiple IPv4 addresses

	* src/nm-device.c
	  src/ppp-manager/nm-ppp-manager.c
	  src/vpn-manager/nm-vpn-connection.c
	  src/NetworkManagerPolicy.c
	  test/nm-tool.c
	  libnm-glib/libnm-glib-test.c
		- update for changes to NMIP4Config for multiple IPv4 addresses

	* src/NetworkManagerSystem.c
		- (nm_system_device_set_ip4_route): don't add the route if any address
			is on the same subnet as the destination
		- (check_one_address): ignore the exact match, just match family and
			interface index
		- (add_ip4_addresses): add all IPv4 addresses in an NMIP4Config to
			an interface
		- (nm_system_device_set_from_ip4_config): use add_ip4_addresses()
		- (nm_system_vpn_device_set_from_ip4_config): use add_ip4_addresses()

	* introspection/nm-ip4-config.xml
		- Remove 'address', 'gateway', 'netmask', and 'broadcast' properties
		- Add 'addresses' property which is an array of (uuu) tuples of
			address/netmask/gateway

	* libnm-util/nm-setting-ip4-config.c
		- (set_property): use ip-address <-> GValue converters from nm-utils.c

	* libnm-glib/nm-ip4-config.c
	  libnm-glib/nm-ip4-config.h
		- Handle D-Bus interface changes to support multiple IP addresses



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3637 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-06 21:53:22 +00:00
Tambet Ingo e6a5d0be51 2008-04-22 Tambet Ingo <tambet@gmail.com>
Implement GKeyFile system settings plugin.
	Implement writing system settings (currently supported only by GKeyFile plugin).

	* system-settings/src/main.c:
	* system-settings/src/dbus-settings.c: Move the communication with plugins
	from main.c to dbus-settings.c. Makes it possible to talk to all registered
	plugins for adding/updating/removing connections.

	* system-settings/src/nm-system-config-interface.c
	(nm_system_config_interface_add_connection): Implement
	(nm_system_config_interface_update_connection): Implement.
	(nm_system_config_interface_remove_connection): Implement.

	* system-settings/plugins/keyfile/Makefile.am:
	* system-settings/plugins/keyfile/plugin.[ch]:
	* system-settings/plugins/keyfile/writer.[ch]:
	* system-settings/plugins/keyfile/reader.[ch]: Implement.

	* system-settings/plugins/Makefile.am: Add GKeyFile plugin.

	* configure.in: Generate GKeyFile Makefile.

	* libnm-glib/nm-settings.c (impl_exported_connection_get_id): Fix a memory
	corruption, need to duplicate the returned string.
	(impl_exported_connection_update): Implement.
	(impl_exported_connection_delete): Implement.

	* introspection/nm-settings-system.xml: Add "AddConnection" method.

	* introspection/nm-exported-connection.xml: Add "Update" and "Delete" methods.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3587 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-22 14:48:02 +00:00
Dan Williams 675d12263a 2008-04-21 Dan Williams <dcbw@redhat.com>
* include/NetworkManager.h
		- Add NMActiveConnectionState enum

	* introspection/nm-active-connection.xml
	  introspection/nm-vpn-connection.xml
		- Add 'State' property for overall active connection state
		- Add 'Default' property, when True means this active connection
			has the default route
		- Add PropertyChanged signals so changes actually go out over the bus

	* src/nm-active-connection.h
		- Add defines for State & Default properties

	* src/nm-activation-request.c
		- Add 'state' and 'default' properties, hook up to device 'state-changed'
			signal to determine active connection state

	* src/vpn-manager/nm-vpn-connection.c
	  src/vpn-manager/nm-vpn-connection.h
	  src/vpn-manager/nm-vpn-manager.c
	  src/vpn-manager/nm-vpn-service.c
		- Rename old 'state' to 'vpn-state'
		- Rename nm_vpn_connection_get_state() -> nm_vpn_connection_get_vpn_state()
		- Add 'state' and 'default' properties, hook up to the vpn connection's
			'vpn-state-changed' signal

	* libnm-glib/nm-active-connection.c
	  libnm-glib/nm-active-connection.h
		- Add new 'state' and 'default' properties and accessors

	* libnm-glib/nm-vpn-connection.c
	  libnm-glib/nm-vpn-connection.h
		- Rename old 'state' property to 'vpn-state'
		- Add new 'state' and 'default' properties and accessors



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3582 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-22 00:28:02 +00:00
Dan Williams 1e1c99afba 2008-04-15 Dan Williams <dcbw@redhat.com>
Remove exposure of wireless-tools mode types in the API.

	* include/NetworkManager.h
		- Define NM80211Mode enum

	* introspection/generic-types.xml
		- Describe NM_802_11_MODE enum
		- Remove IW_MODE_* enum

	* introspection/nm-access-point.xml
	  libnm-glib/nm-access-point.c
	  libnm-glib/nm-access-point.h
		- 'mode' is now of type NM80211Mode, a DBUS_TYPE_UINT

	* introspection/nm-device-802-11-wireless.xml
	  libnm-glib/nm-device-802-11-wireless.c
	  libnm-glib/nm-device-802-11-wireless.h
		- 'mode' is now of type NM80211Mode, a DBUS_TYPE_UINT

	* libnm-util/nm-setting-wireless.c
	  src/NetworkManagerAP.c
	  src/NetworkManagerAP.h
	  src/nm-device-802-11-wireless.c
	  src/nm-device-802-11-wireless.h
	  test/nm-tool.c
		- Use NM80211Mode not IW_MODE_*



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3562 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-15 20:39:34 +00:00
Dan Williams 54aac18883 2008-04-07 Dan Williams <dcbw@redhat.com>
* include/NetworkManager.h
		- Remove the DOWN and CANCELLED device states
		- Add UNMANAGED and UNAVAILABLE device states
		- Document the device states

	* introspection/nm-device.xml
	  src/nm-device-interface.c
	  src/nm-device-interface.h
		- Add the 'managed' property

	* test/nm-tool.c
		- (detail_device): print out device state

	* src/NetworkManagerSystem.h
	  src/backends/NetworkManagerArch.c
	  src/backends/NetworkManagerDebian.c
	  src/backends/NetworkManagerFrugalware.c
	  src/backends/NetworkManagerGentoo.c
	  src/backends/NetworkManagerMandriva.c
	  src/backends/NetworkManagerPaldo.c
	  src/backends/NetworkManagerRedHat.c
	  src/backends/NetworkManagerSlackware.c
	  src/backends/NetworkManagerSuSE.c
		- (nm_system_device_get_system_config, nm_system_device_get_disabled
		   nm_system_device_free_system_config): remove; they were unused and
			their functionality should be re-implemented in each distro's
			system settings service plugin 

	* src/nm-gsm-device.c
	  src/nm-gsm-device.h
	  src/nm-cdma-device.c
	  src/nm-cdma-device.h
		- (*_new): take the 'managed' argument

	* src/nm-device.c
		- (nm_device_set_address): remove, fold into nm_device_bring_up()
		- (nm_device_init): start in unmanaged state, not disconnected
		- (constructor): don't start device until the system settings service
			has had a chance to figure out if the device is managed or not
		- (nm_device_deactivate, nm_device_bring_up, nm_device_bring_down):
			don't set device state here, let callers handle that as appropriate
		- (nm_device_dispose): don't touch the device if it's not managed
		- (set_property, get_property, nm_device_class_init): implement the
			'managed' property
		- (nm_device_state_changed): bring the device up if its now managed,
			and deactivate it if it used to be active
		- (nm_device_get_managed, nm_device_set_managed): do the right thing
			with the managed state

	* src/nm-hal-manager.c
		- (wired_device_creator, wireless_device_creator, modem_device_creator):
			take initial managed state and pass it along to device constructors
		- (create_device_and_add_to_list): get managed state and pass to
			type creators

	* src/nm-device-802-11-wireless.c
		- (real_can_activate): fold in most of
			nm_device_802_11_wireless_can_activate()
		- (can_scan): can't scan in UNAVAILABLE or UNMANAGED
		- (link_timeout_cb): instead of deactivating, change device state and
			let the device state handler to it
		- (real_update_hw_address): clean up
		- (state_changed_cb): when entering UNAVAILABLE state, schedule an idle
			handler to transition to DISCONNECTED if the device isn't rfkilled

	* src/nm-device-802-3-ethernet.c
		- (set_carrier): move above callers and get rid of prototype
		- (device_state_changed): when entering UNAVAILABLE state, schedule an
			idle handler to transition to DISCONNECTED if the device has a
			carrier
		- (real_update_hw_address): clean up
		- (link_timeout_cb, ppp_state_changed): change state instead of calling
			deactivation directly as deactivation doesn't change state anymore

	* src/NetworkManagerPolicy.c
		- (schedule_activate_check): yay, remove wireless_enabled hack since
			the NMManager and wireless devices work that out themselves now
		- (device_state_changed): change to a switch and update for new device
			states
		- (device_carrier_changed): remove; device handles this now through
			state changes
		- (device_added): don't care about carrier any more; the initial
			activation check will happen when the device transitions to
			DISCONNECTED

	* src/nm-manager.c
		- (dispose): clear unmanaged devices
		- (handle_unmanaged_devices): update unmanaged device list and toggle
			the managed property on each device when needed
		- (system_settings_properties_changed_cb): handle signals from the
			system settings service
		- (system_settings_get_unmanaged_devices_cb): handle callback from
			getting the unmanaged device list method call
		- (query_unmanaged_devices): ask the system settings service for its
			list of unmanaged devices
		- (nm_manager_name_owner_changed, initial_get_connections): get unmanaged
			devices
		- (manager_set_wireless_enabled): push rfkill state down to wireless
			devices directly and let them handle the necessary state transitions
		- (manager_device_state_changed): update for new device states
		- (nm_manager_add_device): set initial rfkill state on wireless devices
		- (nm_manager_remove_device): don't touch the device if it's unmanaged
		- (nm_manager_activate_connection): return error if the device is
			unmanaged
		- (nm_manager_sleep): handle new device states correctly; don't change
			the state of unavailable/unmanaged devices

	* libnm-glib/nm-device-802-11-wireless.c
		- (state_changed_cb): update for new device states



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3540 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-08 02:58:02 +00:00
Dan Williams 67149b36f4 2008-04-07 Dan Williams <dcbw@redhat.com>
* introspection/nm-settings-system.xml
	  introspection/Makefile.am
		- Define the unmanaged devices interface for the system settings service

	* system-settings/src/nm-system-config-hal-manager.c
	  system-settings/src/nm-system-config-hal-manager.h
	  system-settings/src/nm-system-config-hal-manager-private.h
	  system-settings/src/Makefile.am
		- Add a lightweight HAL manager object for tracking network devices for
			the purpose of determining unmanaged devices and which devices need
			the default DHCP connections

	* system-settings/src/nm-system-config-interface.c
	  system-settings/src/nm-system-config-interface.h
		- (nm_system_config_interface_init): add the HAL manager as an argument
		- (nm_system_config_interface_get_unmanaged_devices): implement
		- Define 'unmanaged-devices-changed' signal

	* system-settings/src/dbus-settings.c
	  system-settings/src/dbus-settings.h
		- Implement the unmanaged devices interface; some cleanups

	* system-settings/plugins/ifcfg-suse/plugin.c
		- Fixup for plugin interface changes

	* system-settings/plugins/ifcfg-fedora/plugin.c
		- (get_ether_device_udi): new function; find the device that has
			a specified MAC address and return its UDI
		- (get_udi_for_connection): new function; try to find the specific
			device a connection is locked to, if any
		- (device_added_cb, device_removed_cb): update unmanaged device list in
			response to HAL events
		- (get_unmanaged_devices): new function; return unmanaged device list
		- (build_one_connection): set the connection's locked device, if any
		- (write_auto_wired_connection): remove
		- (kill_old_auto_wired_file): remove the ifcfg-Auto Wired file if found
		- (handle_connection_changed): alert listeners that the unmanaged device
			list has changed
		- (init): fixup for plugin interface changes, implement unmanaged devices

	* system-settings/plugins/ifcfg-fedora/parser.c
	  system-settings/plugins/ifcfg-fedora/parser.h
		- (connection_data_free): clean up connection UDI



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3537 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-08 01:36:39 +00:00
Dan Williams 92a6f3c3c8 Clean up formatting
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3529 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-04 14:57:02 +00:00
Dan Williams ec89663e7d 2008-03-26 Dan Williams <dcbw@redhat.com>
Rework VPN connection handling for a more consistent D-Bus API.  The
	VPNManager object has been removed, and active VPN connections are now the
	same as any other active connection.  The Manager object's ActivateConnection
	and DeactivateConnection methods are used to start and stop a VPN connection,
	and the VPNConnection objects are subclasses of the ActiveConnection objects.
	When activating a VPN connection, pass the path of the active connection
	to which the VPN connection is tied in the 'specific_object' argument.

	Consequently, the libnm-glib API has been reworked to match this arrangement,
	with the VPNManager object removed, and the NMVPNConnection objects now
	being subclasses of NMActiveConnection.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3504 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-26 13:43:01 +00:00
Dan Williams d60eb8d3ba 2008-03-25 Dan Williams <dcbw@redhat.com>
* introspection/nm-device-cdma.xml
	  introspection/nm-device-gsm.xml
	  introspection/Makefile.am
	  introspection/all.xml
		- Add introspection for CDMA and GSM devices for PropertiesChanged signal

	* src/nm-gsm-device.h
	  src/nm-gsm-device.c
	  src/nm-cdma-device.h
	  src/nm-cdma-device.c
	  src/Makefile.am
		- Implement PropertiesChanged signals

	* libnm-glib/nm-cdma-device.c
	  libnm-glib/nm-cdma-device.c
		- Attach to PropertiesChanged signals



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3499 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-25 11:31:33 +00:00
Dan Williams 770974f75a add NMActiveConnection introspection XML
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3494 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-24 18:12:22 +00:00
Dan Williams 393685203f 2008-03-20 Dan Williams <dcbw@redhat.com>
* introspection/nm-manager.xml
	  introspection/nm-manager-client.xml
		- (ActivateConnection): return the object path of the active connection
			on success
		- (GetActiveConnections): remove
		- (DeactivateConnection): new function; deactivate a currently active
			connection
		- Add an ActiveConnections property which returns an array of
			active connection object paths

	* introspection/nm-device.xml
		- (Deactivate): remove

	* introspection/all.xml
		- Add ActiveConnection introspection

	* introspection/nm-active-connection.xml
		- Add the ActiveConnection object

	* include/NetworkManager.h
		- Add the Connection.Active D-Bus interface

	* src/nm-device-interface.c
		- (impl_device_deactivate): remove

	* src/nm-activation-request.c
	  src/nm-activation-request.c
	  src/Makefile.am
		- Implement the Connection.Active D-Bus interface

	* src/nm-manager.c
		- (get_property, nm_manager_class_init): add ACTIVE_CONNECTIONS property
		- (nm_manager_activate_device): return the active connection path
		- (connection_added_default_handler, impl_manager_activate_connection):
			return the active connection to the caller
		- (add_one_connection_element, impl_manager_get_active_connections):
			remove
		- (impl_manager_deactivate_connection): new function; deactivate an
			active connection

	* libnm-glib/nm-device.c
	  libnm-glib/nm-device.h
		- Remove Deactivate() function



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3484 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-20 19:56:12 +00:00
Dan Williams fbb5062271 2008-03-19 Dan Williams <dcbw@redhat.com>
* introspection/nm-manager.xml
	  introspection/nm-manager-client.xml
		- Rename the ActivateDevice method to ActivateConnection to better
			reflect it's usage; it's arguments get reordered a bit too
		- Convert GetActiveConnections method return from a struct to a dict

	* include/NetworkManager.h
		- Define the dict keys for return value of GetActiveConnections

	* src/nm-manager.c
		- impl_manager_activate_device -> impl_manager_activate_connection
		- (add_one_connection_element): return a populated hash table, not
			a structure

	* libnm-glib/nm-client.c
	  libnm-glib/nm-client.h
		- nm_client_activate_device -> nm_client_activate_connection
		- nm_client_free_active_connection_element -> nm_client_free_active_connections_element
		- (nm_client_get_active_connections): return a GSList of GHashTables,
			instead of the custom structures.  Each element of the returned list
			must be freed with nm_client_free_active_connections_element()



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3482 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-19 20:58:21 +00:00
Dan Williams 70e79d60dd 2008-03-17 Dan Williams <dcbw@redhat.com>
Split the 802.1x bits out of the wireless-security setting so they are
	generalized enough for wired 802.1x to use too.

	* introspection/nm-exported-connection.xml
		- GetSecrets now returns 'a{sa{sv}}' (a hash of settings hashes) instead
			of just a hash of the secrets for one setting

	* libnm-util/nm-setting-wireless-security.c
	  libnm-util/nm-setting-wireless-security.h
		- Remove 802.1x-specific stuff
		- Added leap-username and leap-password properties for old-school LEAP

	* src/nm-device.c
	  src/nm-device.h
		- (connection_secrets_updated_cb): take a list of updated settings names,
			not just one

	* src/supplicant-manager/nm-supplicant-config.c
	  src/supplicant-manager/nm-supplicant-config.h
		- (nm_supplicant_config_add_setting_wireless_security): remove 802.1x
			specific stuff; fix for updated LEAP bits; punt 802.1x stuff
			to nm_supplicant_config_add_setting_8021x()
		- (nm_supplicant_config_add_setting_8021x): add an 802-1x setting to
			the supplicant config

	* src/nm-device-802-11-wireless.c
		- (build_supplicant_config): pass in the 802.1x setting too, if any
		- (real_connection_secrets_updated): take a list of updated settings
			names, not just one

	* src/nm-device-802-3-ethernet.c
	  src/nm-cdma-device.c
	  src/nm-gsm-device.c
		- (real_connection_secrets_updated_cb): take a list of updated settings
			names, not just one

	* src/nm-activation-request.c
	  src/nm-activation-request.h
		- (nm_act_request_class_init): the 'connection-secrets-updated' signal
			now passes a list of updated settings names, not just one
		- (update_one_setting): new function; handle one updated setting
		- (get_secrets_cb): handle multiple settings returned from the
			settings service; have to be careful of ordering here as there are
			some dependencies between settings (ex. wireless-security and 802.1x
			in some cases)

	* src/marshallers/nm-marshal.list
		- new marshaller for connection-secrets-updated signal

	* libnm-util/nm-setting-8021x.c
		- Add back the 'pin' and 'psk' settings, for EAP-SIM and EAP-PSK auth
			methods
		- (verify): a valid 'eap' property is now required

	* libnm-util/nm-connection.c
		- (register_default_settings): add priorities to settings; there are
			some dependencies between settings, and during the need_secrets
			calls this priority needs to be respected.  For example, only the
			wireless-security setting knows whether or not the connection is
			going to use 802.1x or now, so it must be asked for secrets before
			any existing 802.1x setting is
		- (nm_connection_lookup_setting_type): expose

	* libnm-util/nm-setting-wireless.c
		- (verify): should verify even if all_settings is NULL; otherwise won't
			catch the case where there is missing security

	* libnm-util/nm-setting-wireless-security.c
		- Remove everything to do with 802.1x
		- Add old-school LEAP specific properties for username and password
		- (need_secrets): rework LEAP secrets checking
		- (verify): rework for LEAP and 802.1x verification



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3470 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-17 19:37:23 +00:00
Dan Williams ea7fd7fffd 2008-03-12 Dan Williams <dcbw@redhat.com>
Harmonize the 802.11 bitrate API

	* introspection/nm-access-point.xml
		- 'Rate' -> 'MaxBitrate'; clarify units

	* introspection/nm-device-802-11-wireless.xml
		- Clarify units of 'Bitrate'

	* src/NetworkManagerAP.c
	  src/NetworkManagerAP.h
		- (set_property, get_property, nm_ap_class_init): rename 'rate'
			property to 'max-bitrate'
		- (foreach_property_cb): convert rate to Kb/s

	* src/nm-device-802-11-wireless.c
		- (nm_device_802_11_wireless_get_bitrate): return rate in Kb/s

	* libnm-glib/nm-access-point.c
	  libnm-glib/nm-access-point.h
		- 'rate' -> 'max-bitrate'

	* test/nm-tool.c
	  libnm-glib/libnm-glib-test.c
		- Fix up for these changes



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3432 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-12 17:44:39 +00:00
Dan Williams f30cf17bf7 2008-03-12 Dan Williams <dcbw@redhat.com>
Move the 'carrier' property from NMDevice to NMDevice8023Ethernet;
	convert the libnm-glib NMDevice8023Ethernet to cached properties

	* introspection/nm-device-802-3-ethernet.xml
		- New 'Carrier' property
		- New 'PropertiesChanged' signal

	* introspection/nm-device.xml
		- Remove 'Carrier' property
		- Remove 'CarrierChanged' signal

	* src/nm-device-interface.c
	  src/nm-device-interface.h
		- (nm_device_interface_init): remove 'carrier' property and
			'carrier-changed' signal

	* src/nm-device.c
	  src/nm-device.h
		- (nm_device_get_carrier, nm_device_set_carrier): remove
		- (nm_device_activate_stage5_ip_config_commit): don't bother updating
			the link here; wired device will handle that
		- (handle_dhcp_lease_change): don't bother updating link here
		- (get_property, nm_device_class_init): remove carrier property

	* src/nm-device-802-11-wireless.c
		- (real_update_link, nm_device_802_11_wireless_class_init): remove
			real_update_link(); wireless devices don't use carrier at all
		- (link_timeout_cb, supplicant_iface_state_cb_handler,
		   supplicant_iface_connection_state_cb_handler,
		   supplicant_mgr_state_cb_handler): remove anything to do with carrier

	* src/nm-device-802-3-ethernet.c
	  src/nm-device-802-3-ethernet.h
		- (nm_device_802_3_ethernet_carrier_on,
		   nm_device_802_3_ethernet_carrier_off, constructor): use set_carrier()
			instead of nm_device_set_carrier()
		- (device_state_changed): update link from sysfs on activation;
			replaces real_update_link()
		- (real_update_link): remove, replaced by device_state_changed()
		- (nm_device_802_3_ethernet_get_carrier, set_carrier): new functions
		- (nm_device_802_3_ethernet_get_speed): move up with other getters/setters
		- (real_get_generic_capabilities, real_can_interrupt_activation): use
			new get_carrier function
		- (get_property): add 'carrier' property
		- (nm_device_802_3_ethernet_class_init): add 'carrier' property and
			hook into property-changed signal helper

	* src/NetworkManagerPolicy.c
		- (device_carrier_changed): will only ever be called with a wired device
		- (device_added): only hook up to carrier-changed for wired devices

	* libnm-glib/nm-device.c
	  libnm-glib/nm-device.h
		- (constructor, nm_device_class_init): remove carrier-changed signal
		- (device_carrier_changed_proxy): remove; unused
		- (nm_device_get_carrier): remove; carrier a property of wired devices

	* libnm-glib/nm-device-802-3-ethernet.c
	  libnm-glib/nm-device-802-3-ethernet.h
		- Convert to cached properties like AP and Wireless objects
		- (nm_device_802_3_ethernet_get_hw_address): now returns a 'const char *'
			instead of a 'char *', return value should not be freed
		- (nm_device_802_3_ethernet_get_carrier): return current carrier status
		- (constructor): hook into properties-changed helper
		- (set_property, get_property): new functions
		- (nm_device_802_3_ethernet_class_init): export GObject properties

	* test/nm-tool.c
		- (detail_device): strdup the wired hardware address too since it's
			cached now

	* libnm-glib/libnm-glib-test.c
		- (dump_wired): strdup the wired hardware address too since it's
			cached now



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3428 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-12 16:12:39 +00:00
Dan Williams bc07d81a78 Clarify temporal validity of the IP4Config property
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3422 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-11 21:29:37 +00:00
Tambet Ingo cc2675ebb1 Implement PPPoE.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3418 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-11 16:37:41 +00:00
Dan Williams bf974b6aa4 2008-03-07 Dan Williams <dcbw@redhat.com>
Change manager's StateChange signal to StateChanged for consistency.

	* introspection/nm-manager.xml
		- Add 'StateChanged' signal
		- Move 'StateChange' down to the deprecated section

	* src/nm-hal-manager.c
		- (nm_hal_manager_new): connect to 'state-changed' instead

	* src/NetworkManagerPolicy.c
		- (nm_policy_new): connect to 'state-changed' instead

	* src/nm-manager.c
	  src/nm-manager.h
		- (nm_manager_update_state): emit both 'state-changed' and 'state-change'
		- (nm_manager_class_init): add 'state-changed' and not the deprecation
			of 'state-change'

	* libnm-glib/nm-client.c
	  libnm-glib/nm-client.h
		- (constructor, nm_client_class_init, client_state_changed_proxy):
			track and proxy 'state-changed' instead of 'state-change'



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3393 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-07 23:17:48 +00:00
Dan Williams d84a51a145 Fix distcheck errors
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3390 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-07 19:40:51 +00:00
Tambet Ingo e7bdd56bcd Squashed commit of the following:
commit 736e888c683a2b630310c5fb3119fdb0466df223
Author: Tambet Ingo <tambet@gmail.com>
Date:   Fri Mar 7 10:44:36 2008 -0600

    Rework ppp-manager to set up dbus service instead of doing it in pppd plugin.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3388 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-07 18:04:59 +00:00
Dan Williams 8ffe21b65f 2008-02-27 Dan Williams <dcbw@redhat.com>
Patch from Will Stephenson <wstephenson@kde.org>

	* Makefile.am
	  configure.in
		- Set up spec autogeneration infrastructure

	* docs/NetworkManager DBUS API.txt
		- Note how old this doc is and where to look for the canonical
			D-Bus specification

	* introspection/*
		- Add annotations and comments



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3345 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-02-28 02:07:21 +00:00
Dan Williams fd0ab916c8 2008-02-20 Dan Williams <dcbw@redhat.com>
* Global rename of NMConnectionSettings -> NMExportedConnection to cut down
		on confusing names

	* Add 'path' and 'scope' properties to NMConnection since both NM and the
		applet were having to hack this in anyway.  Remove the 'path' stuff from
		NMExportedConnection

	* Internally rename NMConnectionType -> NMConnectionScope

	* Provide default implementations of the 'get_id' and 'get_settings' methods
		of NMExportedConnection



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3334 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-02-20 22:37:39 +00:00
Tambet Ingo db5a10dc4d 2007-11-28 Tambet Ingo <tambet@gmail.com>
Merge the beginnings of the new GSM card support.

        * src/ppp-manager/nm-ppp-manager.c (nm_ppp_manager_stop): Remove
        * the
        ppp watch source before killing pppd - If this happens from
g_object_unref()
        then the ppp manager is already destroyed by the time the watch
callback runs.

        * src/nm-hal-manager.c: Add a device_type_name string to the
        * device
        creators, so that we can print a nice human readable string when
a
        device is added.

        * src/nm-umts-device.c (automatic_registration_get_network):
        * Query
        for the activated network, not much is done with the result
thought.

        * src/nm-serial-device.c (nm_serial_device_get_reply):
        * Implement.
        (ppp_ip4_config): Change the device state to activated here for
now.
        (real_check_connection): Make sure the connection includes ppp
setting.

        * libnm-glib/nm-client.c (get_device): Handle umts devices.

        * libnm-glib/Makefile.am: Add the new files to build.

        * libnm-glib/nm-umts-device.c: 
        * libnm-glib/nm-umts-device.h: Implement.

2007-11-26  Tambet Ingo  <tambet@gmail.com>

        * src/nm-umts-device.c (automatic_registration_get_network): For
        * now, dial
        immediately, nm_serial_device_get_reply() isn't implemented
correctly yet.

        * src/nm-serial-device.c (wait_for_reply_info_destroy): Don't
        * try to remove
        the timeout source - this function is only called when the
timeout source has
        been removed.
        (nm_serial_device_wait_for_reply): Allocate the duplicate
responses array
        to be big enough to contain the terminating zero element as
well.
        The timeout argument is meant to be in seconds now.
        (real_deactivate_quickly): Implement.

        * src/NetworkManager.conf: Allow root to own 
        "org.freedesktop.NetworkManager.PPP", deny it for everybody
else.

        * libnm-util/nm-setting-umts.c: Network type and band properties
        * are ints,
        (not unsigned ints).

        * libnm-util/nm-setting-serial.c (nm_setting_serial_class_init):
        * Fix a 
        small issue with parity bounds - capital letters have lower
ascii codes
        than lower case letters.

        * libnm-util/nm-connection.c (register_default_settings):
        * Register serial
        and umts settings.

2007-11-22  Tambet Ingo  <tambet@gmail.com>

        Remove the "index" property from devices as not all device types
have this.

        * include/NetworkManager.h (NM_DBUS_PATH_DEVICE): Remove.

        * src/nm-hal-manager.c (nm_get_device_index_from_hal): Remove.
        (wired_device_creator): Get the device interface from hal to
create the device.
        (wireless_device_creator): Ditto.

        * src/nm-device.c (nm_device_init): Remove the index member.
        (constructor): Remove the checks for index property, make
interface property
        a require constructor property.
        Use the HAL udi for DBus path for devices.
        (nm_device_get_index): Remove.
        (set_property): Remove index handling.
        (get_property): Ditto.
        (nm_device_get_dbus_path): Remove.

        * src/nm-device-interface.c (nm_device_interface_init): Remove
        * the index
        property.

        * src/nm-device-802-3-ethernet.c
        * (nm_device_802_3_ethernet_link_activated):
        Access the device index through it's interface.
        (nm_device_802_3_ethernet_link_deactivated): Ditto.
        (nm_device_802_3_ethernet_new): Remove the useless argument
test_dev. Remove
        index argument. Add interface argument.

        * src/nm-device-802-11-wireless.c
        * (nm_device_802_11_wireless_new): Remove
        the useless test_dev argument. Remove index argument. Add
interface arugment.

        * src/NetworkManagerSystem.c
        * (nm_system_device_set_from_ip4_config): Get the
        device index through interface.
        (nm_system_set_mtu): Ditto.

        * introspection/nm-device.xml: Remove the "Index" property.

2007-11-21  Tambet Ingo  <tambet@gmail.com>

        * src/nm-serial-device.c: 
        * src/nm-serial-device.c: 
        * src/nm-umts-device.c:
        * src/nm-umts-device.h: Implement.

        * src/nm-hal-manager.c (nm_get_device_driver_name):
        * libhal_free_string the string 
        allocated by libhal.
        (modem_device_creator): Implement.
        (register_built_in_creators): Register the modem creator.

        * src/nm-device-802-11-wireless.c
        * (nm_device_802_11_wireless_new): 
        Remove the unused test_dev argument.

        * src/nm-device-802-3-ethernet.c (nm_device_802_3_ethernet_new):
        * Ditto.

        * src/Makefile.am: Add new files to build.
        Link in ppp-manager.

        * libnm-util/nm-setting-umts.c: 
        * libnm-util/nm-setting-umts.h: 
        * libnm-util/nm-setting-serial.c: 
        * libnm-util/nm-setting-serial.h: Implement.

        * libnm-util/Makefile.am: Add new files to build.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3116 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-11-29 14:38:07 +00:00
Dan Williams 792b14dec4 2007-10-26 Dan Williams <dcbw@redhat.com>
Patch from Helmut Schaa <hschaa@suse.de> (and more bits from me)

	* src/NetworkManagerAP.c
	  src/NetworkManagerAP.h
	  libnm-glib/nm-access-point.c
	  libnm-glib/nm-access-point.h
		- Make 'rate' property a guint32 to better match with WEXT and
			wpa_supplicant and to allow representation of higher bitrates

	* src/nm-device-802-11-wireless.c
	  introspection/nm-device-802-11-wireless.xml
	  libnm-glib/nm-device-802-11-wireless.c
	  libnm-glib/nm-device-802-11-wireless.h
		- Make 'bitrate' property a guint32 to match AP 'rate' property type

	* src/nm-device-802-3-ethernet.c
	  src/nm-device-802-3-ethernet.h
	  introspection/nm-device-802-3-ethernet.xml
	  libnm-glib/nm-device-802-3-ethernet.c
	  libnm-glib/nm-device-802-3-ethernet.h
		- Make 'speed' property a guint32 to match other speed/rate types
		- Make nm_device_802_3_ethernet_get_speed() static

	* test/nm-tool.c
		- Update for the changes above



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3030 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-27 02:58:32 +00:00
Dan Williams 42a732d9b9 2007-10-19 Dan Williams <dcbw@redhat.com>
Split the GetSecrets() call off to a separate D-Bus interface so that it
	can be more easily locked down with D-Bus policy.  Only 'root' (ie, NM)
	should be able to call GetSecrets().

	* include/NetworkManager.h
		- Define the connection secrets D-Bus interface

	* src/vpn-manager/nm-vpn-connection.c
		- (clear_need_auth): get the right proxy object for the connection
			secrets interface
		- (get_connection_secrets): use the connection secrets proxy; send
			empty hints in get secrets request

	* src/nm-activation-request.c
		- (nm_act_request_request_connection_secrets): use the connection
			secrets proxy; send empty hints in get secrets request

	* src/nm-manager.c
	  src/nm-manager.h
		- (connection_get_settings_cb): set the connection secrets proxy on
			the connection object too
		- (internal_new_connection_cb): create the connection secrets proxy

	* introspection/nm-settings-connection.xml
		- Define Connection.Secrets interface and move GetSecrets there
		- Add a 'hints' argument to GetSecrets

	* libnm-glib/nm-settings.c
	  libnm-glib/nm-settings.h
		- (impl_connection_settings_get_secrets): add 'hints' argument



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2989 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-19 04:55:05 +00:00
Tambet Ingo 7e2a621f0a 2007-10-15 Tambet Ingo <tambet@gmail.com>
Implement killswitch polling through HAL.

        * src/nm-manager.c: Add wireless hardware status property. Add 
        'properties-changed' signal for changes in wireless and wireless
hardware
        state changes.

        * src/nm-hal-manager.c: Poll hal for killswitch statuses in
        * every 6 seconds
        and update NMManager's wireless hardware state when it has
changed.
        (nm_hal_manager_new): Don't try to add initial devices here -
(hal_init)
        already does that.

        * libnm-glib/nm-client.c: Add wireless hardware status property.
        * Cache the
        values of wireless state and wireless hardware state. Listen for
the
        'properties-changed' signals, update the cached values and emit
notify.

        * include/NetworkManager.h: Fix a typo in a comment.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2975 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-15 14:46:37 +00:00
Dan Williams 7732fd87d6 2007-10-04 Dan Williams <dcbw@redhat.com>
* introspection/nm-device-802-11-wireless.xml
	  src/nm-device-802-11-wireless.h
	  src/nm-device-802-11-wireless.c
		- Add a PropertiesChanged signal for wireless device
		- Store currently associated access point
		- (periodic_update): generalize; update rate here too and emit the
			correct PropertiesChanged signal when stuff changes
		- (real_deactivate_quickly, nm_device_802_11_wireless_dispose,
		   real_activation_cancel_handler): clear current_ap when device is
			deactivated
		- (link_to_specific_ap, get_ap_blacklisted,
		   nm_device_802_11_wireless_get_best_ap): remove obsolete and unused
			code
		- (nm_device_802_11_wireless_get_bitrate): make static; unused anywhere
			outside this file
		- (real_set_hw_address): emit property changed signal if the card's
			MAC address changes
		- (real_act_stage1_prepare): set the initial current_ap to the AP
			the card is supposed to be connecting to
		- (activation_success_handler): send out property updates on successful
			activation
		- (get_property): pull bitrate from cached value; use OBJECT_PATH type
			for ACTIVE_ACCESS_POINT property because sometimes there won't be
			one and dbus-glib doesn't like marshalling NULL G_TYPE_OBJECTs
		- (nm_device_802_11_wireless_class_init): ACTIVE_ACCESS_POINT property
			is now boxed; add PropertiesChanged signal



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2934 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-04 20:26:31 +00:00
Dan Williams fc8130ddd0 2007-10-03 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
	  src/nm-device-802-11-wireless.h
	  introspection/nm-device-802-11-wireless.xml
		- GetActiveNetworks -> GetAccessPoints
		- ActiveNetwork -> ActiveAccessPoint
		- NetworkAdded -> AccessPointAdded
		- NetowrkRemoved -> AccessPointRemoved

	* libnm-glib/nm-device-802-11-wireless.c
	  libnm-glib/nm-device-802-11-wireless.h
		- network-added signal -> access-point-added
		- network-removed signal -> access-point-removed
		- nm_device_802_11_wireless_get_active_network() ->
			nm_device_802_11_wireless_get_active_access_point()
		- nm_device_802_11_wireless_get_network_by_path() ->
			nm_device_802_11_wireless_get_access_point_by_path()
		- nm_device_802_11_wireless_get_networks() ->
			nm_device_802_11_wireless_get_access_points()

	* libnm-glib/libnm-glib-test.c
	  test/nm-tool.c
	  src/NetworkManagerPolicy.c
		- Fixups for Network -> AccessPoint



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2928 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-03 18:20:35 +00:00
Dan Williams f9fd8667d1 2007-10-03 Dan Williams <dcbw@redhat.com>
Add a GetActiveConnections() method on the Manager object.

	* src/nm-manager.c
	  src/nm-manager.h
	  introspection/nm-manager.xml
		- (connection_get_settings_cb): keep connection type around too
		- (impl_manager_get_active_connections, add_one_connection_element):
			implement; returns all active connections and what devices they
			apply to

	* libnm-glib/nm-client.c
	  libnm-glib/nm-client.h
	  introspection/nm-manager-client.xml
		- (nm_client_get_devices): GPtrArray elements are allocated and owned
			by the caller; free here to avoid memory leak
		- (nm_client_get_active_connections): implement; return the list of
			active connections
		- (nm_client_free_active_connection_element): implement; free an element
			of the GSList returned by nm_client_get_active_connections()



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2927 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-03 14:48:25 +00:00
Dan Williams e5b834c1f9 2007-10-01 Dan Williams <dcbw@redhat.com>
* include/NetworkManagerVPN.h
		- define VPN connection state change reason codes

	* src/vpn-manager/Makefile.am
	  src/vpn-manager/nm-vpn-marshal.list
	  src/vpn-manager/nm-vpn-marshal-main.c
		- Add marshallers for StateChanged signal

	* introspection/nm-vpn-connection.xml
		- New Banner property
		- StateChanged signal now includes a 'reason' argument

	* src/vpn-manager/nm-vpn-connection.c
	  src/vpn-manager/nm-vpn-connection.h
		- Add a "Banner" property that contains the returned VPN server login
			banner (if any); valid only in the ACTIVATED state
		- (nm_vpn_connection_set_state, nm_vpn_connection_disconnect): now takes
			a 'reason' argument and emits that reason along with the
			state-changed signal
		- Fix up calls to nm_vpn_connection_set_state() to include a reason
		- (nm_vpn_connection_ip4_config_get): save banner for later
		- (nm_vpn_connection_get_banner, get_property,
		   nm_vpn_connection_class_init): implement Banner property

	* src/vpn-manager/nm-vpn-service.c
		- (nm_vpn_service_connections_stop): take a reason argument; copy the
			connection list because elements may get added/removed from it
			while iterating over the list
		- (connection_state_changed): signal now includes the 'reason' argument

	* libnm-glib/nm-vpn-connection.c
	  libnm-glib/nm-vpn-connection.h
		- (nm_vpn_connection_get_banner): new function
		- (state_changed_proxy): handle reason argument



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2916 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-01 17:57:36 +00:00
Tambet Ingo 485bcfe571 2007-09-28 Tambet Ingo <tambet@gmail.com>
* src/nm-manager.c:
        * src/nm-manager.h:
        Implement device activation through NMManager.
        Implement "pending device activation" here - If the connection
isn't found,
        we try to wait for up to 5 seconds for the connection to be
provided.
        Add NMConnectionType argument to "connection-added" and
"connection-removed"
        signals.
        (nm_manager_get): Remove. Finally.

        * src/nm-activation-request.c: 
        * src/nm-activation-request.h: 
        Remove all the deferred activation code.

        * src/nm-device.c: Remove all the deferred activation code. Once
        * the device
        activation is started, it's started. Update the activation
virtual function
        signature.

        * src/nm-device-interface.c:
        * src/nm-device-interface.h:
        Device activation now takes only NMActRequest argument.
        Don't expose device activation directly on dbus, it's supposed
to go through
        NMManager now.

        * src/NetworkManagerPolicy.c (nm_policy_device_change_check):
        * Make the code
        a bit more compact.
        Use the new device activation methods through NMManager.

        * introspection/nm-manager-client.xml: 
        * introspection/nm-manager.xml: 
        * libnm-glib/nm-client.c:
        * libnm-glib/nm-client.h:
        Add device activation method.
        
        * libnm-glib/nm-device.c: 
        * libnm-glib/nm-device.h: 
        * introspection/nm-device.xml: 
        Remove device activation method. It's done through NMManager
now.

        * src/vpn-manager/nm-vpn-manager.c (impl_vpn_manager_connect):
        * Use the shiny
        new (nm_manager_get_device_by_path) function, get rid of our own
)find_device).



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2915 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-01 15:38:39 +00:00
Dan Williams d7696ae510 2007-09-26 Dan Williams <dcbw@redhat.com>
* introspection/nm-vpn-plugin.xml
	  libnm-glib/nm-vpn-plugin.c
	  libnm-glib/nm-vpn-plugin.h
		- (impl_vpn_plugin_need_secrets): implement a call that should return
			the name of the NMSetting in an NMConnection that may require
			secrets specific to that VPN plugin



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2892 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-27 02:20:53 +00:00
Tambet Ingo 571812b40c 2007-09-26 Tambet Ingo <tambet@gmail.com>
* libnm-glib/nm-vpn-plugin.c (nm_vpn_plugin_connect): Update the
        * plugin activation
        method.
        (impl_vpn_plugin_connect): Convert properties hash to
NMConnection, activate, and
        unreference the connection.

        * introspection/nm-vpn-plugin.xml: Modify the 'Connect' method
        * arguments: instead of
        passing properties hash and routes string list, pass
NMConnection (in hashed form).

        * src/vpn-manager/nm-vpn-connection.c
        * (nm_vpn_connection_get_routes): Return routes
        as GSList, no need to copy stuff around anymore.
        (nm_vpn_connection_activate): Update the plugin activation
method.

        * src/NetworkManagerSystem.c
        * (nm_system_vpn_device_set_from_ip4_config): Convert
        routes argument to GSList.

        * vpn-daemons/vpnc/src/nm-vpnc-service.c (real_connect):
        The arguments have changed, update.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2890 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-26 15:42:09 +00:00
Dan Williams 04f8d563fa 2007-09-25 Dan Williams <dcbw@redhat.com>
* introspection/nm-device.xml
	  libnm-glib/nm-device.c
	  libnm-glib/nm-device.h
		- Add 'Carrier' property to exported NMDevice objects

	* src/nm-device-interface.h
	  src/nm-device-interface.c
	  src/nm-device.c
		- Add a 'carrier' property to internal NMDevice objects



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2884 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-25 17:30:01 +00:00
Dan Williams 1817c62082 2007-09-25 Dan Williams <dcbw@redhat.com>
Properly re-query secrets from the settings daemon when stuff fails.

	* src/nm-device-802-11-wireless.c
		- (ap_auth_enforced): handle static WEP correctly here by differentiating
			between Shared Key and Open System auth modes
		- (link_timeout_cb, supplicant_connection_timeout_cb,
		   real_act_stage4_ip_config_timeout): clear existing secrets and
			request new ones when something fails due to a suspected wrong key
		- (real_act_stage2_config): fix for new request_new argument to
			nm_manager_get_connection_secrets()

	* src/nm-manager.c
	  src/nm-manager.h
		- (nm_manager_get_connection_secrets): return error status; pass
			new request_new argument on to the settings daemon

	* introspection/nm-settings-connection.xml
		- New 'request_new' argument to the GetSecrets call that hints to the
			settings daemon to ask the user for completely new secrets

	* libnm-glib/nm-settings.c
	  libnm-glib/nm-settings.h
		- (impl_connection_settings_get_secrets): handle new 'request_new'
			argument



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2872 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-25 06:21:38 +00:00
Dan Williams 9496e413c7 2007-09-24 Dan Williams <dcbw@redhat.com>
* introspection/nm-manager.xml
	  src/nm-manager.c
		- (impl_manager_legacy_state): fix 'state' method call return value



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2865 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-24 21:26:56 +00:00
Dan Williams 73792d12eb Fix distcheck
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2831 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-20 11:37:14 +00:00
Dan Williams 174d339a34 2007-09-20 Dan Williams <dcbw@redhat.com>
* introspection/nm-settings-connection.xml
	  libnm-glib/nm-settings.c
	  libnm-glib/nm-settings.h
		- Make GetSecrets asynchronous on the server side



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2829 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-20 09:22:42 +00:00
Tambet Ingo 6746319495 2007-09-20 Tambet Ingo <tambet@gmail.com>
* libnm-util/nm-connection.c (register_default_creators): Use
        * defined
        setting names. Register NMSettingVPN and NMSettingVPNProperties.

        * libnm-util/nm-setting.c: Define property name strings, use
        * them.
        Implement NMSettingVPN and NMSettingVPNProperties settings.
        Implement NM_S_TYPE_GVALUE_HASH.
        (nm_setting_populate_from_hash): Handle NM_S_TYPE_GVALUE_HASH.
        (setting_connection_verify): Rename 'devtype' property to
'type'.

        * introspection/nm-vpn-manager.xml: Use NMConnection for VPN
        * service
        properties.

        * src/vpn-manager/nm-vpn-service.c: Ditto.

        * src/vpn-manager/nm-vpn-connection.c: Ditto.

        * src/vpn-manager/nm-vpn-manager.c (nm_vpn_manager_connect):
        * Ditto.
        (nm_vpn_manager_new): Remove NMManager argument, it's easy
enough to get.

        * src/nm-device-802-11-wireless.c (find_best_connection): Use
        * defined setting
        names. NMSettingConnection->devtype got renamed to 'type'.

        * src/nm-device-802-3-ethernet.c (find_best_connection):
        (real_get_best_connection): Ditto.

        * src/NetworkManager.c (main): Update the vpn manager creation
        * arguments.

        * libnm-glib/nm-vpn-manager.[ch]: Update.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2826 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-20 06:47:15 +00:00
Dan Williams d92897393e 2007-09-19 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerAP.c
	  src/NetworkManagerAP.h
	  introspection/nm-access-point.xml
		- Change strength-changed signal into a properties-changed signal
			for all properties, not just strength.  Export that signal over dbus
			so listeners don't have to poll NM for changes.
		- (nm_ap_export_to_dbus, nm_ap_new): not every NMAccessPoint should
			get exported over D-Bus, so break up the logic and let other bits
			decided when to export the AP
		- (nm_ap_new_from_ap): remove, unused

	* src/nm-device-802-11-wireless.c
		- (merge_scanned_ap): only export APs that are actually on the device
			list, not every AP created internally

	* libnm-glib/nm-access-point.c
	  libnm-glib/nm-access-point.h
		- Cache properties internally and only hit DBus when needed.  Get
			property updates from NM signals



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2825 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-19 20:44:37 +00:00
Tambet Ingo 326d1e8679 2007-09-12 Tambet Ingo <tambet@gmail.com>
* src/vpn-manager/nm-vpn-connection.[ch]: 
        * src/vpn-manager/nm-vpn-manager.[ch]:
        * src/vpn-manager/nm-vpn-service.[ch]: Rewrite the vpn handling
        * code. Using 
        dbus-glib, GObjects, signals etc.

        * libnm-glib/nm-vpn-manager.[ch]: 
        * libnm-glib/nm-vpn-connection.[ch]: Now that the NM
        * implementation changed
        so much, rewrite these too.

        * libnm-glib/Makefile.am: Add new files to build, build new
        * binding files for
        the new introspection files.

        * libnm-glib/nm-client.[ch]: Remove all VPN related stuff from
        * here.

        * libnm-glib/nm-dbus-utils.[ch]: Renamed from nm-utils.[ch] that
        * was shadowing
        the header with the same name from libnm-utils.

        * libnm-glib/nm-vpn-plugin.[ch]: Implement.

        * libnm-util/Makefile.am: Add nm-utils.[ch] to build.

        * introspection/nm-vpn-plugin.xml: Implement.

        * introspection/nm-vpn-connection.xml: Implement.

        * introspection/nm-vpn-manager.xml: Implement.

        * src/NetworkManagerSystem.c
        * (nm_system_vpn_device_set_from_ip4_config): Remove
        the named manager argument, it can just as easily get it as the
caller.
        (nm_system_vpn_device_unset_from_ip4_config): Ditto.

        * src/vpn-manager/nm-dbus-vpn.[ch]: Remove.

        * src/nm-dbus-manager.h: Fix up the name_owner signal signature.

        * src/dhcp-manager/nm-dhcp-manager.c (garray_to_string): Remove,
        * use one from
        libnm-utils.

        * libnm-util/nm-connection.c: Ditto.

        * src/NetworkManagerMain.h: Remove, it's finally empty.

        * configure.in: Remove utils/ from build.

        * include/NetworkManagerVPN.h: Add some more defines to reduce
        * the amount
        of hard-coded strings.

        * utils/: Move it over to libnm-util.

        * test/Makefile.am: Link against libnm-util now that util/ is
        * gone.

        * dispatcher-daemon/Makefile.am: Ditto.

        * src/Makefile.am: Ditto.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2798 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-12 16:23:53 +00:00
Dan Williams ab4aa2d752 2007-09-11 Dan Williams <dcbw@redhat.com>
* introspection/nm-device.xml
	  libnm-glib/nm-device.c
	  libnm-glib/nm-device.c
		- Fix Activate call argument borkage; Activate takes 3 arguments



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2789 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-11 19:33:29 +00:00