• Masatake YAMATO's avatar
    iproute: Show default type, table, proto and scope of route · 577e5a53
    Masatake YAMATO authored
    In "ip route show" output unicast type, main table, boot protocol and
    universe scope are hidden as default labels.
    
    Sometimes it is helpful to show the hidden label for people not enough
    familiar with routing subsystem to map the output of "ip route show" and
    kernel source code.
    
    With this patch "ip route show" with -d option shows the default labels.
    
    Example of difference of output with -d option:
    
        $ ./ip/ip -4   route show table all dev virbr1
        ...
        192.168.121.0/28  proto kernel  scope link  src 192.168.121.1
        ...
        $ ./ip/ip -4 -d  route show table all dev virbr1
        ...
        unicast 192.168.121.0/28  table main  proto kernel  scope link  src 192.168.121.1
        ...
    Signed-off-by: default avatarMasatake YAMATO <yamato@redhat.com>
    577e5a53
iproute.c 43.9 KB