Commit Graph

133 Commits

Author SHA1 Message Date
Dan Williams
ab586236e3 core: implement update_connection() for Team 2013-11-08 16:35:18 -06:00
Dan Williams
2e9fde3c28 core: set up and tear down DCB/FCoE when DCB is enabled 2013-10-31 13:29:22 -05:00
Dan Winship
26544f3148 libnm-glib: change "Since: 0.9.10" to "Since: 0.9.8.6" for backported API 2013-09-11 14:10:55 -04:00
Dan Winship
07521da591 core: provide additional network connectivity information
NM_STATE_CONNECTED_SITE doesn't distinguish between "behind a captive
portal" and "limited network connectivity" (ie, connected to a router
that has lost its upstream connection). Add a new NMManager
:connectivity property to provide this information.

Also add a CheckConnectivity method, which can be used to force NM to
re-check the connectivity state, which could be called by a client
after it completed a portal login, or fixed a network problem.
2013-08-28 10:54:08 -04:00
Jiri Pirko
23836e8146 core: add support for team device
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
2013-08-15 10:54:15 -05:00
Dan Winship
a7068f48c5 Revert "platform, devices: add support for vxlan devices"
This requires a very recent kernel to even compile, and the kernel
code is still rapidly changing (eg, adding IPv6 support). So take it
out for now, until it stabilizes.

This reverts commit 7f0f04d106.
2013-06-04 10:30:30 -03:00
Dan Winship
d9e0a7cbd6 platform, devices: add support for gre and gretap devices 2013-06-04 10:01:14 -03:00
Dan Winship
7f0f04d106 platform, devices: add support for vxlan devices 2013-06-04 10:01:14 -03:00
Dan Winship
e9f364548a platform, devices: add support for macvlan and macvtap devices 2013-06-04 10:01:13 -03:00
Dan Winship
add316a403 platform, devices: add support for tun and tap devices 2013-06-04 10:01:13 -03:00
Dan Winship
4416155bea platform, devices: add support for veth devices
https://bugzilla.gnome.org/show_bug.cgi?id=687254
2013-05-24 16:10:03 -03:00
Dan Winship
ce4f2a4bd6 core, libnm-glib: add NMDeviceGeneric
Add NMDeviceGeneric, to provide generic support for unknown device
types, and create NMDeviceGenerics for those devices that NM
previously was ignoring. Allow NMSettingGeneric connections to be
activated on (managed) NMDeviceGenerics.
2013-05-07 12:46:56 -04:00
Dan Winship
fc700e9213 core: add NM_WIFI_DEVICE_CAP_ADHOC
Some wireless devices don't support Ad-Hoc mode. Expose this fact in
the wireless capabilities so that clients can disable the hot-spot
option if neither CAP_ADHOC nor CAP_AP is available.

https://bugzilla.gnome.org/show_bug.cgi?id=692869
2013-02-11 12:39:28 -05:00
Jiří Klimeš
d9c1fb176d include: document NM_DEVICE_TYPE_BRIDGE device type 2013-02-11 12:55:05 +01:00
Dan Williams
7258dd270f core: add the NM_ACTIVE_CONNECTION_STATE_DEACTIVATED state
We'll use this to know when to clean up and dispose of the
active connection in the manager.
2012-12-17 17:01:10 -06:00
Thomas Graf
cfff5a63d9 bridge: add bridge device type
This adds a new device type 'bridge'. Kernel devices are created
on demand.
2012-11-30 13:21:51 -06:00
Marc Ruiz
811c87f8ae typo: replace all misstyped 'seconadary' strings with 'secondary' 2012-11-04 23:08:02 +01:00
Jan Luebbe
f9c72dee3e wifi: support ap-mode with wpa_supplicant
A new value for NM80211Mode is introduced (NM_802_11_MODE_AP) and the
new mode is passed to wpa_supplicant analogous to adhoc-mode.
The places which need to know the interface mode have been extended to
handle the new mode.

If the configuration does not contain a fixed frequency, a channel is
selected the same way as with adhoc-mode before.
2012-10-17 12:08:11 -05:00
Jiří Klimeš
07fc3dcb90 api: add NM_DEVICE_STATE_REASON_SECONDARY_CONNECTION_FAILED reason and use that 2012-09-24 10:38:26 +02:00
Dan Williams
29fe6ec830 wifi: add SSID_NOT_FOUND reason and use it when we can
When the supplicant starts connecting, or gets disconnected, track
whether it ever starts talking to an AP.  Then if the connection fails
as a result of an initial connection timeout or a link timeout, we
can use SSID_NOT_FOUND when we're reasonably sure the AP doesn't
exist.  Clients can use this to show better error messages.

