Commit Graph

233 Commits

Author SHA1 Message Date
Yu Watanabe e813de549b network: do not return error but return UINT64_MAX if speed meter is disabled
Fixes #14222.
2019-12-04 09:11:34 +01:00
Yu Watanabe 33ebda2e81 networkctl: fix to show BSSID
This fixes an issue caused by a typo in
78404d22cc.
2019-12-03 20:00:05 +01:00
Lennart Poettering 353b2baa20 tree-wide: clean up --help texts a bit
This cleans up and unifies the outut of --help texts a bit:

1. Highlight the human friendly description string, not the command
   line via ANSI sequences. Previously both this description string and
   the brief command line summary was marked with the same ANSI
   highlight sequence, but given we auto-page to less and less does not
   honour multi-line highlights only the command line summary was
   affectively highlighted. Rationale: for highlighting the description
   instead of the command line: the command line summary is relatively
   boring, and mostly the same for out tools, the description on the
   other hand is pregnant, important and captions the whole thing and
   hence deserves highlighting.

2. Always suffix "Options" with ":" in the help text

3. Rename "Flags" →  "Options" in one case

4. Move commands to the top in a few cases

5. add coloring to many more help pages

6. Unify on COMMAND instead of {COMMAND} in the command line summary.
   Some tools did it one way, others the other way. I am not sure what
   precisely {} is supposed to mean, that uppercasing doesn't, hence
   let's simplify and stick to the {}-less syntax

