public final class BpfProgram extends 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.
|
protected void |
finalize() |
void |
free() |
String |
getExpression() |
boolean |
isFreed() |
public 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–2019 Pcap4J.org. All rights reserved.