Note that SSID_NOT_FOUND may only be reported when using nl80211
drivers, as WEXT drivers don't provide the status necessary to
determine whether the network exists or not.
2012-09-20 10:11:36 -05:00
Dan Williams
e6061a1e96 api: add a "ModemManager unavailable" device state reason
To be used when MM quits unexpectedly, or isn't running and the
device needs MM.
2012-08-29 17:39:33 -05:00
Dan Williams
5deecdb871 docs: remove gtkdoc flags directives for NetworkManager.h
They aren't in the right place anyway (they need to be after the
'enum' and before the '{') and they aren't consistently used.  We'll
add them back later for everything if we need them.
2012-08-06 19:53:40 -05:00
Jiří Klimeš
b6c1e7586a include: document NM_DEVICE_TYPE_VLAN 2012-07-11 12:50:42 +02:00
Pantelis Koukousoulas
d125296eb1 adsl: initial PPPoE support for ADSL devices 2012-05-18 15:42:56 -05:00
Pantelis Koukousoulas
9039c24bf5 adsl: carrier handling and PPPoA support
This is the "juice" of the patch series. Initial cut at carrier handling
(by polling /sys/class/atm/$iface/carrier) and also support for calling
pppd with the proper command-line to achieve a connection.

Also implement the necessary boilerplate for the NM state machine to
be happy with our device.

This is a "duct tape and gum" implementation, i.e., prefer copy&paste
over proper refactoring, due to limited time, but the foundations are
now there, so we can make it work right slowly-slowly :)

With this patch, you can already test carrier management but not yet
make a complete connection.

Relevant extract from logs:
<info> (ueagle-atm0): carrier now ON (device state 20)
<info> (ueagle-atm0): device state change: unavailable -> disconnected (reason 'carrier-changed') [20 30 40]

Signed-off-by: Pantelis Koukousoulas <pktoss@gmail.com>
2012-05-18 15:42:55 -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 Williams
c02702e574 libnm-glib: add NMDeviceVlan
And fix a small bug with bond devices too if their device type
isnt' set at construction time.
2012-03-07 11:45:25 -06: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 Winship
6c38f0cfd1 libnm-glib: add NMDeviceBond
it exists on the server/D-Bus side, so it should exist in libnm-glib too
2012-03-05 15:55:43 -05: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
Jiří Klimeš
ff249e871f libnm-glib: add NMDeviceOlpcMesh 2012-02-28 10:29:03 +01: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 Winship
b860c7be4a infiniband: add transport-mode property
Add transport-mode property to NMSettingInfiniband (and parse it
correctly in ifcfg-rh), and set it up properly on the device in
NMDeviceInfiniband.
2012-01-26 09:58:48 -06:00
Dan Winship
e9cd59b654 libnm-glib: add NMDeviceInfiniband 2011-12-02 13:09:16 -06:00
Dan Winship
5366c3d6d4 wired: split NMDeviceWired out of NMDeviceEthernet and add NMDeviceInfiniband 2011-12-02 13:09:16 -06:00
Dan Winship
3dcfd305d6 trivial: three small obvious fixes 2011-11-17 13:25:14 -06:00
Thomas Bechtold
e8051a9b6f modem: map modemmanager errors more detailed
* add 4 new NMDeviceStateReason to map ModemManager errors more detailed
* fix wrong error mapping for MM_MODEM_CONNECT_ERROR_NO_DIALTONE
2011-11-14 17:31:40 -06:00
Dan Williams
e9d998835b wifi: check whether driver supports AP mode (nl80211 only)
For future use of wpa_supplicant's lightweight AP mode instead
of using Ad-Hoc for hotspot stuff.
2011-11-09 21:28:02 -06:00
Dan Williams
911328e520 docs: update NetworkManager.h code documentation 2011-08-22 20:33:07 -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
d208bbd4c4 api: document NM_DEVICE_STATE_FAILED 2011-03-17 13:42:21 -05:00
Giovanni Campagna
86e3d935a2 include: mark flags as such (bgo #643011) 2011-03-16 01:38:21 -05:00
Dan Williams
69f2c75956 api: fix up introspection and header documentation for modem consolidation 2011-03-03 20:16:16 -06:00
Dan Williams
1a590cce13 include: add NM_CHECK_VERSION define 2011-03-02 17:16:27 -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
11a68133c4 api: add NM_STATE_CONNECTED back to make life easier
alias for NM_STATE_CONNECTED_GLOBAL
2011-02-15 16:55:42 -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
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