And minor other tweaks.
2019-11-18 15:14:43 +01:00
Yu Watanabe 8e1e87a5de tree-wide: drop double newline 2019-11-04 00:30:32 +09:00
Yu Watanabe 78404d22cc network: support matching based on wifi interfece type 2019-10-25 16:43:18 +09:00
Yu Watanabe 8dc85c5ef1 networkctl: introduce reconfigure method 2019-10-24 14:23:12 +09:00
Yu Watanabe e4857ee2f2 networkctl: use format_ifname_full() 2019-10-24 14:20:48 +09:00
Yu Watanabe d56d6cb8ca networkctl: fix error message 2019-10-24 14:20:48 +09:00
Yu Watanabe a227674cfb networkctl: add reload command 2019-10-24 14:20:42 +09:00
Zbigniew Jędrzejewski-Szmek 8d07de2534 networkctl: print ssid and bssid 2019-10-24 00:02:43 +02:00
Zbigniew Jędrzejewski-Szmek 172353b110 networkctl: create the sd_device structure just once
This is mostly in preparation for future changes: a proper freeing function
is now called on the LinkInfo items.
2019-10-24 00:02:43 +02:00
Zbigniew Jędrzejewski-Szmek 516e9c802f networkctl: split out helper function 2019-10-23 12:29:04 +02:00
Zbigniew Jędrzejewski-Szmek ceb366df29 networkctl: show carrier in green for loopback iface
We don't ever expect anything different, so let's hightlight
that carrier in this case is OK.
2019-10-23 11:10:32 +02:00
Zbigniew Jędrzejewski-Szmek ce2529b4a2 Highlight the synopsis and summary in --help
This doesn't cover all the binaries, but I don't know how to script
this, and I run out of steam ;)
2019-10-08 18:21:27 +02:00
Zbigniew Jędrzejewski-Szmek 9daa657836 networkctl: add missing dots in --help 2019-10-08 18:21:27 +02:00
Zbigniew Jędrzejewski-Szmek e1fac8a68a Move the Commands section above Options section
For executables which take a verb, we should list the verbs first, and
then options which modify those verbs second. The general layout of
the man page is from general description to specific details, usually
Overview, Commands, Options, Return Value, Examples, References.
2019-10-08 18:21:26 +02:00
Yu Watanabe 82d1264048
Merge pull request #11883 from yuwata/network-dhcp-renew
network: dhcp renew
2019-09-22 07:44:23 +02:00
Yu Watanabe 308e7dfdce networkctl: add renew command 2019-09-21 20:27:43 +09:00
Susant Sahani cdf01b36db networkctl: Display address is a DHCP4 address
CLoses https://github.com/systemd/systemd/issues/10839
2019-09-09 20:01:54 +05:30
Lennart Poettering e226badc9c networkctl: avoid outputting '(null)' for LLDP ports without description 2019-08-16 07:43:34 +09:00
Yu Watanabe 45160216b7 networkctl: TABLE_BPS requires uint64_t 2019-07-30 15:09:16 +02:00
Susant Sahani b24281aaca networkctl : Add support to display vxlan properties 2019-07-30 00:02:14 +09:00
Susant Sahani c82d1bf2b3 networkctl: Add support to display bridge properties 2019-07-30 00:02:02 +09:00
Yu Watanabe 8d0e0af2a0 networkctl: merge multiple table_add_cell() by using table_add_many() 2019-07-29 23:19:08 +09:00
Zbigniew Jędrzejewski-Szmek 4252171a94 tree-wide: use lowercase table headers
https://github.com/systemd/systemd/pull/13062#discussion_r303847484
> the formatter uppercases them anyway, and this way the JSON output of the
> formatter is nicer as it uses the table header fields 1:1 for the json
> output.
2019-07-16 14:29:04 +02:00
Yu Watanabe 49808e0e2d network: NDA_LLADDR attribute can also take struct in_addr 2019-07-11 22:22:29 +09:00
Yu Watanabe 64e7ebde8b networkctl: do not show '(null)' in HW Address entry
This also fixes indentation.
2019-06-30 10:46:35 +02:00
Yu Watanabe c967d2c7ce networkctl: show link speed, duplex, auto negotiation, and port 2019-06-20 04:42:55 +09:00
Yu Watanabe 42a63431d3 network: change type of BitRates= bus property 2019-06-19 23:15:19 +09:00
Yu Watanabe 5ca5048249 networkctl: fix use of uninitialized value 2019-06-13 10:13:57 +02:00
Zbigniew Jędrzejewski-Szmek aafec74d04
Merge pull request #12733 from keszybz/sd-bus-error-reporting
Bus error reporting improvements
2019-06-04 12:01:52 +02:00
Yu Watanabe 38b9af6154 networkctl: re-cast value stored in Set with INT_TO_PTR() 2019-06-04 09:08:55 +02:00
Zbigniew Jędrzejewski-Szmek 8210a61ad5 networkctl: log quietly if we fail to get bit rates
If we query older networked, they will be missing. This is not an error.
Also, make the error more informative, because the bus error itself might
be just "Unknown interface or property" which is not enough to understand
what is going on.
2019-06-04 08:37:04 +02:00
Yu Watanabe 81914d9f13 networkctl: drop unnecessary use of table_add_cell_full() 2019-06-03 16:43:18 +09:00
Yu Watanabe 335dd8ba13 networkctl: show link bit rates 2019-06-01 10:24:47 +09:00
Yu Watanabe a459b24f7e networkctl: optionally show link statistics 2019-06-01 10:24:47 +09:00
Zbigniew Jędrzejewski-Szmek 90e29fe1a5 networkctl: shorten Minimum/Maximum to min/max
This makes the output slightly "lighter" visually. min/max are well-established
forms, so there's no risk of misunderstanding. Also, not using title-case looks
a bit better.

Follow-up for c06ff86e25.

$ build/networkctl status '*'|grep MTU
                   MTU: 65536
                   MTU: 1500 (min: 68, max: 9000)
                   MTU: 1500 (max: 2048)
                   MTU: 1500 (min: 256, max: 2304)
                   MTU: 1500 (min: 68, max: 65535)
                   MTU: 1500 (min: 68, max: 65521)
                   MTU: 1500 (min: 68, max: 65535)
                   MTU: 1500 (max: 65535)
                   MTU: 1360 (min: 68, max: 65535)
2019-06-01 10:24:08 +09:00
Yu Watanabe c06ff86e25 networkctl: do not show zero maximum MTU 2019-05-31 10:55:07 +02:00
Yu Watanabe e2835111dd networkctl: fix memleak
Closes #12701.
2019-05-30 20:58:36 +09:00
Yu Watanabe 518a66ec08 tree-wide: replace if_indextoname() with format_ifname() 2019-05-29 14:21:19 +09:00
Yu Watanabe 658e910640 networkctl: use Table for 'lldp' command 2019-05-29 14:21:19 +09:00
Yu Watanabe 0232beed9c networkctl: use Table for 'label' command 2019-05-29 14:21:19 +09:00
Yu Watanabe 98d5bef3c5 networkctl: use Table for 'status' command 2019-05-29 14:21:19 +09:00
Yu Watanabe ff7c88a2f3 networkctl: use Table for 'list' command 2019-05-29 14:21:19 +09:00
Yu Watanabe 4bddccc684 networkctl: use parse_ifindex_or_ifname() 2019-05-29 13:22:01 +09:00
Susant Sahani 9cd8c76661 networkctl: add support to delete virtual netdevs
We now don't have the support to delete netdevs and dependent
upon iproute to delete. With this we can delete via networkctl
and use in our test cases too.

