Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
08e87b81
Commit
08e87b81
authored
Apr 04, 2002
by
Shashi Guruprasad
Browse files
fix for change in output format of 'tmcc hostnames'
parent
cd97db56
Changes
2
Hide whitespace changes
Inline
Side-by-side
event/nsetrafgen/nseinput.tcl
View file @
08e87b81
...
...
@@ -6,10 +6,12 @@ proc getipaddr {name} {
set hostnamelist
[
split
[
exec tmcc hostnames
]
"
\n
"
]
foreach hostname $hostnamelist
{
scan $hostname
"NAME=%s LINK=%u IP=%s "
hname linknum ip
set hnametomatch
"
$hname-$linknum
"
if
{
$hnametomatch == $name
}
{
return $ip
scan $hostname
"NAME=%s IP=%s ALIASES=
\'
%s
\'
"
hname ip aliases
set aliaslist
[
split $aliases
" "
]
foreach alias $aliaslist
{
if
{
$alias == $name
}
{
return $ip
}
}
}
puts stderr
"NSE: Could not find ipaddress for
$name
"
...
...
event/nsetrafgen/nseinput.tcl.in
View file @
08e87b81
...
...
@@ -6,10 +6,12 @@ proc getipaddr {name} {
set hostnamelist [split [exec tmcc hostnames] "\n"]
foreach hostname $hostnamelist {
scan $hostname "NAME=%s LINK=%u IP=%s " hname linknum ip
set hnametomatch "$hname-$linknum"
if { $hnametomatch == $name } {
return $ip
scan $hostname "NAME=%s IP=%s ALIASES=\'%s\'" hname ip aliases
set aliaslist [split $aliases " "]
foreach alias $aliaslist {
if { $alias == $name } {
return $ip
}
}
}
puts stderr "NSE: Could not find ipaddress for $name"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment