예제 #1
0
        /// <summary>
        /// Verifica se o Host está ativo (respondendo a requisições)
        /// </summary>
        private bool IsAlive(SNMPHost host)
        {
            var mibObj = new MibObject()
            {
                OID = "1.3.6.1.2.1.1.3"
            };
            var req = new SNMPRequest(host, mibObj)
            {
                LogRequests = false
            };

            try
            {
                req.Send();
                if (req.ResponseValue != null)
                {
                    return(true);
                }
            }
            catch { }
            return(false);
        }
예제 #2
0
 public SNMPRequest(SNMPHost host, MibObject obj)
 {
     Host        = host;
     Object      = obj;
     LogRequests = true;
 }
예제 #3
0
 public SNMPRequest(SNMPHost host, MibObject obj)
 {
     Host = host;
     Object = obj;
     LogRequests = true;
 }
예제 #4
0
 public SNMPCommunications(SNMPHost host, MibObject obj)
     : base(host, obj)
 {
 }
예제 #5
0
 public SNMPCommunications(SNMPHost host, MibObject obj)
     : base(host, obj)
 {
 }
예제 #6
0
 /// <summary>
 /// Verifica se o Host está ativo (respondendo a requisições)
 /// </summary>
 private bool IsAlive(SNMPHost host)
 {
     var mibObj = new MibObject() { OID = "1.3.6.1.2.1.1.3" };
     var req = new SNMPRequest(host, mibObj) { LogRequests = false };
     try
     {
         req.Send();
         if (req.ResponseValue != null)
             return true;
     }
     catch { }
     return false;
 }