Package org.snmp4j.asn1

Examples of org.snmp4j.asn1.BER


                                 Integer32 maxSizeResponseScopedPDU,
                                 StatusInformation statusInformation,
                                 MutableStateReference stateReference)
      throws IOException
  {
    MutableByte mutableByte = new MutableByte();
    int length = BER.decodeHeader(wholeMsg, mutableByte);
    int startPos = (int)wholeMsg.getPosition();
    if (mutableByte.getValue() != BER.SEQUENCE) {
      String txt = "SNMPv1 PDU must start with a SEQUENCE";
      logger.error(txt);
      throw new IOException(txt);
    }
    Integer32 version = new Integer32();
View Full Code Here


  public Null(int exceptionSyntax) {
   setSyntax(exceptionSyntax);
  }

  public void decodeBER(BERInputStream inputStream) throws java.io.IOException {
    MutableByte type = new BER.MutableByte();
    BER.decodeNull(inputStream, type);
    this.syntax = type.getValue() & 0xFF;
  }
View Full Code Here

                                 StatusInformation statusInformation,
                                 MutableStateReference stateReference)
      throws IOException
  {

    MutableByte mutableByte = new MutableByte();
    int length = BER.decodeHeader(wholeMsg, mutableByte);
    int startPos = (int)wholeMsg.getPosition();

    if (mutableByte.getValue() != BER.SEQUENCE) {
      String txt = "SNMPv2c PDU must start with a SEQUENCE";
      logger.error(txt);
      throw new IOException(txt);
    }
    Integer32 version = new Integer32();
View Full Code Here

   * @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);
View Full Code Here

                                 StatusInformation statusInformation,
                                 MutableStateReference stateReference)
      throws IOException
  {

    MutableByte mutableByte = new MutableByte();
    int length = BER.decodeHeader(wholeMsg, mutableByte);
    int startPos = (int)wholeMsg.getPosition();

    if (mutableByte.getValue() != BER.SEQUENCE) {
      String txt = "SNMPv2c PDU must start with a SEQUENCE";
      logger.error(txt);
      throw new IOException(txt);
    }
    Integer32 version = new Integer32();
View Full Code Here

  public Null(int exceptionSyntax) {
   setSyntax(exceptionSyntax);
  }

  public void decodeBER(BERInputStream inputStream) throws java.io.IOException {
    MutableByte type = new BER.MutableByte();
    BER.decodeNull(inputStream, type);
    this.syntax = type.getValue() & 0xFF;
  }
View Full Code Here

   * @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);
View Full Code Here

                                 Integer32 maxSizeResponseScopedPDU,
                                 StatusInformation statusInformation,
                                 MutableStateReference stateReference)
      throws IOException
  {
    MutableByte mutableByte = new MutableByte();
    int length = BER.decodeHeader(wholeMsg, mutableByte);
    int startPos = (int)wholeMsg.getPosition();
    if (mutableByte.getValue() != BER.SEQUENCE) {
      String txt = "SNMPv1 PDU must start with a SEQUENCE";
      logger.error(txt);
      throw new IOException(txt);
    }
    Integer32 version = new Integer32();
View Full Code Here

  }

  public void processMessage(TransportMapping sourceTransport,
                             Address incomingAddress, ByteBuffer wholeMessage) {
    processMessage(sourceTransport, incomingAddress,
                   new BERInputStream(wholeMessage.duplicate()));
  }
View Full Code Here

  }

  public void processMessage(TransportMapping sourceTransport,
                             Address incomingAddress, ByteBuffer wholeMessage) {
    processMessage(sourceTransport, incomingAddress,
                   new BERInputStream(wholeMessage));
  }
View Full Code Here

TOP

Related Classes of org.snmp4j.asn1.BER

Copyright © 2018 www.massapicom. 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.