private void checkV1TRAP() { if (getType() != PDU.V1TRAP) { throw new UnsupportedOperationException( "Operation is only supported for SNMPv1 trap PDUs (V1TRAP)"); } }
private void checkV1TRAP() { if (getType() != PDU.V1TRAP) { throw new UnsupportedOperationException( "Operation is only supported for SNMPv1 trap PDUs (V1TRAP)"); } }
private void checkV1TRAP() { if (getType() != PDU.V1TRAP) { throw new UnsupportedOperationException( "Operation is only supported for SNMPv1 trap PDUs (V1TRAP)"); } }
protected int getBERPayloadLengthPDU() { if (getType() != PDU.V1TRAP) { return super.getBERPayloadLengthPDU(); } else { int length = 0; // length for all vbs for (int i = 0; i < variableBindings.size(); i++) { length += ((VariableBinding)variableBindings.get(i)).getBERLength(); } length += BER.getBERLengthOfLength(length) + 1; length += agentAddress.getBERLength(); length += enterprise.getBERLength(); length += genericTrap.getBERLength(); length += specificTrap.getBERLength(); length += timestamp.getBERLength(); return length; } }
protected int getBERPayloadLengthPDU() { if (getType() != PDU.V1TRAP) { return super.getBERPayloadLengthPDU(); } else { int length = 0; // length for all vbs for (VariableBinding variableBinding : variableBindings) { length += variableBinding.getBERLength(); } length += BER.getBERLengthOfLength(length) + 1; length += agentAddress.getBERLength(); length += enterprise.getBERLength(); length += genericTrap.getBERLength(); length += specificTrap.getBERLength(); length += timestamp.getBERLength(); return length; } }
protected int getBERPayloadLengthPDU() { if (getType() != PDU.V1TRAP) { return super.getBERPayloadLengthPDU(); } else { int length = 0; // length for all vbs for (VariableBinding variableBinding : variableBindings) { length += variableBinding.getBERLength(); } length += BER.getBERLengthOfLength(length) + 1; length += agentAddress.getBERLength(); length += enterprise.getBERLength(); length += genericTrap.getBERLength(); length += specificTrap.getBERLength(); length += timestamp.getBERLength(); return length; } }
if (getType() == PDU.V1TRAP) { enterprise.decodeBER(inputStream); agentAddress.decodeBER(inputStream);
if (getType() == PDU.V1TRAP) { enterprise.decodeBER(inputStream); agentAddress.decodeBER(inputStream);
if (getType() == PDU.V1TRAP) { enterprise.decodeBER(inputStream); agentAddress.decodeBER(inputStream);