All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit 94ff799b authored by Christopher Alfeld's avatar Christopher Alfeld

Added device output.

parent 520ee2df
......@@ -6,6 +6,9 @@ if {$scriptdir == "."} {set scriptdir [pwd]}
set updir [file dirname $scriptdir]
source $updir/ir/libir.tcl
load $updir/lib/
set DB [sql connect]
sql selectdb $DB tbdb
namespace import TB_LIBIR::ir
......@@ -79,7 +82,15 @@ foreach link [array names ipmap] {
[lindex $ipmap($link) 0] \
[lindex $t 1] [lindex $ipmap($link) 1]]
if {$verbose == 1} {
puts [format "%-20s %-15s %-20s %-15s" "" $macmap([lindex $ipmap($link) 0]) "" $macmap([lindex $ipmap($link) 1])]
set smac $macmap([lindex $ipmap($link) 0])
set dmac $macmap([lindex $ipmap($link) 1])
sql query $DB "select IFC from interfaces where mac = \"$smac\""
set sifc [sql fetchrow $DB]
sql endquery $DB
sql query $DB "select IFC from interfaces where mac = \"$dmac\""
set difc [sql fetchrow $DB]
sql endquery $DB
puts [format "%20s %-15s %20s %-15s" /dev/eth$sifc $smac /dev/eth$difc $dmac]
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