Commit Graph

357 Commits

Author SHA1 Message Date
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
eab5851145 libnm-util: remove nm_warning/nm_info/nm_error macros
Clients need to do their own logging using glib or whatever; these
macros while somewhat helpful were not flexible and are not a
substitute for actual logging in the client.  g_warning, g_message,
and g_error are more suitable anyway.
2011-02-23 11:42:04 -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
Jiří Klimeš
106afbae50 cli: libnm-glib now uses enums for wired and WiFi capabilities 2011-02-21 16:38:02 +01:00
Jiří Klimeš
6982337f2f cli: use libnm-glib's nm_device_get_device_type() to get device type
And implement device_type_to_string() to convert the type to a string.
2011-02-21 16:28:51 +01:00
Jiří Klimeš
40b14e3c46 cli: libnm-glib now uses enums for NMAccessPoint flags accessors 2011-02-21 15:41:12 +01:00
Jiří Klimeš
a9a30eb08c cli: compare nmcli and NM versions
nmcli gets NM version and compares it with its own and complains
when they differ. This is to indicate that the results are not reliable,
because the API could differ. '--nocheck' switches the checks off.
2011-02-16 17:36:50 +01:00
Jiří Klimeš
25ae47598c cli: add VERSION field to 'nmcli nm' command 2011-02-16 14:43:15 +01: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
Jiří Klimeš
c6f479922e cli: print header while listing connections (nmcli -p con list)
It was removed by mistake when user connections were removed.
2011-02-14 17:01:33 +01:00
Jiří Klimeš
a6de5792d1 cli/build: make WiMAX support optional 2011-02-14 16:06:37 +01:00
Dan Williams
6d344a43e9 Merge remote-tracking branch 'origin/rm-userset'
There; it's merged.  Yay!
2011-02-12 22:51:12 -06:00
Jiří Klimeš
5f6b68862e cli: fix "format not a string literal and no format arguments" cc error
The string could contain printf format sequences.
2011-02-10 16:30:00 +01:00
Jiří Klimeš
f29b709590 cli: improve/add NM running checks
Check whether NetworkManager is running and return new error
NMC_RESULT_ERROR_NM_NOT_RUNNING when appropriate.
2011-02-10 14:39:47 +01:00
Jiří Klimeš
4242f18fb2 cli: don't poke NetworkManager D-Bus service names when it's not running
When getting status of NetworkManager via 'nmcli nm ...' and NetworkManager
is not running, do not call its D-Bus methods. It prevents NM to be implicitly
executed when configured as D-Bus activated service.
2011-02-10 01:54:04 +01:00
Dan Williams
5a14d17792 libnm-util: remove 802.1x PSK functions and defines
There was never a property for it anyway, so it never got serialized
across D-Bus, because it was folded into the "password" property in
wpa_supplicant between 0.5 and 0.6.
2011-01-28 13:48:54 -06:00
Dan Williams
b7259fd2a8 Merge remote branch 'origin/master' into rm-userset 2011-01-25 15:41:03 -06:00
Jiří Klimeš
36afce10a4 cli: add support for WWAN connections for 'nmcli con up' (bgo #640020) 2011-01-20 16:45:12 +01:00
Dan Williams
b5f3aa7120 libnm-glib: pass NMClient as first callback argument to activation callbacks
Better matches glib style.
2011-01-13 13:03:02 -06:00
Dan Williams
f9ceafd4a1 Merge remote branch 'origin/master' into rm-userset 2011-01-12 15:46:37 -06:00
Dan Williams
93486fc42e cli: add support for WiMAX devices and connections 2011-01-06 17:01:55 -06:00
Jiří Klimeš
592a1d4668 cli: add D-Bus object path field for APs (e.g.:nmcli -f NAME,SSID,BSSID,SIGNAL,DBUS-PATH dev wifi list) 2010-12-17 11:37:10 +01:00
Dan Williams
8f7aedc7e0 Merge remote branch 'origin/master' into rm-userset 2010-10-18 19:02:27 -05:00
Dan Williams
f62666dbff cli: don't crash if for some reason HW addresses aren't available (bgo #630534) 2010-09-27 16:29:56 -05:00
Dan Williams
8b41f70dd5 Merge remote branch 'origin/master' into rm-userset 2010-09-27 10:30:46 -05:00
Jiří Klimeš
b3aa9473c5 cli: add D-Bus object path field for devices (e.g.: nmcli -f device,dbus-path dev status) 2010-09-24 14:38:50 +02:00
Jiří Klimeš
b008a48636 cli: add D-Bus object path field for active connections (e.g.: nmcli -f name,uuid,dbus-path con status) 2010-09-22 12:26:44 +02:00
Jiří Klimeš
8b9e13b685 cli: add D-Bus object path field for connections' list (e.g.: nmcli -f name,dbus-path con list) 2010-09-20 15:05:47 +02:00
Jiří Klimeš
979b69142c cli: add 'nmcli nm enable' command
'enable' command queries and sets NetworkingEnabled property. It should be used
by users. Previous 'sleep' command that actually did enable/disable,
really calls Sleep() now and is not meant for common usage.
2010-09-17 14:56:21 +02:00
Daniel Gnoutcheff
7f8dc06dff remove nm-settings-connection-interface
NMSettingsConnectionInterface was created to allow the daemon and NM
clients to have common code that handled both system and user
connections. It's no longer needed now that user settings services are
gone.

This concludes the flattening of libnm-glib.
2010-08-06 20:53:37 -04:00
Daniel Gnoutcheff
c2f4b10ab5 libnm-glib: remove NMSettingsInterface
NMSettingsInterface was created to allow code to operate on a settings
service without caring about what kind of settings service it was. Now
that we have just one settings service, this is no longer needed.

More work needs to be done in order to handle errors and permission
settings in an appropriate manner.
2010-08-06 13:05:47 -04:00
Daniel Gnoutcheff
4d1681ef09 libnm-glib: merge nm-remote-settings{,-system}
Originally, nm-remote-settings was used by the daemon to monitor the
user settings service, and its subclass nm-remote-settings-system was
used by NM clients to monitor the system settings service. With user
settings services gone, this distinction is no longer needed. Simplify
things a bit and merge the classes.
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
Daniel Gnoutcheff
80f1421709 nmcli: also remove DBUS-SERVICE field
Missed this when removing user settings support. Connection service names also
become irrelevant without user settings services.
2010-08-06 13:05:46 -04:00
Daniel Gnoutcheff
c17d0b0980 nmcli: remove user settings support
Remove all support for user settings services from nmcli. Update its
manpage to reflect this.

Manpage edits also anticipate changes to be made in regards to how
secrets are managed.
2010-08-06 13:05:46 -04:00
Jiří Klimeš
28d5b67d84 cli: wait a bit even when '--nowait' is specified; for permissions check (rh #614866)
NetworkManager checks clients' permissions on requests, so nmcli mustn't quit too early
to give NM a chance to reach it on D-Bus.
2010-07-29 16:16:20 +02:00
Jiří Klimeš
2412792cfd cli: print IPv6 stuff for 'nmcli dev list' 2010-06-29 18:36:22 +02: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
Jiří Klimeš
32043b0036 cli: fix bssid in 802-11-wireless setting 2010-05-11 18:57:57 +02:00
Dan Williams
14bfae6802 cli: fix build on 32-bit platforms 2010-05-05 04:54:03 -07:00
Jiří Klimeš
d1f63c62f0 cli: align UTF-8 strings properly
Not all utf-8 characters occupy 1 screen column. Some may be 2-column
wide, some are unprintable - zero columns.
2010-04-26 17:32:18 +02:00
Jiří Klimeš
f53a2aeac9 cli: use the same version string as NetworkManager daemon 2010-04-26 11:05:36 +02:00
Jiří Klimeš
87bf00b3d7 cli: multiline mode is default for 'dev list' and 'con list id|uuid'
Option '--multiline' was replaced with '--mode tabular|multiline'.
It was neccessary to be able to switch to tabular output mode for
'dev list' and 'con list id|uuid' commands as they now print out
in multiline mode by default. All other commands are in tabular
mode by default.
2010-04-06 16:22:01 +02:00
Jiří Klimeš
c8bfe2fcf4 cli: use own code to output connection details (settings)
nmcli uses its own code to dump connections' details instead of
libnm-util's nm_connection_dump(). It allows to structure output
and present values of the settings according to nmcli needs.
2010-03-31 17:14:35 +02:00
Dan Williams
fb5987df76 cli: fix uninitialized variable usage and clean up a bit 2010-03-25 13:39:49 -07:00
Jiří Klimeš
8b0b9c29c1 cli: Remove obsolete print_table_* functions 2010-03-24 23:36:50 +01:00
Jiří Klimeš
1e329c5c0c cli: Convert SSID to a printable form
If SSID is a UTF-8 string, it is printed as it is, but enclosed in quotes.
Otherwise the bytes are converted to hex string (in uppercase).
The added quotes for UTF-8 string allow to disambiguate the two forms.
2010-03-24 23:28:00 +01:00
Jiří Klimeš
a91da03b65 cli: 'dev list' adjustments
Modifications are mainly for multiline mode to ease parsing - each
field name is prefixed with a section name.
'dev list' now also supports printing particular sections specifed via
'--fields' option.
2010-03-24 19:05:35 +01:00
Jiří Klimeš
31970798bc cli: add NMC_RESULT_ERROR_USER_INPUT code for bad invocation of nmcli 2010-03-24 13:42:47 +01:00