6 SNMPTable::SNMPTable(Snmp & snmp,
7 const CTarget & target,
14 int c = snmp.get_next(pdu, target);
15 for (size_t i = 0; i < 3 && c != SNMP_CLASS_SUCCESS; ++i) {
16 c = snmp.get_next(pdu, target);
18 if (c != SNMP_CLASS_SUCCESS) {
19 logger << "SNMPTable::SNMPTable() - failed to invoke Snmp::get_next (oid: '" << oid.get_printable() << "'). Error message: '" << Snmp::error_msg(c) << "'" << std::endl;
22 if (pdu.get_vb(0).get_oid().nCompare(oid.len(), oid) != 0) {
25 _list.push_back(pdu.get_vb(0));
31 SNMPTable::~SNMPTable()
35 bool SNMPTable::getByOid(const Oid & oid, Vb & vb) const
37 SNMPList::const_iterator it;
38 for (it = _list.begin(); it != _list.end(); ++it) {
39 if (it->valid() && it->get_oid() == oid) {