Commit 3b2cadd2 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Print out the (new) netmask field from virt_routes in the link/lan

section.
parent 25188d29
...@@ -272,7 +272,7 @@ if ($showlinks) { ...@@ -272,7 +272,7 @@ if ($showlinks) {
} }
my $result = my $result =
DBQueryFatal("select vname,member,delay,bandwidth,lossrate, ". DBQueryFatal("select vname,member,mask,delay,bandwidth,lossrate, ".
"rdelay,rbandwidth,rlossrate ". "rdelay,rbandwidth,rlossrate ".
"from virt_lans where pid='$pid' and eid='$eid'". "from virt_lans where pid='$pid' and eid='$eid'".
"order by vname,member"); "order by vname,member");
...@@ -280,16 +280,16 @@ if ($showlinks) { ...@@ -280,16 +280,16 @@ if ($showlinks) {
if ($result->numrows) { if ($result->numrows) {
print "Virtual Lan/Link Info:\n"; print "Virtual Lan/Link Info:\n";
printf "%-15s %-15s %-15s %-9s %-9s %-9s\n", printf "%-15s %-15s %-15s %-9s %-9s %-9s\n",
"ID", "Member", "IP", "Delay", "BW (Kbs)", "Loss Rate"; "ID", "Member", "IP/Mask", "Delay", "BW (Kbs)", "Loss Rate";
print "--------------- --------------- --------------- --------- ". print "--------------- --------------- --------------- --------- ".
"--------- ---------\n"; "--------- ---------\n";
while (($vname,$member,$delay,$bandwidth,$lossrate, while (($vname,$member,$mask,$delay,$bandwidth,$lossrate,
$rdelay,$rbandwidth,$rlossrate) = $result->fetchrow_array()) { $rdelay,$rbandwidth,$rlossrate) = $result->fetchrow_array()) {
printf "%-15s %-15s %-15s %-9s %-9s %-9s\n", $vname, printf "%-15s %-15s %-15s %-9s %-9s %-9s\n", $vname,
$member, $ipmap{$member}, $delay, $bandwidth, $lossrate; $member, $ipmap{$member}, $delay, $bandwidth, $lossrate;
printf "%-15s %-15s %-15s %-9s %-9s %-9s\n", "", printf "%-15s %-15s %-15s %-9s %-9s %-9s\n", "",
"", "", $rdelay, $rbandwidth, $rlossrate; "", $mask, $rdelay, $rbandwidth, $rlossrate;
} }
print "\n"; print "\n";
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment