public final class PcapNetworkInterface extends Object
Modifier and Type | Class and Description |
---|---|
static class |
PcapNetworkInterface.PromiscuousMode |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
List<PcapAddress> |
getAddresses() |
String |
getDescription() |
ArrayList<LinkLayerAddress> |
getLinkLayerAddresses() |
String |
getName() |
int |
hashCode() |
boolean |
isLocal() |
boolean |
isLoopBack() |
PcapHandle |
openLive(int snaplen,
PcapNetworkInterface.PromiscuousMode mode,
int timeoutMillis) |
String |
toString() |
public String getName()
public String getDescription()
public List<PcapAddress> getAddresses()
public ArrayList<LinkLayerAddress> getLinkLayerAddresses()
public boolean isLoopBack()
public boolean isLocal()
public PcapHandle openLive(int snaplen, PcapNetworkInterface.PromiscuousMode mode, int timeoutMillis) throws PcapNativeException
snaplen
- Snapshot length, which is the number of bytes captured for each packet.mode
- modetimeoutMillis
- Read timeout. Most OSs buffer packets.
The OSs pass the packets to Pcap4j after the buffer gets full
or the read timeout expires.
Must be non-negative. May be ignored by some OSs.
0 means disable buffering on Solaris.
0 means infinite on the other OSs.
1 through 9 means infinite on Solaris.PcapNativeException
- if an error occurs in the pcap native library.Copyright © 2011–2016 Pcap4J.org. All rights reserved.