Commit Graph

26 Commits

Author SHA1 Message Date
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
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
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
Jiří Klimeš
8846bd83ad cli: print_fields(): don't segfault when a value is not set 2010-03-24 12:47:53 +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š
3f92bb3c2e cli: fix a memory leak 2010-03-19 15:46:25 +01:00
Jiří Klimeš
8f5192ab49 cli: converting 'nmcli nm ...' outputs to new format 2010-03-19 14:53:08 +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