public final class PcapNetworkInterface
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
PcapNetworkInterface.PromiscuousMode |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
java.util.List<PcapAddress> |
getAddresses() |
java.lang.String |
getDescription() |
java.util.ArrayList<LinkLayerAddress> |
getLinkLayerAddresses() |
java.lang.String |
getName() |
int |
hashCode() |
boolean |
isLocal() |
boolean |
isLoopBack()
Returns if this network interface is loopback.
|
boolean |
isRunning()
Returns if this network interface is running.
|
boolean |
isUp()
Returns if this network interface is up.
|
PcapHandle |
openLive(int snaplen,
PcapNetworkInterface.PromiscuousMode mode,
int timeoutMillis) |
java.lang.String |
toString() |
public java.lang.String getName()
public java.lang.String getDescription()
public java.util.List<PcapAddress> getAddresses()
public java.util.ArrayList<LinkLayerAddress> getLinkLayerAddresses()
public boolean isLoopBack()
public boolean isUp()
public boolean isRunning()
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.public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.ObjectCopyright © 2011 - 2018 Pcap4J.org. All rights reserved.