Examples of PDU


Examples of org.snmp4j.PDU

public class SnmpMessage extends DefaultMessage {
    private PDU pdu;

    public SnmpMessage() {
        this(new PDU());
    }
View Full Code Here

Examples of org.snmp4j.PDU

       
        super.doStop();
    }

    public void processPdu(CommandResponderEvent event) {
        PDU pdu = event.getPDU();
        // check PDU not null
        if (pdu != null) {
            // check for INFORM
            // code take from the book "Essential SNMP"
            if ((pdu.getType() != PDU.TRAP) && (pdu.getType() != PDU.V1TRAP) && (pdu.getType() != PDU.REPORT)
                && (pdu.getType() != PDU.RESPONSE)) {
                // first response the inform-message and then process the
                // message
                pdu.setErrorIndex(0);
                pdu.setErrorStatus(0);
                pdu.setType(PDU.RESPONSE);
                StatusInformation statusInformation = new StatusInformation();
                StateReference ref = event.getStateReference();
                try {
                    event.getMessageDispatcher().returnResponsePdu(event.getMessageProcessingModel(),
                                                                   event.getSecurityModel(),
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.