Commit Graph

194 Commits

Author SHA1 Message Date
Larry Reaves
5194a785fc cli: initialize 'selector' variable to please jhbuild 2011-10-06 12:21:08 +02:00
Jiří Klimeš
46b01cb057 cli: use libnm-util's constants for settings types 2011-09-06 16:04:12 +02:00
Jiří Klimeš
568820a309 cli: remove useless static function prototypes 2011-09-06 15:30:15 +02:00
Jiří Klimeš
c01db4ac51 cli: add 'nmcli con delete' command for removing configured connections 2011-09-06 15:07:58 +02:00
Jiří Klimeš
b7e853c362 cli: use nm_access_point_get_bssid() instead of nm_access_point_get_hw_address()
nm_access_point_get_hw_address() is deprecated in 0.9.
Also change 'hwaddr' parameter for 'nmcli dev wifi list' to 'bssid'. 'hwaddr'
still works but is deprecated and not documented any more.
2011-09-06 13:37:23 +02:00
Jiří Klimeš
2d4619421c cli: simplify find_device_for_connection() 2011-06-15 15:00:55 +02:00
Andreas Schwab
6780818974 cli: fix incorrect cast to time_t pointer 2011-05-30 12:13:34 +02: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
Jiří Klimeš
2a33ba8683 cli: use setting accessor helpers 2011-03-16 14:32:24 +01:00
Jiří Klimeš
653c4bc8a0 cli: update due to changes in libnm-glib's NMClient
nm_client_activate_connection() now uses NMConnection instead of
D-Bus connection path. Also, callback uses NMActiveConnection instead
of the path.
We can also remove the workaround waiting for "active-connections" change,
because the activation callback is now called *after* the NMActiveConnection
object is available in the active connections list.
2011-03-16 13:29:41 +01:00
Kjartan Maraas
6d0d302916 build: do the right thing with config.h (bgo #644664)
1) it shouldn't be included in headers
2) it should be the first thing included in source files
3) it's needed for getting translation right
2011-03-14 01:01:22 -05: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
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š
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š
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
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
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š
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
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š
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
14bfae6802 cli: fix build on 32-bit platforms 2010-05-05 04:54:03 -07: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
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
Jiří Klimeš
21638ff470 cli: convert 'dev list' to new format; checking options validity for terse 2010-03-22 18:43:28 +01:00
Jiří Klimeš
6ab52b33ee cli: print_fields() adjustments; error messages fixes 2010-03-20 14:08:06 +01:00
Jiří Klimeš
55949277bd cli: changing nmcli output to better fit both computer and human needs
The output is basically tabular with fields (columns) presenting specific pieces of info.
Each line represents a single object. It's possible to switch to multiline output using
'--multiline' option. In that mode single object is presented on more lines - each field
on its line.
Terse mode now uses ':' as field separator. It also escapes all occurences of ':' and '\'
inside field values to ease parsing. The escaping behaviour can be controlled through
'--escape' option. By default, escaping is switched on in tabular mode. When using terse
mode ('--terse'), '--fields' option is mandatory for specifying required fields. That helps
for flexibility and backwards compatibility.
Not all output is converted yet.
2010-03-18 15:39:15 +01:00
Jirka Klimes
c2ec07f17d cli: add initial pieces of nmcli 2010-02-25 09:52:30 -08:00