Search in sources :

Example 6 with SnmpPduRequest

use of com.sun.jmx.snmp.SnmpPduRequest in project jdk8u_jdk by JetBrains.

the class SnmpRequestHandler method newTooBigPdu.

private SnmpPduPacket newTooBigPdu(SnmpPduPacket req) {
    SnmpPduRequest result = newErrorResponsePdu(req, SnmpDefinitions.snmpRspTooBig, 0);
    result.varBindList = null;
    return result;
}
Also used : SnmpPduRequest(com.sun.jmx.snmp.SnmpPduRequest)

Example 7 with SnmpPduRequest

use of com.sun.jmx.snmp.SnmpPduRequest in project jdk8u_jdk by JetBrains.

the class SnmpRequestHandler method newValidResponsePdu.

/**
     * Make a response pdu with the specified error status and index.
     * NOTE: the response pdu share its varBindList with the request pdu.
     */
private SnmpPduRequest newValidResponsePdu(SnmpPduPacket reqPdu, SnmpVarBind[] varBindList) {
    SnmpPduRequest result = new SnmpPduRequest();
    result.address = reqPdu.address;
    result.port = reqPdu.port;
    result.version = reqPdu.version;
    result.community = reqPdu.community;
    result.type = SnmpPduRequest.pduGetResponsePdu;
    result.requestId = reqPdu.requestId;
    result.errorStatus = SnmpDefinitions.snmpRspNoError;
    result.errorIndex = 0;
    result.varBindList = varBindList;
    ((SnmpAdaptorServer) adaptorServer).updateErrorCounters(result.errorStatus);
    return result;
}
Also used : SnmpPduRequest(com.sun.jmx.snmp.SnmpPduRequest)

Aggregations

SnmpPduRequest (com.sun.jmx.snmp.SnmpPduRequest)7 SnmpVarBindList (com.sun.jmx.snmp.SnmpVarBindList)4 SnmpTimeticks (com.sun.jmx.snmp.SnmpTimeticks)3 SnmpVarBind (com.sun.jmx.snmp.SnmpVarBind)3 SnmpPduBulk (com.sun.jmx.snmp.SnmpPduBulk)1 SnmpPduPacket (com.sun.jmx.snmp.SnmpPduPacket)1 SnmpStatusException (com.sun.jmx.snmp.SnmpStatusException)1 SnmpTooBigException (com.sun.jmx.snmp.SnmpTooBigException)1 InterruptedIOException (java.io.InterruptedIOException)1 SocketException (java.net.SocketException)1