|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jnetpcap.PcapBpfProgram
public class PcapBpfProgram
Class peered with native bpf_program
structure. Instance of a
compiled Berkley Packet Filter program. The program is an interpreted binary
byte program. Most modern unix and windows systems have a BPF interpreter
builtin and execute the code very efficiently, close to the source of the
capture and use the filter to permit or reject packets early.
Special note:
There also 2 private constructors which allow the object to be initialized in
Java space with a BPF program. The corresponding native C structures are
created and can be passed to Pcap.setFilter
method. At this
time, the constructors are kept private for further testing. At some point
these private constructors will be made public and will allow outside filters
to be used with Pcap capture sessions.
Constructor Summary | |
---|---|
PcapBpfProgram()
Special constructor that allows creation of empty object ready for initialization. |
Method Summary | |
---|---|
protected void |
finalize()
Cleans up JNI resources and releases any unreleased BPF programs in native land. |
long |
getInstruction(int index)
Retrieves a single BPF instruction which is 8 bytes long and is encoded into the long interger returned. |
int |
getInstructionCount()
Gets the exact number of BPF instructions within this program. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PcapBpfProgram()
Pcap.compile(PcapBpfProgram, String, int, int)
,
Pcap.compileNoPcap(int, int, PcapBpfProgram, String, int, int)
Method Detail |
---|
protected void finalize()
finalize
in class java.lang.Object
public int getInstructionCount()
public long getInstruction(int index)
index
- index of the instruction
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |