Example #1
0
 public guiEquipment setEquipment(NetworkEquipment ne)
 {
     this.ne = ne;
     return this;
 }
Example #2
0
 public void getInterfacesAsync()
 {
     ne = getInterfaces();
     //NetworkEquipment ne = new NetworkEquipment();// FIXME: Testing
     if (this.callback != null)
             // Invoke the call back delegate
             this.callback(ne);
 }
Example #3
0
 public SnmpSweep(NetworkEquipment ne, MainWindow.MyCallBack Callback)
 {
     this.ne = ne;
     this.callback = Callback;
 }
Example #4
0
 public SnmpSweep(NetworkEquipment ne)
 {
     this.ne = ne;
 }
Example #5
0
 private void DrawRectangle()
 {
     SnrViewer.NetworkEquipment ne = new SnrViewer.NetworkEquipment();
     ne.Ip = "192.168.0.33";
     ne.Community = "stvtelco";
     SnrViewer.SnmpSweep snmpsw = new SnrViewer.SnmpSweep(ne, new MyCallBack(this.OnResponse));
     sweep = new Thread(
         new ThreadStart(
                 snmpsw.getInterfacesAsync
             )
         );
     sweep.Start();
 }
Example #6
0
 protected void runQuery()
 {
     try {
     SnrViewer.NetworkEquipment ne = new SnrViewer.NetworkEquipment();
     ne.Ip = "192.168.0.33";
     ne.Community = "stvtelco";
     SnrViewer.SnmpSweep ss = new SnrViewer.SnmpSweep(ne);
     ne = ss.getInterfaces();
     if (ne.TotalInterfaces > 0 ) {
         foreach (KeyValuePair<string, ArrayList> pair in ne.InterfaceTypes) {
             Console.WriteLine(">>" + pair.Key);
             if (pair.Value != null ) {
                 foreach (SnrViewer.NetworkInterface i in pair.Value) {
                     if (i != null )
                         Console.WriteLine("\t " + i.Descr + " -- " + i.Id);
                 }
             }
         }
     } else
         Console.WriteLine("No interfaces");
     }catch (Exception e ) {
         Console.WriteLine(e.ToString());
     }
 }