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-stable
Commits
e55e2479
Commit
e55e2479
authored
May 12, 2003
by
Leigh B. Stoller
Browse files
Parser changes for veth devices: "tb-set-useveth on/off"
parent
1d0322b8
Changes
3
Hide whitespace changes
Inline
Side-by-side
tbsetup/ns2ir/lanlink.tcl
View file @
e55e2479
...
...
@@ -159,9 +159,12 @@ LanLink instproc init {s nodes bw d type} {
# Allow user to control if link is emulated. Only links, not lans.
$self set emulated 0
# Allow user to turn of actual bw shaping on emulated links. Not lans.
# Allow user to turn of
f
actual bw shaping on emulated links. Not lans.
$self set nobwshaping 0
# Allow user to turn on veth devices on emulated links. Not lans.
$self set useveth 0
# A simulated lanlink unless we find otherwise
$self set simulated 1
# Figure out if this is a lanlink that has at least
...
...
@@ -494,11 +497,12 @@ LanLink instproc updatedb {DB} {
$self instvar uselinkdelay
$self instvar emulated
$self instvar nobwshaping
$self instvar useveth
var_import ::GLOBALS::pid
var_import ::GLOBALS::eid
foreach nodeport $nodelist
{
set nodeportraw
[
join $nodeport
":"
]
sql exec $DB
"insert into virt_lans (pid,eid,vname,member,delay,rdelay,bandwidth,rbandwidth,lossrate,rlossrate,cost,widearea,emulated,uselinkdelay,nobwshaping) values (
\"
$pid
\"
,
\"
$eid
\"
,
\"
$self
\"
,
\"
$nodeportraw
\"
,
$delay
(
$nodeport
),
$rdelay
(
$nodeport
),
$bandwidth
(
$nodeport
),
$rbandwidth
(
$nodeport
),
$loss
(
$nodeport
),
$rloss
(
$nodeport
),
$cost
(
$nodeport
),
$widearea
,
$emulated
,
$uselinkdelay
,
$nobwshaping
)"
sql exec $DB
"insert into virt_lans (pid,eid,vname,member,delay,rdelay,bandwidth,rbandwidth,lossrate,rlossrate,cost,widearea,emulated,uselinkdelay,nobwshaping
,usevethiface
) values (
\"
$pid
\"
,
\"
$eid
\"
,
\"
$self
\"
,
\"
$nodeportraw
\"
,
$delay
(
$nodeport
),
$rdelay
(
$nodeport
),
$bandwidth
(
$nodeport
),
$rbandwidth
(
$nodeport
),
$loss
(
$nodeport
),
$rloss
(
$nodeport
),
$cost
(
$nodeport
),
$widearea
,
$emulated
,
$uselinkdelay
,
$nobwshaping
,
$useveth
)"
}
}
tbsetup/ns2ir/nstb_compat.tcl
View file @
e55e2479
...
...
@@ -41,6 +41,7 @@ proc tb-force-endnodeshaping {onoff} {}
proc tb-set-multiplexed
{
link onoff
}
{}
proc tb-set-endnodeshaping
{
link onoff
}
{}
proc tb-set-noshaping
{
link onoff
}
{}
proc tb-set-useveth
{
link onoff
}
{}
Class Program
...
...
tbsetup/ns2ir/tb_compat.tcl.in
View file @
e55e2479
...
...
@@ -600,6 +600,17 @@ proc tb-set-noshaping {link onoff} {
$link set nobwshaping $onoff
}
#
# For emulated links, allow veth device to be used. Not a user option.
#
proc tb-set-useveth
{
link onoff
}
{
if
{[
$link
info class
]
!=
"Link"
}
{
perror
"
\[
tb-set-useveth]
$link
is not a link."
return
}
$link set useveth $onoff
}
#
# Control linkdelays for lans and links
#
...
...
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