mirror_iproute2/bridge
Serhey Popovych f5b50a18ae utils: Introduce and use print_name_and_link() to print name@link
There is at least three places implementing same things: two in
ipaddress.c print_linkinfo() & print_linkinfo_brief() and one in
bridge/link.c.

They are diverge from each other very little: bridge/link.c does not
support JSON output at the moment and print_linkinfo_brief() does not
handle IFLA_LINK_NETNS case.

Introduce and use print_name_and_link() routine to handle name@link
output in all possible variations; respect IFLA_LINK_NETNS attribute to
handle case when link is in different namespace; use ll_idx_n2a() for
interface name instead of "<nil>" to share logic with other code (e.g.
ll_name_to_index() and ll_index_to_name()) supporting such template.

Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
2018-02-16 08:14:22 -08:00
..
.gitignore Add bridge command 2012-08-01 15:23:49 -07:00
br_common.h SPDX license identifiers 2017-11-24 12:21:35 -08:00
bridge.c SPDX license identifiers 2017-11-24 12:21:35 -08:00
fdb.c iplink: Use ll_name_to_index() instead of if_nametoindex() 2018-01-23 14:50:59 -08:00
link.c utils: Introduce and use print_name_and_link() to print name@link 2018-02-16 08:14:22 -08:00
Makefile SPDX license identifiers 2017-11-24 12:21:35 -08:00
mdb.c iplink: Use ll_name_to_index() instead of if_nametoindex() 2018-01-23 14:50:59 -08:00
monitor.c scrub out whitespace issues 2016-03-27 10:50:14 -07:00
vlan.c iplink: Use ll_name_to_index() instead of if_nametoindex() 2018-01-23 14:50:59 -08:00