3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-23 22:42:37 +01:00
Commit Graph

31 Commits

Author SHA1 Message Date
James Prestwood
d2f14b2951 client: add station command "get-bsses"
This command will get the BasicServiceSet list for a given network.
If no network is supplied, its assumed to be the current network.
2024-08-12 12:10:58 -05:00
James Prestwood
73c79dbd41 client: refactor cmd_connect() and add find_network()
This will do all the lookup/searching needed to find a network
proxy object.
2024-08-12 12:10:58 -05:00
Yuki Sireneva
91f7253ae1 client: use display_table_row for IPv6 in station
IPv6 address entry was not updated to use display_table_row which led to
a shifted line in table, as shown below:

    $ iwctl station wlan0 show | head | sed 's| |.|g'
    .................................Station:.wlan0................................
    --------------------------------------------------------------------------------
    ..Settable..Property..............Value..........................................
    --------------------------------------------------------------------------------
    ............Scanning..............no...............................................
    ............State.................connected........................................
    ............Connected.network.....Clannad.Legacy...................................
    ............IPv4.address..........192.168.1.12.....................................
    ............IPv6.address........fdc3:541d:864f:0:96db:c9ff:fe36:b15............
    ............ConnectedBss..........cc:d8:43:77:91:0e................................

This patch aligns IPv6 address line with other lines in the table.

Fixes: 35dd2c0821 (client: update station to use display_table_row, 2022-07-07)
2024-07-23 18:52:51 -05:00
Neehar Vijay
c63783ee89 client: fix extra newlines in station show
This change removes duplicate calls to display_table_footer(), in
station show.

Before this change, the bug caused an extra newline to be output every
time the table updated. This only occurred when the network was
disconnected.

    $ iwctl
    [iwd]# station wlan0 show
2022-11-02 16:39:59 -05:00
James Prestwood
fce1bb60a8 client: fix station autocomplete with multiple phys
The limitations of readline required that the autocompletion choose
a 'default' device. With multiple phys this doesn't work. Now the
readline limitation has been worked around and station can look up
the device for the command completion.
2022-08-11 15:47:15 -05:00
James Prestwood
9aefec6124 client: allow entity name to be passed to completion
There is a limitation of libreadline where no context/userdata
can be passed to completion functions. Thi affects iwctl since
the entity value isn't known to completion functions.

Workarounds such as getting the default device are employed but
its not a great solution.

Instead hack around this limitation by parsing the prompt to
extract the entity (second arg). Then use a generic match function
given to readline which can call the actual match function and
include the entity.
2022-08-11 15:47:02 -05:00
James Prestwood
0b68601c10 client: make COLOR_* macros take a string input
The existing color code escape sequences required the user to set the
color, write the string, then unset with COLOR_OFF. Instead the macros
can be made to take the string itself and automatically terminate the
color with COLOR_OFF. This makes for much more concise strings.
2022-07-07 14:09:03 -05:00
James Prestwood
35dd2c0821 client: update station to use display_table_row
This includes updating diagnostics too, otherwise the output becomes
really nasty.
2022-07-07 14:09:03 -05:00
Denis Kenzior
4b1ce76549 client: Don't try to print addresses if not connected 2021-10-26 14:34:00 -05:00
Denis Kenzior
93a06769c4 client: Print IP Addresses / hint about netconfig
When station 'show' is invoked, parse and print any IP addresses
associated with the interface.

If iwd network configuration is disabled and no IP addresses were
configured, print a hint to the user that a DHCP client might need to be
configured.
2021-10-25 17:25:18 -05:00
Sean Anderson
1134e55150 client: Show WEP networks as unsupported
WEP networks are not supported by iwd. However, the only indication is the
message "Operation not supported" while trying to connect. It is not clear
enough that this is due to intentional lack of support (as opposed to some
kind of misconfiguration). This patch explicitly lists WEP networks shown
with get-networks as unsupported. Hopefully this will make it clearer for
those of us not as familiar with iwd.
2021-04-30 13:10:43 -05:00
James Prestwood
4913a4dd6e client: re-enable iwctl refresh for 'station <wlan> show'
When diagnostics got added to iwctl the refresh capabilities were
accidentally removed. This re-enables refresh.
2021-03-29 13:11:50 -05:00
James Prestwood
5370fefdad client: update to work with diagnostic changes
The diagnostic interface will now only come up when station is
connected. This avoids the need for display station to return
a 'connected' out parameter. We can instead just see that
the diagnostic interface doesn't exist.
2021-02-03 13:37:19 -06:00
James Prestwood
053afbf19b client: update station to use diagnostic_display 2021-01-22 15:02:35 -06:00
James Prestwood
1f8f209c04 client: add station diagnostic information to 'show'
The information requested with GetDiagnostics will now appear in
the "station <iface> show" command. If IWD is not connected, or
there is no diagnostic interface (older IWD version) 'show' will
behave as it always has, only showing scanning/connected.
2021-01-19 13:10:12 -06:00
Marcel Holtmann
89e476d992 client: Use include path from top source directory 2019-12-13 09:02:42 +01:00
Marcel Holtmann
152b56a12a treewide: Move the Intel copyright forward to 2019 2019-10-25 00:43:08 +02:00
Tim Kourt
a5928f0e4c client: Simplify printing logic 2019-10-16 15:50:02 -05:00
Tim Kourt
acbba6028b client: Remove unused interface 2019-03-21 17:02:20 -05:00
Tim Kourt
569ffdd508 client: Add 'show' command to device in station mode 2019-02-26 12:33:26 -06:00
Denis Kenzior
5d1e24568f client: Reword station/ap/adhoc list command help
This also fixes a typo in station list help that refers to Station
devices as 'Ad-Hoc'
2018-11-29 20:34:10 -06:00
Tim Kourt
b0e5b9de02 client: Optimize network property lookups 2018-11-12 11:10:23 -06:00
Denis Kenzior
48b74d6531 client: Update to the new GetHiddenAccessPoints API 2018-11-09 14:06:20 -06:00
Tim Kourt
19f45d9752 client: Implement GetHiddenStations API 2018-11-09 11:34:43 -06:00
Denis Kenzior
405de7019c client: Unify device sibling interface arg completion
Station, WSC, Ad-Hoc and AP family_arg_completion functions were
identical except for which commands they were referencing and the
interface type they were interested in.  Combine all these into a single
function.
2018-09-14 22:59:19 -05:00
Denis Kenzior
304d328bf3 client: Move Device.GetOrderedNetworks to station 2018-09-14 21:45:08 -05:00
Denis Kenzior
8fd8852bf1 client: Move device connect method to station 2018-09-14 21:33:40 -05:00
Denis Kenzior
86e8b8c322 client: Move Device.ConnectHiddenNetwork to station 2018-09-14 21:27:55 -05:00
Denis Kenzior
189a96e91a client: Move Device.Scan method to Station 2018-09-14 21:20:33 -05:00
Denis Kenzior
81dd689611 client: Move Device.Disconnect to Station 2018-09-14 21:20:31 -05:00
Denis Kenzior
6b46beef45 client: Move properties from Device to Station 2018-09-14 21:12:11 -05:00