Add a "GetUntaggedVLAN" func to return the VLAN that is untagged on this interface.

This commit is contained in:
Tim Young 2019-03-06 11:36:10 +03:00
parent fded1f454a
commit b1a13b95bc

View File

@ -123,6 +123,16 @@ namespace EduNetworkBuilder
return VLANTagType.Forbidden; //if not defined, it is forbidden
}
public int GetUntaggedVLAN()
{
foreach (VLANInfo vin in VLANs)
{
if (vin.Tag == VLANTagType.Untagged)
return vin.ID;
}
return NB.InvalidVLAN;
}
public int GetNonForbiddenVLANID()
{
foreach(VLANInfo vin in VLANs)
@ -130,7 +140,7 @@ namespace EduNetworkBuilder
if (vin.Tag != VLANTagType.Forbidden)
return vin.ID;
}
return -999;
return NB.InvalidVLAN;
}
public void SetVLANTag(int id, VLANTagType Tag)