Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-stable
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
emulab
emulab-stable
Commits
08e87b81
Commit
08e87b81
authored
Apr 04, 2002
by
Shashi Guruprasad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix for change in output format of 'tmcc hostnames'
parent
cd97db56
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
8 deletions
+12
-8
event/nsetrafgen/nseinput.tcl
event/nsetrafgen/nseinput.tcl
+6
-4
event/nsetrafgen/nseinput.tcl.in
event/nsetrafgen/nseinput.tcl.in
+6
-4
No files found.
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
Markdown
is supported
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