iproute2/ip
Andy Gospodarek 5d295bb8e1 add support for brief output for link and addresses
This adds support for slightly less output than is normally provided by
'ip link show' and 'ip addr show'.  This is a bit better when you have a
host with lots of interfaces.  Sample output:

$ ip -br link show
lo               UNKNOWN        00:00:00:00:00:00 <LOOPBACK,UP,LOWER_UP>
p2p1             UP             08:00:27:ee:0b:3b <BROADCAST,MULTICAST,UP,LOWER_UP>
p7p1             UP             08:00:27:9d:62:9f <BROADCAST,MULTICAST,UP,LOWER_UP>
p8p1             DOWN           08:00:27:dc:d8:ca <NO-CARRIER,BROADCAST,MULTICAST,UP>
p9p1             UP             08:00:27:76:d9:75 <BROADCAST,MULTICAST,UP,LOWER_UP>
p7p1.100@p7p1    UP             08:00:27:9d:62:9f <BROADCAST,MULTICAST,UP,LOWER_UP>

$ ip -br -4 addr show
lo               UNKNOWN        127.0.0.1/8
p2p1             UP             192.168.56.2/24
p7p1             UP             70.0.0.1/24
p8p1             DOWN           80.0.0.1/24
p9p1             UP             10.0.5.15/24
p7p1.100@p7p1    UP             200.0.0.1/24

$ ip -br -6 addr show
lo               UNKNOWN        ::1/128
p2p1             UP             fe80::a00:27ff:feee:b3b/64
p7p1             UP             7000::1/8 fe80::a00:27ff:fe9d:629f/64
p8p1             DOWN           8000::1/8
p9p1             UP             fe80::a00:27ff:fe76:d975/64
p7p1.100@p7p1    UP             fe80::a00:27ff:fe9d:629f/64

$ ip -br addr show p7p1
p7p1             UP             70.0.0.1/24 7000::1/8 fe80::a00:27ff:fe9d:629f/64

v2: Now with color support!
v3: Better field width estimation (except netdev names to keep output at a
decent width) and whitespace fixup.

