]>
git.proxmox.com Git - mirror_iproute2.git/blob - ip/routel
5 # Script created by: Stephen R. van den Berg <srb@cuci.nl>, 1999/04/18
6 # Donated to the public domain.
8 # This script transforms the output of "ip" into more readable text.
9 # "ip" is the Linux-advanced-routing configuration tool part of the
13 test "X-h" = "X$1" && echo "Usage: $0 [tablenr [raw ip args...]]" && exit 64
17 ip route list table
"$@" |
18 while read network rest
28 broadcast|
local|unreachable
) via
=$network
40 echo "$network $via $src $proto $scope $dev $table"
43 format="%15s%-3s %15s %15s %8s %8s%7s %s\n";
44 printf(format,"target","","gateway","source","proto","scope","dev","tbl");
48 if(match(network,"/"))
49 { mask=" "substr(network,RSTART+1);
50 network=substr(network,0,RSTART);
58 printf(format,network,mask,via,src,proto,scope,dev,table);