Exemple #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);
        }
 public SNMPRequest(SNMPHost host, MibObject obj)
 {
     Host        = host;
     Object      = obj;
     LogRequests = true;
 }
 public SNMPRequest(SNMPHost host, MibObject obj)
 {
     Host = host;
     Object = obj;
     LogRequests = true;
 }
 public SNMPCommunications(SNMPHost host, MibObject obj)
     : base(host, obj)
 {
 }
 public SNMPCommunications(SNMPHost host, MibObject obj)
     : base(host, obj)
 {
 }
 /// <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;
 }