Signed-off-by: Andy Gospodarek <gospo@cumulusnetworks.com>
2015-08-31 16:24:10 -07:00
..
.gitignore Another .gitignore file. 2006-08-08 12:11:23 -07:00
Makefile iproute2: GENEVE support 2015-05-21 15:17:53 -07:00
ifcfg Remove trailing whitespace 2006-12-05 10:10:22 -08:00
ip.c add support for brief output for link and addresses 2015-08-31 16:24:10 -07:00
ip6tunnel.c iproute2: ip6_tunnel mode bugfixes: any,vti6 2014-11-02 11:48:43 -08:00
ip_common.h add support for brief output for link and addresses 2015-08-31 16:24:10 -07:00
ipaddress.c add support for brief output for link and addresses 2015-08-31 16:24:10 -07:00
ipaddrlabel.c libnetlink: add size argument to rtnl_talk 2015-05-27 13:00:21 -07:00
ipfou.c libnetlink: add size argument to rtnl_talk 2015-05-27 13:00:21 -07:00
ipl2tp.c libnetlink: add size argument to rtnl_talk 2015-05-27 13:00:21 -07:00
iplink.c add support for brief output for link and addresses 2015-08-31 16:24:10 -07:00
iplink_bond.c bond: fix return after invarg 2015-08-13 14:20:54 -07:00
iplink_bond_slave.c bonding: export 3ad actor and partner port state 2015-06-26 00:06:45 -04:00
iplink_bridge.c ip-link: remove unnecessary return 2015-08-13 14:12:33 -07:00
iplink_bridge_slave.c iplink: shortify printing the usage of link type 2015-08-12 09:05:57 -07:00
iplink_can.c can: Add support for CAN FD non-ISO feature 2015-02-05 10:35:24 -08:00
iplink_geneve.c iplink_geneve: add tos configuration at link creation 2015-06-25 15:16:31 -04:00
iplink_hsr.c ip link: Shortify printing the usage of link type 2014-10-09 08:29:47 -07:00
iplink_ipoib.c ip link: Shortify printing the usage of link type 2014-10-09 08:29:47 -07:00
iplink_ipvlan.c ip link: Add ipvlan support to the iproute2/ip util 2014-12-03 09:37:37 -08:00
iplink_macvlan.c ip link: Shortify printing the usage of link type 2014-10-09 08:29:47 -07:00
iplink_macvtap.c ip link: Shortify printing the usage of link type 2014-10-09 08:29:47 -07:00
iplink_vlan.c ip link: Shortify printing the usage of link type 2014-10-09 08:29:47 -07:00
iplink_vxlan.c vxlan: Group policy extension 2015-02-05 10:31:43 -08:00
ipmaddr.c ipmaddr: add whitespace around = 2013-03-14 13:44:25 -07:00
ipmonitor.c ipmonitor: allows to monitor in several netns 2015-05-21 15:28:56 -07:00
ipmroute.c mroute: "ip mroute show" not working when "to" and/or "from" is given 2015-06-25 08:47:07 -04:00
ipneigh.c libnetlink: add size argument to rtnl_talk 2015-05-27 13:00:21 -07:00
ipnetconf.c libnetlink: introduce rtnl_listen_filter_t 2015-05-21 15:28:56 -07:00
ipnetns.c ipnetns: make net namespace cache variable size 2015-08-12 08:53:31 -07:00
ipntable.c libnetlink: add size argument to rtnl_talk 2015-05-27 13:00:21 -07:00
ipprefix.c add a source addres length parameter to rt_addr_n2a 2015-03-24 15:45:23 -07:00
iproute.c support batching of ip route get commands 2015-07-20 14:55:19 -07:00
iprule.c libnetlink: add size argument to rtnl_talk 2015-05-27 13:00:21 -07:00
iptoken.c libnetlink: add size argument to rtnl_talk 2015-05-27 13:00:21 -07:00
iptunnel.c Fix changing tunnel remote and local address to any 2015-06-25 08:45:24 -04:00
iptuntap.c ip tuntap: Added missing commands in usage 2014-09-28 16:19:31 -07:00
ipxfrm.c xfrm: remove duplicated include 2015-07-27 14:36:53 -07:00
link_gre.c libnetlink: add size argument to rtnl_talk 2015-05-27 13:00:21 -07:00
link_gre6.c libnetlink: add size argument to rtnl_talk 2015-05-27 13:00:21 -07:00
link_ip6tnl.c libnetlink: add size argument to rtnl_talk 2015-05-27 13:00:21 -07:00
link_iptnl.c libnetlink: add size argument to rtnl_talk 2015-05-27 13:00:21 -07:00
link_veth.c ip link: Shortify printing the usage of link type 2014-10-09 08:29:47 -07:00
link_vti.c libnetlink: add size argument to rtnl_talk 2015-05-27 13:00:21 -07:00
link_vti6.c libnetlink: add size argument to rtnl_talk 2015-05-27 13:00:21 -07:00
routef ip/routef lifesaver 2007-07-10 18:29:20 -07:00
routel (Logical change 1.3) 2004-04-15 20:56:59 +00:00
rtm_map.c (Logical change 1.3) 2004-04-15 20:56:59 +00:00
rtmon.c libnetlink: introduce rtnl_listen_filter_t 2015-05-21 15:28:56 -07:00
rtpr (Logical change 1.3) 2004-04-15 20:56:59 +00:00
static-syms.c Fix build when shared libraries are disabled 2013-03-13 08:29:59 -07:00
tcp_metrics.c libnetlink: add size argument to rtnl_talk 2015-05-27 13:00:21 -07:00
tunnel.c ip/ip6tunnel: fix missing return value check 2015-07-27 14:37:47 -07:00
tunnel.h Fix FSF address in file headers 2013-12-06 15:05:07 -08:00
xfrm.h Fix FSF address in file headers 2013-12-06 15:05:07 -08:00
xfrm_monitor.c xfrm: remove duplicated include 2015-07-27 14:36:53 -07:00
xfrm_policy.c xfrm: remove duplicated include 2015-07-27 14:36:53 -07:00
xfrm_state.c xfrm: remove duplicated include 2015-07-27 14:36:53 -07:00