Skip to content
GitLab
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
65cc2bfc
Commit
65cc2bfc
authored
Jan 29, 2004
by
Robert Ricci
Browse files
Allow tb-set-multiplexed, tb-set-noshaping, and tb-set-useveth on LANs
as well as links.
parent
b4480193
Changes
2
Hide whitespace changes
Inline
Side-by-side
tbsetup/ns2ir/lanlink.tcl
View file @
65cc2bfc
...
...
@@ -163,13 +163,13 @@ LanLink instproc init {s nodes bw d type} {
# Both lans and links can get linkdelays.
$self set uselinkdelay 0
# Allow user to control if link is emulated.
Only links, not lans.
# Allow user to control if link is emulated.
$self set emulated 0
# Allow user to turn off actual bw shaping on emulated links.
Not lans.
# Allow user to turn off actual bw shaping on emulated links.
$self set nobwshaping 0
# Allow user to turn on veth devices on emulated links.
Not lans.
# Allow user to turn on veth devices on emulated links.
$self set useveth 0
# A simulated lanlink unless we find otherwise
...
...
tbsetup/ns2ir/tb_compat.tcl.in
View file @
65cc2bfc
...
...
@@ -567,36 +567,36 @@ proc tb-set-wasolver-weights {delay bw plr} {
}
#
# Control emulated for a link
(
lans not allowed yet
)
.
# Control emulated for a link
#
proc tb-set-multiplexed
{
link onoff
}
{
if
{[
$link
info class
]
!=
"Link"
}
{
perror
"
\[
tb-set-multiplexed]
$link
is not a link."
proc tb-set-multiplexed
{
lan
link onoff
}
{
if
{[
$
lan
link
info class
]
!=
"Link"
&&
[
$lanlink
info class
]
!=
"Lan"
}
{
perror
"
\[
tb-set-multiplexed]
$link
is not a link
or a lan
."
return
}
$link set emulated $onoff
$
lan
link set emulated $onoff
}
#
# For emulated links, allow bw shaping to be turned off
#
proc tb-set-noshaping
{
link onoff
}
{
if
{[
$link
info class
]
!=
"Link"
}
{
perror
"
\[
tb-set-noshaping]
$link
is not a link."
proc tb-set-noshaping
{
lan
link onoff
}
{
if
{[
$
lan
link
info class
]
!=
"Link"
&&
[
$lanlink
info class
]
!=
"Lan"
}
{
perror
"
\[
tb-set-noshaping]
$link
is not a link
or a lan
."
return
}
$link set nobwshaping $onoff
$
lan
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."
proc tb-set-useveth
{
lan
link onoff
}
{
if
{[
$
lan
link
info class
]
!=
"Link"
&&
[
$lanlink
info class
]
!=
"Lan"
}
{
perror
"
\[
tb-set-useveth]
$link
is not a link
or a lan
."
return
}
$link set useveth $onoff
$
lan
link set useveth $onoff
}
#
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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