public final class BpfProgram
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
BpfProgram.BpfCompileMode |
| Modifier and Type | Method and Description |
|---|---|
boolean |
applyFilter(byte[] packet)
Apply the filter on a given packet.
|
boolean |
applyFilter(byte[] packet,
int orgPacketLen,
int packetLen)
Apply the filter on a given packet.
|
boolean |
applyFilter(Packet packet)
Apply the filter on a given packet.
|
void |
free()
Releases the resource this object holds in the native memory.
|
java.lang.String |
getExpression() |
boolean |
isFreed() |
public java.lang.String getExpression()
public boolean applyFilter(Packet packet)
packet - the packet to apply the filter onpublic boolean applyFilter(byte[] packet)
packet - the packet to apply the filter onpublic boolean applyFilter(byte[] packet,
int orgPacketLen,
int packetLen)
packet - a byte array including the packet to apply the filter onorgPacketLen - the length of the original packetpacketLen - the length of the packet presentpublic boolean isFreed()
public void free()
Copyright © 2011 - 2018 Pcap4J.org. All rights reserved.