Commit 65cc2bfc authored by Robert Ricci's avatar Robert Ricci
Browse files

Allow tb-set-multiplexed, tb-set-noshaping, and tb-set-useveth on LANs

as well as links.
parent b4480193
......@@ -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
......
......@@ -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 {lanlink onoff} {
if {[$lanlink info class] != "Link" && [$lanlink info class] != "Lan" } {
perror "\[tb-set-multiplexed] $link is not a link or a lan."
return
}
$link set emulated $onoff
$lanlink 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 {lanlink onoff} {
if {[$lanlink info class] != "Link" && [$lanlink info class] != "Lan" } {
perror "\[tb-set-noshaping] $link is not a link or a lan."
return
}
$link set nobwshaping $onoff
$lanlink 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 {lanlink onoff} {
if {[$lanlink info class] != "Link" && [$lanlink info class] != "Lan"} {
perror "\[tb-set-useveth] $link is not a link or a lan."
return
}
$link set useveth $onoff
$lanlink set useveth $onoff
}
#
......
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