コード例 #1
0
        public NetworkEquipment addInterface(NetworkInterface ni)
        {
            if ( ni == null || ni.Type == null ) {
                return this;
            }

            InterfaceTypes[ni.Type].Add(ni);

            return this;
        }
コード例 #2
0
ファイル: guiEquipment.cs プロジェクト: odnanref/snrviewer
 public SquareInt(int x, int y, NetworkInterface ni )
 {
     X = x;
     Y = y;
     iface = ni;
 }
コード例 #3
0
ファイル: guiEquipment.cs プロジェクト: odnanref/snrviewer
 private void recordPosition(int x, int y, NetworkInterface ni)
 {
     boxCoordinates.Add(new SquareInt(x, y, ni)); // store coords
 }
コード例 #4
0
        public NetworkEquipment addInterface(string oid, string name)
        {
            String[] tmp = oid.Split('.');
            NetworkInterface ni = new NetworkInterface();
            ni.Id				= tmp[(tmp.Length-1)];
            ni.Descr			= name;

            // determine type
            if (name.Contains("Upstream") || name.Contains("US ")) {
                ni.Type = "upstream";
                if (name.Contains("Channel") || name.Contains(" CH ")) {
                    ni.SubType = "channel";
                }

                if (name.Contains("Interface")) {
                    ni.SubType = "interface";
                }

            } else if (name.Contains("Ethernet") || name.Contains("ETH ")) {
                // ethernet interface
                ni.Type = "ethernet";
                if (name.Contains("Fast")) {
                    ni.SubType = "fastethernet";
                }
            } else if (name.Contains("Downstream") || name.Contains("DS ")) {
                ni.Type = "downstream";
            } else {
                return this;// if we don't know what it is, we don't care
            }

            return addInterface(ni);
        }