-1

I wrote an application to know the status of the router. Using the program I can able to check one status using by one request. But i want to know multiple status using one request. Is it possible? Could please help? Please see the code

This code will give only one status per request.

        InetAddress hostAddress = InetAddress.getByName("**.**.**.**");
        String community = "public";
        int version = 1 / 0; // SNMPv1

        SNMPv1CommunicationInterface comInterface =
                new SNMPv1CommunicationInterface(version, hostAddress,
                        community);
        String itemID = "1.3.6.1.2.1.43.11.1.1.9";
        SNMPVarBindList newVars = comInterface.getMIBEntry(itemID);
4

1 回答 1

0

如果你使用http://gicl.cs.drexel.edu/people/sevy/snmp/snmp_inquisitor.html,那么你应该确保你已经仔细阅读了它的文档,

http://gicl.cs.drexel.edu/people/sevy/snmp/docs/snmp/SNMPv1CommunicationInterface.html

SNMPVarBindList getMIBEntry(java.lang.String[] itemID)显然可以帮助您同时获取一堆变量,因为它能够

检索与数组 itemID 中给定的对象标识符对应的 MIB 变量值(以点分整数表示法)。|

于 2013-06-28T12:02:19.083 回答