Пример #1
0
        /// <summary>
        /// Builds and sends an SNMP GetRequest PDU.
        /// </summary>
        /// <param name="mibs">OIDs to be attached to the GetRequest.</param>
        /// <returns>The response to the GetRequest from the Agent.</returns>
        public byte[] get(string[] mibs)
        {
            PDU pdu = new PDU(1024);

            byte[] data     = pdu.buildPDU(requestCounter, 0, this.community, mibs);
            byte[] response = SendPDU(data, pdu.getIndex() + 1);
            return(response);
        }
Пример #2
0
        /// <summary>
        /// Builds and sends an SNMP GetRequest PDU.
        /// </summary>
        /// <param name="mibs">OIDs to be attached to the GetRequest.</param>
        /// <returns>The response to the GetRequest from the Agent.</returns>
        public byte[] get(string[] mibs)
        {
            
            PDU pdu = new PDU(1024);
            byte[] data =  pdu.buildPDU(requestCounter, 0, this.community, mibs);
            byte[] response = SendPDU(data, pdu.getIndex()+1);
            return response;

        }