Uses of Class
org.jnetpcap.PcapException
Package
Description
The Packet Capture library provides a high level interface to packet capture
systems.
Utilities for jNetPcap library
Provides support for Pcap on Microsoft Windows platforms.
-
Uses of PcapException in org.jnetpcap
Modifier and TypeClassDescriptionclass
Indicates that an operation is not permitted on an already activated pcap handle.Modifier and TypeMethodDescriptionvoid
Pcap.activate()
Activate a capture handlevoid
Pcap1_0.activate()
Activate.boolean
Pcap.canSetRfmon()
check whether monitor mode can be set for a not-yet-activated capture handle.final boolean
Pcap1_0.canSetRfmon()
Can set rfmon.Compile a filter expression without a netmask.Compile a filter expression with netmask.final BpFilter
Compile.static BpFilter
Pcap.compileNoPcap
(int snaplen, PcapDlt pcapDlt, String str, boolean optimize, int netmask) Deprecated.static BpFilter
Pcap0_5.compileNoPcap
(int snaplen, PcapDlt pcapDlt, String str, boolean optimize, int netmask) Compile a filter expression against a dead handle opened usingopenDead
.static Pcap
Create a live capture handle.static Pcap
Create a live capture handle.static Pcap.Linux
Create a live capture handle.static Pcap.Unix
Create a live capture handle.static Pcap1_0
Create a live capture handle.static Pcap1_2
Create a live capture handle.static Pcap1_5
Create a live capture handle.static Pcap1_9
Create a live capture handle.Pcap.datalink()
Get the link-layer header type.final PcapDlt
Pcap0_4.datalink()
Datalink.Pcap.dataLinkExt()
Gets the link-layer header type for the live capture or ``savefile''.final PcapDlt
Pcap1_0.dataLinkExt()
Data link ext.final int
Pcap0_4.datalinkGetAsInt()
Get the link-layer header type.<U> int
Pcap.dispatch
(int count, PcapDumper pcapDumper) Process packets from a live capture or savefile and save them directly to dump file.<U> int
Pcap.dispatch
(int count, PcapHandler.OfArray<U> handler, U user) Process packets from a live capture or savefile and copy to a newly allocated array and dispatches to handler.<U> int
Pcap.dispatch
(int count, PcapHandler.OfMemorySegment<U> handler, U user) Process packets from a live capture or savefile and dispatch directly to handler.<U> int
Pcap0_4.dispatch
(int count, PcapHandler.OfMemorySegment<U> handler, U user) Dispatch.Open a file to which to write packets.final PcapDumper
Dump open.final MemorySegmentPREVIEW
Pcap0_4.file()
Get the OS standard I/O stream for a savefile being read.final int
Pcap0_4.fileno()
Get the file descriptor for a live capture.Pcap.findAllDevs()
Constructs a list of network devices that can be opened with pcap_create(3PCAP) and pcap_activate(3PCAP) or with pcap_open_live(3PCAP).Pcap0_7.findAllDevs()
Constructs a list of network devices that can be opened with pcap_create(3PCAP) and pcap_activate(3PCAP) or with pcap_open_live(3PCAP).Pcap.findAllDevsEx
(String source, PcapSrc type, String username, String password) Create a list of network devices that can be opened withPcap#open
.boolean
Pcap.getNonBlock()
Gets the state of non-blocking mode on a capture device.final boolean
Pcap0_7.getNonBlock()
Gets the non block.final int
Pcap.Unix.getSelectableFd()
Gets the selectable fd.Pcap.getTstampPrecision()
Get the time stamp precision returned in captures.final PcapTStampPrecision
Pcap1_5.getTstampPrecision()
Gets the tstamp precision.static void
Pcap.init
(int opts) Initialize the native libpcap library.static void
Pcap.init
(PcapOption option) Initialize the native libpcap library.static void
Pcap1_0.init
(int opts) Initialize the native libpcap library.final int
Pcap.inject
(byte[] array) Transmit a packet.final int
Pcap.inject
(byte[] array, int offset, int length) Transmit a packet.int
Pcap.inject
(MemorySegmentPREVIEW packet, int length) Transmit a packet.final int
Pcap.inject
(ByteBuffer buf) Transmit a packet.int
Pcap0_9.inject
(MemorySegmentPREVIEW packet, int length) Inject.boolean
Pcap.isSwapped()
Find out whether a savefile has the native byte order.final boolean
Pcap0_4.isSwapped()
Checks if is swapped.Pcap.listDataLinks()
Get a list of link-layer header types supported by a capture device.Pcap0_8.listDataLinks()
List data links.Pcap.listTstampTypes()
Get a list of time stamp types supported by a capture device.final List
<PcapTstampType> Pcap1_2.listTstampTypes()
List tstamp types.static String
Pcap.lookupDev()
Deprecated.static String
Pcap0_4.lookupDev()
Find the default device on which to capture.static NetIp4Address
Find the IPv4 network number and netmask for a device.static NetIp4Address
Find the IPv4 network number and netmask for a device.static NetIp4Address
Find the IPv4 network number and netmask for a device.<U> int
Pcap.loop
(int count, PcapDumper pcapDumper) Process packets from a live capture or savefile and save them directly to dump file.<U> int
Pcap.loop
(int count, PcapHandler.OfArray<U> handler, U user) Process packets from a live capture or savefile and copy to a newly allocated array and dispatches to handler.int
Pcap.majorVersion()
Get the version number of a savefile.final int
Pcap0_4.majorVersion()
Major version.int
Pcap.minorVersion()
Get the version number of a savefile.final int
Pcap0_4.minorVersion()
Minor version.Pcap.next()
read the next packet from a handle.Pcap0_4.next()
Next.Pcap.nextEx()
Read the next packet from a pcap handle.Pcap0_8.nextEx()
Next ex.static Pcap.Linux
Open a fake pcap_t for compiling filters or opening a capture for output.static Pcap
Open a fake pcap_t for compiling filters or opening a capture for output.static Pcap.Unix
Open a fake pcap_t for compiling filters or opening a capture for output.static Pcap0_7
Open a fake pcap_t for compiling filters or opening a capture for output.static Pcap0_8
Open a fake pcap_t for compiling filters or opening a capture for output.static Pcap0_9
Open a fake pcap_t for compiling filters or opening a capture for output.static Pcap1_0
Open a fake pcap_t for compiling filters or opening a capture for output.static Pcap1_10
Open a fake pcap_t for compiling filters or opening a capture for output.static Pcap1_2
Open a fake pcap_t for compiling filters or opening a capture for output.static Pcap1_5
Open a fake pcap_t for compiling filters or opening a capture for output.static Pcap1_9
Open a fake pcap_t for compiling filters or opening a capture for output.static Pcap.Linux
Pcap.Linux.openDeadWithTstampPrecision
(PcapDlt linktype, int snaplen, PcapTStampPrecision precision) Open a fake pcap_t for compiling filters or opening a capture for output.static Pcap
Pcap.openDeadWithTstampPrecision
(PcapDlt linktype, int snaplen, PcapTStampPrecision precision) Open a fake pcap_t for compiling filters or opening a capture for output.static Pcap.Unix
Pcap.Unix.openDeadWithTstampPrecision
(PcapDlt linktype, int snaplen, PcapTStampPrecision precision) Open a fake pcap_t for compiling filters or opening a capture for output.static Pcap1_10
Pcap1_10.openDeadWithTstampPrecision
(PcapDlt linktype, int snaplen, PcapTStampPrecision precision) Open a fake pcap_t for compiling filters or opening a capture for output.static Pcap1_5
Pcap1_5.openDeadWithTstampPrecision
(PcapDlt linktype, int snaplen, PcapTStampPrecision precision) Open a fake pcap_t for compiling filters or opening a capture for output.static Pcap1_9
Pcap1_9.openDeadWithTstampPrecision
(PcapDlt linktype, int snaplen, PcapTStampPrecision precision) Open a fake pcap_t for compiling filters or opening a capture for output.static Pcap.Linux
Open a device for capturing.static Pcap
Open a device for capturing.static Pcap
Open a device for capturing.static Pcap.Unix
Open a device for capturing.static Pcap0_4
Open a device for capturing.static Pcap0_5
Open a device for capturing.static Pcap0_6
Open a device for capturing.static Pcap0_7
Open a device for capturing.static Pcap0_8
Open a device for capturing.static Pcap0_9
Open a device for capturing.static Pcap1_0
Open a device for capturing.static Pcap1_10
Open a device for capturing.static Pcap1_2
Open a device for capturing.static Pcap1_5
Open a device for capturing.static Pcap1_9
Open a device for capturing.static Pcap.Linux
Pcap.Linux.openOffline
(String fname) Open a saved capture file for reading.static Pcap
Pcap.openOffline
(File file) Open a saved capture file for reading.static Pcap
Pcap.openOffline
(String fname) Open a saved capture file for reading.static Pcap.Unix
Pcap.Unix.openOffline
(String fname) Open a saved capture file for reading.static Pcap0_4
Pcap0_4.openOffline
(String fname) Open a saved capture file for reading.static Pcap0_5
Pcap0_5.openOffline
(String fname) Open a saved capture file for reading.static Pcap0_6
Pcap0_6.openOffline
(String fname) Open a saved capture file for reading.static Pcap0_7
Pcap0_7.openOffline
(String fname) Open a saved capture file for reading.static Pcap0_8
Pcap0_8.openOffline
(String fname) Open a saved capture file for reading.static Pcap1_0
Pcap1_0.openOffline
(String fname) Open a saved capture file for reading.static Pcap1_10
Pcap1_10.openOffline
(String fname) Open a saved capture file for reading.static Pcap1_2
Pcap1_2.openOffline
(String fname) Open a saved capture file for reading.static Pcap1_5
Pcap1_5.openOffline
(String fname) Open a saved capture file for reading.static Pcap1_9
Pcap1_9.openOffline
(String fname) Open a saved capture file for reading.final ByteOrder
Pcap.order()
Returns theByteOrder
of the current capture based on results fromPcap.isSwapped()
method call.final void
Pcap.sendPacket
(byte[] buf) Transmit a packet.final void
Pcap.sendPacket
(byte[] buf, int offset, int length) Transmit a packet.void
Pcap.sendPacket
(MemorySegmentPREVIEW packet, int length) Transmit a packet.final void
Pcap.sendPacket
(ByteBuffer buf) Transmit a packet.void
Pcap0_8.sendPacket
(MemorySegmentPREVIEW packet, int length) Send packet.Pcap.setBufferSize
(int bufferSize) Sets the buffer size for a not-yet- activated capture handle.final Pcap1_0
Pcap1_0.setBufferSize
(int bufferSize) Pcap.setDatalink
(int dlt) Set the link-layer header type to be used by a capture device .Pcap.setDatalink
(Optional<PcapDlt> dlt) Set the link-layer header type to be used by a capture device .Pcap.setDatalink
(PcapDlt dlt) Set the link-layer header type to be used by a capture device .final Pcap0_8
Pcap0_8.setDatalink
(int dlt) Sets the datalink.Pcap.setDirection
(int dir) pcap_setdirection() is used to specify a direction that packets will be captured.Pcap.setDirection
(Optional<PcapDirection> dir) Set the direction for which packets will be captured.Pcap.setDirection
(PcapDirection dir) Set the direction for which packets will be captured.Pcap0_9.setDirection
(int dir) Sets the direction.set the filter.set the filter.final Pcap0_4
Sets the filter.Pcap.setImmediateMode
(boolean enable) Set immediate mode for a not-yet- activated capture handle.final Pcap1_5
Pcap1_5.setImmediateMode
(boolean enable) Sets the immediate mode.Pcap.setNonBlock
(boolean blockMode) Sets the state of non-blocking mode on a capture device.final Pcap0_7
Pcap0_7.setNonBlock
(boolean b) Sets the non block.Pcap.setPromisc
(boolean promiscousMode) Set promiscuous mode for a not-yet-activated capture handle.final Pcap1_0
Pcap1_0.setPromisc
(boolean b) Sets the promisc.final Pcap1_0
Pcap1_0.setPromisc
(int enable) Set promiscuous mode for a not-yet-activated capture handle.int
Pcap.Linux.setProtocolLinux
(int protocol) Set capture protocol for a not-yet-activated capture handle.Pcap.setRfmon
(boolean rfMonitor) Set monitor mode for a not-yet-activated capture handle.final Pcap1_0
Pcap1_0.setRfmon
(boolean enableRfmon) Sets the rfmon.final Pcap1_0
Pcap1_0.setRfmon
(int enableRfmon) Set monitor mode for a not-yet-activated capture handle.Pcap.setSnaplen
(int snaplen) Set the snapshot length for a not-yet-activated capture handle.final Pcap1_0
Pcap1_0.setSnaplen
(int snaplen) Sets the snaplen.Pcap.setTimeout
(int timeoutInMillis) Set the packet buffer timeout for a not-yet-activated capture handle.final Pcap1_0
Pcap1_0.setTimeout
(int timeout) Sets the timeout.Pcap.setTstampPrecision
(PcapTStampPrecision precision) Set the time stamp precision returned in captures.final Pcap
Pcap1_5.setTstampPrecision
(PcapTStampPrecision precision) Sets the tstamp precision.Pcap.setTstampType
(PcapTstampType type) Set the time stamp type to be used by a capture device.final Pcap
Pcap1_2.setTstampType
(PcapTstampType type) Sets the tstamp type.int
Pcap.snapshot()
Get the snapshot length.final int
Pcap0_4.snapshot()
Snapshot.Pcap.stats()
Get capture statistics.final PcapStat
Pcap0_4.stats()
Stats.static void
PcapException.throwIfNotOk
(int code) Throw if not ok.static void
PcapException.throwIfNotOk
(int code, Supplier<String> message) Throw if not ok.static void
PcapException.throwIfNotOk
(PcapCode code, Supplier<String> message) Throw if not ok. -
Uses of PcapException in org.jnetpcap.util
Modifier and TypeClassDescriptionfinal class
Indicates that installed runtime version of jNetPcap library is incompatible with the client application version of jNetPcap being used. -
Uses of PcapException in org.jnetpcap.windows
Modifier and TypeMethodDescriptionstatic Npcap
Create a live capture handle.static Npcap
Create a live capture handle.static WinPcap
Create a live capture handle.static String
WinPcap.createSrcStr
(PcapSrc type, String host, String port, String name) Accept a set of strings (host name, port, ...), and it returns the complete source string according to the new format (e.g.WinPcap.findAllDevsEx
(String source, PcapSrc type, String username, String password) Create a list of network devices that can be opened with#openopen
.WinPcap.getEvent()
Return the handle of the event associated with the interfacePcap
.void
Save a capture to file.static Npcap
Open a fake pcap_t for compiling filters or opening a capture for output.static WinPcap
Open a fake pcap_t for compiling filters or opening a capture for output.static Npcap
Npcap.openDeadWithTstampPrecision
(PcapDlt linktype, int snaplen, PcapTStampPrecision precision) Open a fake pcap_t for compiling filters or opening a capture for output.static Npcap
Open a device for capturing.static WinPcap
Open a device for capturing.static Npcap
Npcap.openOffline
(String fname) Open a saved capture file for reading.static WinPcap
WinPcap.openOffline
(String fname) Open a saved capture file for reading.static PcapRmt.Source
WinPcap.parseSrcStr
(String source) Parse the source string and returns the pieces in which the source can be split.void
WinPcap.setBuff
(int dim) Set the size of the kernel buffer associated with an adapter.void
WinPcap.setMinToCopy
(int size) Set the minumum amount of data received by the kernel in a single call.void
WinPcap.setMode
(int mode) Set the working mode of the interface p to mode.void
WinPcap.setMode
(WinPcapMode winPcapMode) Set the working mode of the interface p to mode.WinPcap.statsEx()
Return statistics on current capture.
Pcap.findAllDevs()
and use the first device