@Override public void decodeBER(BERInputStream inputStream) throws IOException { long startPos = inputStream.getPosition(); super.decodeBER(inputStream); decodedLength = (int) (inputStream.getPosition() - startPos); }
@Override public void decodeBER(BERInputStream inputStream) throws IOException { long startPos = inputStream.getPosition(); super.decodeBER(inputStream); decodedLength = (int) (inputStream.getPosition() - startPos); }
public void decodeBER(BERInputStream inputStream) throws IOException { OctetString os = new OctetString(); os.decodeBER(inputStream); try { setTransportAddress(os); } catch (Exception ex) { String txt = "Wrong encoding of TransportAddress"; logger.error(txt); throw new IOException(txt + ": " + ex.getMessage()); } }
public void decodeBER(BERInputStream inputStream) throws IOException { OctetString os = new OctetString(); os.decodeBER(inputStream); try { setTransportAddress(os); } catch (Exception ex) { String txt = "Wrong encoding of TransportAddress"; logger.error(txt); throw new IOException(txt+": "+ex.getMessage()); } }
public void decodeBER(BERInputStream inputStream) throws IOException { OctetString os = new OctetString(); os.decodeBER(inputStream); try { setTransportAddress(os); } catch (Exception ex) { String txt = "Wrong encoding of TransportAddress"; logger.error(txt); throw new IOException(txt+": "+ex.getMessage()); } }
/** * Decodes a <code>ScopedPDU</code> from an <code>InputStream</code>. * * @param inputStream an <code>InputStream</code> containing a BER encoded * byte stream. * @throws IOException */ public void decodeBER(BERInputStream inputStream) throws IOException { MutableByte mutableByte = new MutableByte(); int length = BER.decodeHeader(inputStream, mutableByte); long startPos = inputStream.getPosition(); contextEngineID.decodeBER(inputStream); contextName.decodeBER(inputStream); super.decodeBER(inputStream); if (BER.isCheckSequenceLength()) { BER.checkSequenceLength(length, (int) (inputStream.getPosition() - startPos), this); } }
/** * Decodes a <code>ScopedPDU</code> from an <code>InputStream</code>. * * @param inputStream an <code>InputStream</code> containing a BER encoded * byte stream. * @throws IOException * if there is a BER encoding error or other IO exception in the input stream. */ public void decodeBER(BERInputStream inputStream) throws IOException { MutableByte mutableByte = new MutableByte(); int length = BER.decodeHeader(inputStream, mutableByte); long startPos = inputStream.getPosition(); contextEngineID.decodeBER(inputStream); contextName.decodeBER(inputStream); super.decodeBER(inputStream); if (BER.isCheckSequenceLength()) { BER.checkSequenceLength(length, (int) (inputStream.getPosition() - startPos), this); } }
/** * Decodes a <code>ScopedPDU</code> from an <code>InputStream</code>. * * @param inputStream an <code>InputStream</code> containing a BER encoded * byte stream. * @throws IOException * if there is a BER encoding error or other IO exception in the input stream. */ public void decodeBER(BERInputStream inputStream) throws IOException { MutableByte mutableByte = new MutableByte(); int length = BER.decodeHeader(inputStream, mutableByte); long startPos = inputStream.getPosition(); contextEngineID.decodeBER(inputStream); contextName.decodeBER(inputStream); super.decodeBER(inputStream); if (BER.isCheckSequenceLength()) { BER.checkSequenceLength(length, (int) (inputStream.getPosition() - startPos), this); } }
public void decodeBER(BERInputStream message) throws IOException { BER.MutableByte type = new BER.MutableByte(); int length = BER.decodeHeader(message, type); if (type.getValue() != BER.SEQUENCE) { throw new IOException("Unexpected sequence header type: " + type.getValue()); } msgID.decodeBER(message); msgMaxSize.decodeBER(message); if (msgMaxSize.getValue() < 484) { throw new IOException("Invalid msgMaxSize: " + msgMaxSize); } msgFlags.decodeBER(message); if (msgFlags.length() != 1) { throw new IOException("Message flags length != 1: " + msgFlags.length()); } securityModel.decodeBER(message); if (logger.isDebugEnabled()) { logger.debug("SNMPv3 header decoded: msgId=" + msgID + ", msgMaxSize=" + msgMaxSize + ", msgFlags=" + msgFlags.toHexString() + ", secModel=" + securityModel); } BER.checkSequenceLength(length, this); }
throw new IOException(txt); authoritativeEngineID.decodeBER(inputStream); authoritativeEngineBoots.decodeBER(inputStream); authoritativeEngineTime.decodeBER(inputStream); userName.decodeBER(inputStream); this.authParametersPosition = (int)(inputStream.getPosition() - pos); pos = (int)inputStream.getPosition(); authenticationParameters.decodeBER(inputStream); this.authParametersPosition += (inputStream.getPosition() - pos) - authenticationParameters.getBERPayloadLength(); privacyParameters.decodeBER(inputStream); this.decodedLength = (int) (inputStream.getPosition() - decodedLength); if (BER.isCheckSequenceLength()) {
public void decodeBER(BERInputStream message) throws IOException { BER.MutableByte type = new BER.MutableByte(); int length = BER.decodeHeader(message, type); if (type.getValue() != BER.SEQUENCE) { throw new IOException("Unexpected sequence header type: " + type.getValue()); } msgID.decodeBER(message); msgMaxSize.decodeBER(message); if (msgMaxSize.getValue() < 484) { throw new IOException("Invalid msgMaxSize: " + msgMaxSize); } msgFlags.decodeBER(message); if (msgFlags.length() != 1) { throw new IOException("Message flags length != 1: " + msgFlags.length()); } securityModel.decodeBER(message); if (logger.isDebugEnabled()) { logger.debug("SNMPv3 header decoded: msgId=" + msgID + ", msgMaxSize=" + msgMaxSize + ", msgFlags=" + msgFlags.toHexString() + ", secModel=" + securityModel); } BER.checkSequenceLength(length, this); }
public void decodeBER(BERInputStream message) throws IOException { BER.MutableByte type = new BER.MutableByte(); int length = BER.decodeHeader(message, type); if (type.getValue() != BER.SEQUENCE) { throw new IOException("Unexpected sequence header type: " + type.getValue()); } msgID.decodeBER(message); msgMaxSize.decodeBER(message); if (msgMaxSize.getValue() < 484) { throw new IOException("Invalid msgMaxSize: " + msgMaxSize); } msgFlags.decodeBER(message); if (msgFlags.length() != 1) { throw new IOException("Message flags length != 1: " + msgFlags.length()); } securityModel.decodeBER(message); if (logger.isDebugEnabled()) { logger.debug("SNMPv3 header decoded: msgId=" + msgID + ", msgMaxSize=" + msgMaxSize + ", msgFlags=" + msgFlags.toHexString() + ", secModel=" + securityModel); } BER.checkSequenceLength(length, this); }
throw new IOException(txt); authoritativeEngineID.decodeBER(inputStream); authoritativeEngineBoots.decodeBER(inputStream); authoritativeEngineTime.decodeBER(inputStream); userName.decodeBER(inputStream); this.authParametersPosition = (int)(inputStream.getPosition() - pos); pos = (int)inputStream.getPosition(); authenticationParameters.decodeBER(inputStream); this.authParametersPosition += (inputStream.getPosition() - pos) - authenticationParameters.getBERPayloadLength(); privacyParameters.decodeBER(inputStream); this.decodedLength = (int) (inputStream.getPosition() - decodedLength); if (BER.isCheckSequenceLength()) {
throw new IOException(txt); authoritativeEngineID.decodeBER(inputStream); authoritativeEngineBoots.decodeBER(inputStream); authoritativeEngineTime.decodeBER(inputStream); userName.decodeBER(inputStream); this.authParametersPosition = (int)(inputStream.getPosition() - pos); pos = (int)inputStream.getPosition(); authenticationParameters.decodeBER(inputStream); this.authParametersPosition += (inputStream.getPosition() - pos) - authenticationParameters.getBERPayloadLength(); privacyParameters.decodeBER(inputStream); this.decodedLength = (int) (inputStream.getPosition() - decodedLength); if (BER.isCheckSequenceLength()) {
securityName.decodeBER(wholeMsg);
version.decodeBER(wholeMsg); securityName.decodeBER(wholeMsg); securityLevel.setValue(SecurityLevel.NOAUTH_NOPRIV); securityModel.setValue(SecurityModel.SECURITY_MODEL_SNMPv1);
version.decodeBER(wholeMsg); securityName.decodeBER(wholeMsg); securityLevel.setValue(SecurityLevel.NOAUTH_NOPRIV); securityModel.setValue(SecurityModel.SECURITY_MODEL_SNMPv2c);
version.decodeBER(wholeMsg); securityName.decodeBER(wholeMsg); securityLevel.setValue(SecurityLevel.NOAUTH_NOPRIV); securityModel.setValue(SecurityModel.SECURITY_MODEL_SNMPv2c);
version.decodeBER(wholeMsg); securityName.decodeBER(wholeMsg); securityLevel.setValue(SecurityLevel.NOAUTH_NOPRIV); securityModel.setValue(SecurityModel.SECURITY_MODEL_SNMPv1);
version.decodeBER(wholeMsg); securityName.decodeBER(wholeMsg); securityLevel.setValue(SecurityLevel.NOAUTH_NOPRIV); securityModel.setValue(SecurityModel.SECURITY_MODEL_SNMPv2c);