jnetpcap.filter.bpf.vm
Class BPFVirtualMachine

java.lang.Object
  extended by jnetpcap.filter.bpf.vm.BPFVirtualMachine

public class BPFVirtualMachine
extends java.lang.Object

Virtual State Machine that interprets and executes a BPF program.

Author:
Mark Bednarczyk, Sly Technologies, Inc.

Field Summary
static int BPF_MEMWORDS
           
 
Constructor Summary
BPFVirtualMachine(BPFProgram bpf)
           
BPFVirtualMachine(byte[] pc)
           
 
Method Summary
 long execute(BPFProgram program, byte[] p, int wirelen, int buflen)
           
 long execute(byte[] p, int wirelen, int buflen)
           
 long execute(java.nio.ByteBuffer p, int wirelen, int buflen)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BPF_MEMWORDS

public static final int BPF_MEMWORDS
See Also:
Constant Field Values
Constructor Detail

BPFVirtualMachine

public BPFVirtualMachine(byte[] pc)
                  throws IllegalInstruction
Throws:
IllegalInstruction

BPFVirtualMachine

public BPFVirtualMachine(BPFProgram bpf)
Parameters:
bpf -
Method Detail

execute

public long execute(byte[] p,
                    int wirelen,
                    int buflen)
             throws IllegalInstruction
Throws:
IllegalInstruction

execute

public long execute(java.nio.ByteBuffer p,
                    int wirelen,
                    int buflen)
             throws IllegalInstruction
Throws:
IllegalInstruction

execute

public long execute(BPFProgram program,
                    byte[] p,
                    int wirelen,
                    int buflen)
             throws IllegalInstruction
Throws:
IllegalInstruction