jnetpcap.filter.bpf
Class BPFProgram
java.lang.Object
jnetpcap.filter.bpf.BPFProgram
public class BPFProgram
- extends java.lang.Object
A set of instructions compiled from a textual expression to a binary level
which can be passed to a BPF VM for interpretation.
- Author:
- Mark Bednarczyk, Sly Technologies, Inc.
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
BPFProgram
public BPFProgram(byte[] pc)
throws IllegalInstruction
- Throws:
IllegalInstruction
BPFProgram
public BPFProgram(java.lang.String tcpdumpText)
throws IllegalInstruction
- Throws:
IllegalInstruction
convertBE
public static BPFInstruction[] convertBE(byte[] program)
throws IllegalInstruction
- Throws:
IllegalInstruction
convertLE
public static BPFInstruction[] convertLE(byte[] program)
throws IllegalInstruction
- Throws:
IllegalInstruction
compileTcpdumpOutput
public static BPFInstruction[] compileTcpdumpOutput(java.lang.String text)
throws IllegalInstruction
- Throws:
IllegalInstruction
getCode
public final BPFInstruction[] getCode()
- Returns:
- Returns the code.
getEncoding
public final java.nio.ByteOrder getEncoding()
- Returns:
- Returns the encoding.
getLength
public final int getLength()
- Returns:
- Returns the length.
getRaw
public final java.nio.ByteBuffer getRaw()
- Returns:
- Returns the raw.
toBuffer
public java.lang.StringBuilder toBuffer(java.lang.StringBuilder buf)
toBufferCode
public java.lang.StringBuilder toBufferCode(java.lang.StringBuilder buf)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
toStringCode
public java.lang.String toStringCode()
- Returns: