diff --git a/EduNetworkBuilder/NBRenumberData.cs b/EduNetworkBuilder/NBRenumberData.cs new file mode 100644 index 0000000..d048d67 --- /dev/null +++ b/EduNetworkBuilder/NBRenumberData.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace EduNetworkBuilder +{ + public class NBRenumberData + { + public string Hostname = ""; + public NetworkDevice Device { + get { + Network myNet = NB.GetNetwork(); + if (myNet == null) return null; + return myNet.DeviceFromName(Hostname); + } + } + public int ActiveCount=0; + public string nicname; + public string SuggestedIP; + + private bool _isRouter = false; + /// + /// Return true if the Device specified by hostname does routing. + /// + public bool IsRouter { + get { + if (_isRouter) return true; + NetworkDevice ND = Device; + if(ND.RoutesPackets()) + { + _isRouter = true; + return true; + } + return false; + } + } + } +}