use of org.opennms.netmgt.snmp.SnmpVarBindDTO in project opennms by OpenNMS.
the class V1TrapInformation method getSnmpVarBindDTO.
@Override
public SnmpVarBindDTO getSnmpVarBindDTO(int i) {
SnmpObjId name = SnmpObjId.get(getVarBindAt(i).getName().getIdentifiers());
SnmpValue value = new JoeSnmpValue(getVarBindAt(i).getValue());
return new SnmpVarBindDTO(name, value);
}
use of org.opennms.netmgt.snmp.SnmpVarBindDTO in project opennms by OpenNMS.
the class V2TrapInformation method getSnmpVarBindDTO.
@Override
public SnmpVarBindDTO getSnmpVarBindDTO(int i) {
if (i < 2) {
if (i == 0) {
LOG.debug("Skipping processing of varbind it is the sysuptime and the first varbind, it is not processed as a parm per RFC2089");
} else {
LOG.debug("Skipping processing of varbind it is the trap OID and the second varbind, it is not processed as a parm per RFC2089");
}
return null;
} else {
SnmpObjId name = SnmpObjId.get(getVarBindAt(i).getName().getIdentifiers());
SnmpValue value = new JoeSnmpValue(getVarBindAt(i).getValue());
return new SnmpVarBindDTO(name, value);
}
}
Aggregations