java.lang.Object
org.jnetpcap.BpFilter
- All Implemented Interfaces:
AutoCloseable
A Berkley Packet Filter program. BpFilter is applied to captured packets and
only the packets that match the filter program are reported.
Each 64-bit instruction is the long int representation of the following bpf structure found in C header file "pcap/bpf.h":
struct bpf_insn { u_short full; u_char jt; u_char jf; bpf_u_int32 k; };
- Author:
- Sly Technologies, repos@slytechs.com
-
Method Summary
-
Method Details
-
close
Close and deallocate native BPF program.- Specified by:
close
in interfaceAutoCloseable
- Throws:
IllegalStateException
- thrown if already closed- See Also:
-
length
public int length()number of 64-bit long instructions.- Returns:
- number count of instructions
-
toString
-
freeCode
Deallocates a native BPF program.- Parameters:
bpFilter
- the bpf- Since:
- libpcap 0.6
- See Also:
-