diff --git a/EduNetworkBuilder/NetworkInterface.cs b/EduNetworkBuilder/NetworkInterface.cs index 2b715ee..99ab2ed 100644 --- a/EduNetworkBuilder/NetworkInterface.cs +++ b/EduNetworkBuilder/NetworkInterface.cs @@ -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)