Note that it supports deleting multiple links at once.

```
 sudo ./networkctl delete test1 test2 test3 test4
```
2019-05-29 11:00:37 +09:00
Susant Sahani 0307afc681 networkctl: add support to display Transmit/Recieve queue length (#12633)
```
(networkctl) % build/networkctl status veth-test
● 13: veth-test
            Link File: /usr/lib/systemd/network/99-default.link
         Network File: /usr/lib/systemd/network/veth0.network
                 Type: ether
                State: routable (configured)
               Driver: veth
           HW Address: 8a:a6:1c:3f:a6:1a
                  MTU: 1500
          Minimum MTU: 68
          Maximum MTU: 65535
Transmit Queue Length: 1
 Receive Queue Length: 1
              Address: 192.168.5.31
                       fe80::88a6:1cff:fe3f:a61a
              Gateway: 192.168.5.1
                  DNS: 192.168.5.1
                  NTP: 192.168.5.1
            Time Zone: Asia/Kolkata
         Connected To: Zeus on port peer-test
```
2019-05-22 17:53:12 +09:00
Susant Sahani 2c73f59b81 networkctl: Add support to display min and max MTU
(networkctl) % ./networkctl status enp0s31f6                                                                                                                          ~/tt/networkctl/build
● 4: enp0s31f6
       Link File: /usr/lib/systemd/network/99-default.link
    Network File: n/a
            Type: ether
           State: n/a (unmanaged)
            Path: pci-0000:00:1f.6
          Driver: e1000e
          Vendor: Intel Corporation
           Model: Ethernet Connection (2) I219-LM
      HW Address: 8c:16:45:6c:83:b9 (LCFC(HeFei) Electronics Technology co., ltd)
             MTU: 1500
     Minimum MTU: 68
     Maximum MTU: 9000
2019-05-21 17:44:36 +05:30
Susant Sahani 4015d106d4 networkctl: Display MTU
Now the MTU is not displayed. with this patch it's fixed.

(networkctl) % ./networkctl status enp0s31f6                                                                                                                          ~/tt/networkctl/build
WARNING: systemd-networkd is not running, output will be incomplete.

● 4: enp0s31f6
       Link File: /usr/lib/systemd/network/99-default.link
    Network File: n/a
            Type: ether
           State: n/a (unmanaged)
            Path: pci-0000:00:1f.6
          Driver: e1000e
          Vendor: Intel Corporation
           Model: Ethernet Connection (2) I219-LM
      HW Address: 8c:16:45:6c:83:b9 (LCFC(HeFei) Electronics Technology co., ltd)
             MTU: 1500
2019-05-21 17:29:18 +05:30
Lennart Poettering e95be7def2
Merge pull request #12411 from keszybz/pr/12394
run: when emitting the calendarspec warning, use red
2019-05-08 10:11:32 -04:00
Zbigniew Jędrzejewski-Szmek 1a04395959 Enable log colors for most of tools in /usr/bin
When emitting the calendarspec warning we want to see some color.
Follow-up for 04220fda5c.

Exceptions:
- systemctl, because it has a lot hand-crafted coloring
- tmpfiles, sysusers, stdio-bridge, etc, because they are also used in
  services and I'm not sure if this wouldn't mess up something.
2019-05-08 09:50:21 +02:00
Yu Watanabe 67a4683364 network: use IN_ADDR_NULL and ETHER_ADDR_NULL
The change in manager_rtnl_process_address() may not be necessary,
but for safety, let's initialize the value.
2019-05-07 16:55:19 +02:00
Zbigniew Jędrzejewski-Szmek ca78ad1de9 headers: remove unneeded includes from util.h
This means we need to include many more headers in various files that simply
included util.h before, but it seems cleaner to do it this way.
2019-03-27 11:53:12 +01:00
Lennart Poettering 760877e90c util: split out sorting related calls to new sort-util.[ch] 2019-03-13 12:16:43 +01:00
Yu Watanabe c9cc038343 network: introduce 'degraded-carrier' operstate to order all states
Previously, 'degraded' state is ambiguous for bonding or bridge master:
1. one or more slave interfaces does not have carrier,
2. no link local address is assigned to the master,
3. combination of the above two.

This makes the above case 1 and 3 are in the new 'degraded-carrier'
state, and makes 'degraded' state as all slaves are active but no
link local address on master.
2019-03-13 14:29:00 +09:00
Yu Watanabe 85323805be networkctl: make enslaved operstate green 2019-02-18 18:04:18 +09:00
Yu Watanabe a696290474 networkctl: accept wildcards to specify links
Closes #10840.
2019-02-15 13:47:48 +09:00
Lennart Poettering 9a6f746fb6 locale-util: prefix special glyph enum values with SPECIAL_GLYPH_
This has been irritating me for quite a while: let's prefix these enum
values with a common prefix, like we do for almost all other enums.

No change in behaviour, just some renaming.
2018-12-14 08:22:54 +01:00
Zbigniew Jędrzejewski-Szmek 294bf0c34a Split out pretty-print.c and move pager.c and main-func.h to shared/
This is high-level functionality, and fits better in shared/ (which is for
our executables), than in basic/ (which is also for libraries).
2018-11-20 18:40:02 +01:00
Zbigniew Jędrzejewski-Szmek 4e2ca44233 networkctl: define main through macro 2018-11-20 16:48:21 +01:00
Zbigniew Jędrzejewski-Szmek 0221d68a13 basic/pager: convert the pager options to a flags argument
Pretty much everything uses just the first argument, and this doesn't make this
common pattern more complicated, but makes it simpler to pass multiple options.
2018-11-14 16:25:11 +01:00
Yu Watanabe 2c740afd16 tree-wide: do not assign unused return values 2018-09-23 17:18:50 +09:00
Yu Watanabe 93bab28895 tree-wide: use typesafe_qsort() 2018-09-19 08:02:52 +09:00
Lennart Poettering 37ec0fdd34 tree-wide: add clickable man page link to all --help texts
This is a bit like the info link in most of GNU's --help texts, but we
don't do info but man pages, and we make them properly clickable on
terminal supporting that, because awesome.

I think it's generally advisable to link up our (brief) --help texts and
our (more comprehensive) man pages a bit, so this should be an easy and
straight-forward way to do it.
2018-08-20 11:33:04 +02:00
Lennart Poettering 0c69794138 tree-wide: remove Lennart's copyright lines
These lines are generally out-of-date, incomplete and unnecessary. With
SPDX and git repository much more accurate and fine grained information
about licensing and authorship is available, hence let's drop the
per-file copyright notice. Of course, removing copyright lines of others
is problematic, hence this commit only removes my own lines and leaves
all others untouched. It might be nicer if sooner or later those could
go away too, making git the only and accurate source of authorship
information.
2018-06-14 10:20:20 +02:00
Lennart Poettering 818bf54632 tree-wide: drop 'This file is part of systemd' blurb
This part of the copyright blurb stems from the GPL use recommendations:

https://www.gnu.org/licenses/gpl-howto.en.html

The concept appears to originate in times where version control was per
file, instead of per tree, and was a way to glue the files together.
Ultimately, we nowadays don't live in that world anymore, and this
information is entirely useless anyway, as people are very welcome to
copy these files into any projects they like, and they shouldn't have to
change bits that are part of our copyright header for that.

hence, let's just get rid of this old cruft, and shorten our codebase a
bit.
2018-06-14 10:20:20 +02:00
Filipe Brandenburger d23c3e4c28 lldp: check that lldp neighbor raw data size is in expected range
This fixes an insecure use of tainted data as argument to functions that
allocate memory and read from files, which could be tricked into getting
networkctl to allocate a large amount of memory and fill it with file
data.

This was uncovered by Coverity. Fixes CID 1393254.
2018-06-08 08:54:25 +02:00
Lennart Poettering 4e964aa05c networkd,udev: clean up MTU handling
This cleans up handling of MTU values across the codebase. Previously
MTU values where stored sometimes in uint32_t, sometimes in uint16_t,
sometimes unsigned and sometimes in size_t. This now unifies this to
uint32_t across the codebase, as that's what netlink spits out, and what
the majority was already using.

Also, all MTU parameters are now parsed with config_parse_mtu() and
config_parse_ipv6_mtu() is dropped as it is now unneeded.

(Note there is one exception for the MTU typing: in the DCHPv4 code we
continue to process the MTU as uint16_t value, as it is encoded like
that in the protocol, and it's probably better stay close to the
protocol there.)
2018-04-26 13:51:44 +02:00
Zbigniew Jędrzejewski-Szmek 11a1589223 tree-wide: drop license boilerplate
Files which are installed as-is (any .service and other unit files, .conf
files, .policy files, etc), are left as is. My assumption is that SPDX
identifiers are not yet that well known, so it's better to retain the
extended header to avoid any doubt.

I also kept any copyright lines. We can probably remove them, but it'd nice to
obtain explicit acks from all involved authors before doing that.
2018-04-06 18:58:55 +02:00
Yu Watanabe 1cc6c93a95 tree-wide: use TAKE_PTR() and TAKE_FD() macros 2018-04-05 14:26:26 +09:00
Yu Watanabe ee5324aa04 tree-wide: voidify pager_open()
Even if pager_open() fails, in general, we should continue the operations.
All erroneous cases in pager_open() show log message in the function.
So, it is not necessary to check the returned value.
2018-03-19 21:04:02 +09:00
Yu Watanabe 15c3626e06 networkctl,hwdb: make verbs static 2018-03-19 21:03:35 +09:00
Jason A. Donenfeld b55822c349 networkd: clean up link_get_type_string returns
It's cleaner and more consistent to actually return what we were
planning on returning.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-01-29 21:08:39 +01:00
Jason A. Donenfeld fdce7817b9 networkd: clean up link_get_type_string
The return value is always ignored, so get rid of it.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-01-29 21:06:28 +01:00
Jason A. Donenfeld f119082e7a networkd: simplify and display all devtypes
Every place the kernel actually calls SET_NETDEV_DEVTYPE, it's adding a
piece of information that looks useful and relevant for us to use. So
let's use it when it's there.

The previous matching based on the corresponding ARPHRD didn't really
make much sense. The more sensible logic for getting a textual
representation of the link type is to see if the kernel supplies a
devtype. If it does, great. If not, then we can fall back on the ARPHRD,
as before.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-01-29 21:02:44 +01:00
Jason A. Donenfeld a18461bc7d networkd: display wireguard devtype
It's not useful to simply show "none", when we have more interesting
information to display.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-01-29 20:58:30 +01:00
Lennart Poettering fbd0b64f44
tree-wide: make use of new STRLEN() macro everywhere (#7639)
Let's employ coccinelle to do this for us.

Follow-up for #7625.
2017-12-14 19:02:29 +01:00
Zbigniew Jędrzejewski-Szmek 53e1b68390 Add SPDX license identifiers to source files under the LGPL
This follows what the kernel is doing, c.f.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5fd54ace4721fc5ce2bb5aef6318fcf17f421460.
2017-11-19 19:08:15 +01:00
Yu Watanabe 4c70109600 tree-wide: use IN_SET macro (#6977) 2017-10-04 16:01:32 +02:00
Susant Sahani d37b7627c2 networkctl: display address labels
```
 ./networkctl label

    Prefix/Prefixlen                          Label
        ::/0                                  1
    fc00::/7                                  5
    fec0::/10                                11
    2002::/16                                 2
    3ffe::/16                                12
 2001:10::/28                                 7
    2001::/32                                 6
::ffff:0.0.0.0/96                                 4
        ::/96                                 3
       ::1/128                                0

```
2017-06-27 10:15:27 -04:00
Zbigniew Jędrzejewski-Szmek 1cf03a4f8e systemctl,networkctl,busctl,backlight: use STRPTR_IN_SET 2016-09-24 20:22:05 -04:00
Zbigniew Jędrzejewski-Szmek 323b7dc903 tree-wide: rename draw_special_char to special_glyph
That function doesn't draw anything on it's own, just returns a string, which
sometimes is more than one character. Also remove "DRAW_" prefix from character
names, TREE_* and ARROW and BLACK_CIRCLE are unambigous on their own, don't
draw anything, and are always used as an argument to special_glyph().

Rename "DASH" to "MDASH", as there's more than one type of dash.
2016-05-09 15:17:57 -04:00
Beniamino Galvani 6afa676780 lldp: move public macros to sd-lldp.h and namespace them
lldp.h contains definitions of LLDP types, subtypes and capabilities which
should be exposed in public headers. Get rid of the file and move those
definitions to sd-lldp.h with the SD_ prefix.
2016-03-24 16:41:48 +01:00
Zbigniew Jędrzejewski-Szmek 2388b2f4d4 networkctl: avoid reading past end of input buffer
name is IFNAMSIZ bytes, but we would copy sizeof(info->name) bytes,
which is IFNAMSIZ + 1. In effect we would go outside of the source
buffer and possibly leave a non-null terminated string in info->name.

CID #1351754.
2016-03-04 21:45:45 -05:00
Zbigniew Jędrzejewski-Szmek 72e551f40b networkctl: use ETHER_ADDR_NULL in one more place 2016-03-04 21:45:45 -05:00
Zbigniew Jędrzejewski-Szmek 06fb28b16e Merge pull request #2671 from 0xAX/move-pager-open-to-one-place
tree-wide: merge pager_open_if_enabled() to the pager_open()
2016-02-25 15:29:59 -05:00
Alexander Kuleshov ea4b98e657 tree-wide: merge pager_open_if_enabled() to the pager_open()
Many subsystems define own pager_open_if_enabled() function which
checks '--no-pager' command line argument and open pager depends
on its value. All implementations of pager_open_if_enabled() are
the same. Let's merger this function with pager_open() from the
shared/pager.c and remove pager_open_if_enabled() from all subsytems
to prevent code duplication.
2016-02-26 01:13:23 +06:00
Thomas Hindoe Paaboel Andersen 404d53a968 networkctl: fix const 2016-02-23 20:40:51 +01:00
Zbigniew Jędrzejewski-Szmek 4c3160f150 networkctl: only print lldp legend for capabilities that were actually seen 2016-02-23 08:50:52 -05:00
Lennart Poettering d08191a242 networkctl: ellipsize long LLDP fields in table output 2016-02-21 20:58:59 +01:00
Lennart Poettering f5207c2206 networkctl: add missing newline to printf() format string 2016-02-21 20:58:59 +01:00
Lennart Poettering 58fb367825 networkctl: print a nice warning when networkd isn't running 2016-02-21 20:40:57 +01:00
Lennart Poettering 33d5013db0 networkctl: if there's no data from networkd about an iface show as "unmanaged"
After all, if we know that an interface exists but networkd did not store any
info about it, then it's definitely unmanaged by it.

(Note that we add this fix-up to networkctl, and not to sd-network, simply
because a missing file might also be result of the interface not existing.)
2016-02-21 20:40:57 +01:00
Lennart Poettering 4abd866d68 networkctl: add a couple of (void) casts
Where we knowingly ignore possible error results, let's cast to void.
2016-02-21 20:40:57 +01:00
Lennart Poettering b295beea88 networkd: rework how carrier bindings are serialized
Instead of serializing the interface name, expose the interface index, since
that's the only stable identifier.
2016-02-21 20:40:57 +01:00
Lennart Poettering 837f57da41 networkctl: extend "networkctl status" per-interface output to include LLDP info
This adds a small and useful field to the "systemctl status" output: the
router(s) the interface is connected to as reported via LLDP. Example output:

● 2: enp0s25
       Link File: /usr/lib/systemd/network/99-default.link
            Type: ether
           State: degraded (configured)
            Path: pci-0000:00:19.0
          Driver: e1000e
    Connected To: GS1900 on port 2 (foobar)

i.e. the last line is the relevant one.
2016-02-21 20:40:57 +01:00
Lennart Poettering 691d4da98a networkctl: make use of xsprintf() where we can 2016-02-21 20:40:57 +01:00
Lennart Poettering 7e5a080a94 networkctl: simplify networkctl
Move decode_and_sort_links() into acquire_info_all() which is the only place
this is used. The result is then nicely symmetric to acquire_info_strv().
2016-02-21 20:40:57 +01:00
Lennart Poettering b147503eb4 networkctl: rework interface data acquisition
Let's always use the same calls to acquire interface data. Specifically port
"networkctl status" to use acquire_link_info_strv() and acquire_link_info_all()
like the other calls.
2016-02-21 20:40:57 +01:00
Lennart Poettering e997c4b09d networkctl: extend "networkctl list" and "networctl lldp" to optionally take interface names
This way, the output may be reduced to only show data about the specified
interfaces.
2016-02-21 20:40:57 +01:00