Commit c21a0617 authored by Leigh B Stoller's avatar Leigh B Stoller

Add link multiplexing support, as an emulab extension.

parent 6fde5918
......@@ -1881,12 +1881,22 @@ sub GetTicketAuxAux($$$$$$$$$$)
}
}
#
# Look for shared and tagging attributes for the link.
#
my $isshared = 0;
my $emulated = 0;
my $encap = "default";
#
# Allow user to turn on link multiplexing. If multiplexing is on
# then set encapsulation to vlan. Might conflict with stuff below.
#
if (GeniXML::IsMultiplexedLan($linkref)) {
$emulated = 1;
$encap = "vlan";
}
#
# Look for shared and tagging attributes for the link.
#
if (my $shared_vlan = GeniXML::GetSharedLanName($linkref)) {
if ($shared_vlan !~ /^[-\w]*$/) {
$response =
......@@ -2250,6 +2260,7 @@ sub GetTicketAuxAux($$$$$$$$$$)
"vport" => $iface_vport,
"vindex" => $vindex,
"trivial_ok" => $trivial_ok,
"emulated" => $emulated,
"nobwshaping" => $besteffort,
"ip" => $ip,
"delay" => $latency,
......
......@@ -953,6 +953,14 @@ sub HasTagSetting($)
return scalar(@tagged);
}
sub HasMultiplexSetting($)
{
my ($link) = @_;
my @tmp = FindNodesNS("n:link_multiplexing", $link,
$EMULAB_NS)->get_nodelist();
return scalar(@tmp);
}
sub HasBestEffortSetting($)
{
my ($link) = @_;
......@@ -987,6 +995,19 @@ sub IsTaggedLan($)
return $result;
}
sub IsMultiplexedLan($)
{
my ($link) = @_;
my $result = 0;
my @tmp = FindNodesNS("n:link_multiplexing", $link,
$EMULAB_NS)->get_nodelist();
if (scalar(@tmp) > 0) {
my $enabled = GetText("enabled", $tmp[0]);
$result = defined($enabled) && $enabled eq "true";
}
return $result;
}
sub GetAddressPools($)
{
my ($rspec) = @_;
......
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