Examples of BPFInstruction


Examples of org.jnetstream.filter.bpf.BPFInstruction

    long k = 0; // Memory pointer
    int pi = 0; // Program index into the PC array
    final long[] mem = new long[BPFVirtualMachine.BPF_MEMWORDS]; // Memory
                                                                  // stack

    BPFInstruction i = null;
    pi--;
    while (true) {
      pi++;
      i = program.getCode()[pi];

      switch (i.getCode()) {
        default:
          throw new IllegalInstructionException(
              "Illegal BPF instruction encountered: opcode=" + i.getCode()
                  + " at OP index=" + pi);

        case BPFCode.RET | BPFCode.K:
          return i.k;
View Full Code Here

Examples of org.jnetstream.filter.bpf.BPFInstruction

                                                                  // stack

    // data.order(ByteOrder.BIG_ENDIAN);
    final int offset = data.position();

    BPFInstruction i = null;
    pi--;
    while (true) {
      pi++;
      i = program.getCode()[pi];

      switch (i.getCode()) {
        default:
          throw new IllegalInstructionException(
              "Illegal BPF instruction encountered: opcode=" + i.getCode()
                  + " at OP index=" + pi);

        case BPFCode.RET | BPFCode.K:
          return i.k;
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.