Uses of Class
org.jnetpcap.PcapException
Packages that use 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
Subclasses of PcapException in org.jnetpcapModifier and TypeClassDescriptionclassIndicates that an operation is not permitted on an already activated pcap handle.Methods in org.jnetpcap that throw PcapExceptionModifier and TypeMethodDescriptionvoidPcap.activate()Activate a capture handlevoidPcap1_0.activate()Activate.booleanPcap.canSetRfmon()check whether monitor mode can be set for a not-yet-activated capture handle.final booleanPcap1_0.canSetRfmon()Can set rfmon.Compile a filter expression without a netmask.Compile a filter expression with netmask.final BpFilterCompile.static BpFilterPcap.compileNoPcap(int snaplen, PcapDlt pcapDlt, String str, boolean optimize, int netmask) Deprecated.static BpFilterPcap0_5.compileNoPcap(int snaplen, PcapDlt pcapDlt, String str, boolean optimize, int netmask) Compile a filter expression against a dead handle opened usingopenDead.static PcapCreate a live capture handle.static PcapCreate a live capture handle.static Pcap.LinuxCreate a live capture handle.static Pcap.UnixCreate a live capture handle.static Pcap1_0Create a live capture handle.protected static <T extends Pcap>
TPcap1_0.create(Pcap0_4.PcapSupplier<T> factory, String device) Creates the.static Pcap1_2Create a live capture handle.static Pcap1_5Create a live capture handle.static Pcap1_9Create a live capture handle.Pcap.datalink()Get the link-layer header type.final PcapDltPcap0_4.datalink()Datalink.Pcap.dataLinkExt()Gets the link-layer header type for the live capture or ``savefile''.final PcapDltPcap1_0.dataLinkExt()Data link ext.final intPcap0_4.datalinkGetAsInt()Get the link-layer header type.<U> intPcap.dispatch(int count, PcapDumper pcapDumper) Process packets from a live capture or savefile and save them directly to dump file.<U> intPcap.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> intPcap.dispatch(int count, PcapHandler.OfMemorySegment<U> handler, U user) Process packets from a live capture or savefile and dispatch directly to handler.<U> intPcap0_4.dispatch(int count, PcapHandler.OfMemorySegment<U> handler, U user) Dispatch.Open a file to which to write packets.final PcapDumperDump open.final MemorySegmentPcap0_4.file()Get the OS standard I/O stream for a savefile being read.final intPcap0_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.booleanPcap.getNonBlock()Gets the state of non-blocking mode on a capture device.final booleanPcap0_7.getNonBlock()Gets the non block.final intPcap.Unix.getSelectableFd()Gets the selectable fd.protected intPcap0_8.getSelectableFd()Get a file descriptor on which a select() can be done for a live capture.Pcap.getTstampPrecision()Get the time stamp precision returned in captures.final PcapTStampPrecisionPcap1_5.getTstampPrecision()Gets the tstamp precision.static voidPcap.init(int opts) Initialize the native libpcap library.static voidPcap.init(PcapOption option) Initialize the native libpcap library.static voidPcap1_0.init(int opts) Initialize the native libpcap library.final intPcap.inject(byte[] array) Transmit a packet.final intPcap.inject(byte[] array, int offset, int length) Transmit a packet.intPcap.inject(MemorySegment packet, int length) Transmit a packet.final intPcap.inject(ByteBuffer buf) Transmit a packet.intPcap0_9.inject(MemorySegment packet, int length) Inject.booleanPcap.isSwapped()Find out whether a savefile has the native byte order.final booleanPcap0_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 StringPcap.lookupDev()Deprecated.static StringPcap0_4.lookupDev()Find the default device on which to capture.static NetIp4AddressFind the IPv4 network number and netmask for a device.static NetIp4AddressFind the IPv4 network number and netmask for a device.static NetIp4AddressFind the IPv4 network number and netmask for a device.<U> intPcap.loop(int count, PcapDumper pcapDumper) Process packets from a live capture or savefile and save them directly to dump file.<U> intPcap.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.intPcap.majorVersion()Get the version number of a savefile.final intPcap0_4.majorVersion()Major version.intPcap.minorVersion()Get the version number of a savefile.final intPcap0_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.LinuxOpen a fake pcap_t for compiling filters or opening a capture for output.static PcapOpen a fake pcap_t for compiling filters or opening a capture for output.static Pcap.UnixOpen a fake pcap_t for compiling filters or opening a capture for output.protected static <T extends Pcap>
TPcap0_6.openDead(Pcap0_4.PcapSupplier<T> factory, PcapDlt linktype, int snaplen) Open a fake pcap_t for compiling filters or opening a capture for output.static Pcap0_7Open a fake pcap_t for compiling filters or opening a capture for output.static Pcap0_8Open a fake pcap_t for compiling filters or opening a capture for output.static Pcap0_9Open a fake pcap_t for compiling filters or opening a capture for output.static Pcap1_0Open a fake pcap_t for compiling filters or opening a capture for output.static Pcap1_10Open a fake pcap_t for compiling filters or opening a capture for output.static Pcap1_2Open a fake pcap_t for compiling filters or opening a capture for output.static Pcap1_5Open a fake pcap_t for compiling filters or opening a capture for output.static Pcap1_9Open a fake pcap_t for compiling filters or opening a capture for output.static Pcap.LinuxPcap.Linux.openDeadWithTstampPrecision(PcapDlt linktype, int snaplen, PcapTStampPrecision precision) Open a fake pcap_t for compiling filters or opening a capture for output.static PcapPcap.openDeadWithTstampPrecision(PcapDlt linktype, int snaplen, PcapTStampPrecision precision) Open a fake pcap_t for compiling filters or opening a capture for output.static Pcap.UnixPcap.Unix.openDeadWithTstampPrecision(PcapDlt linktype, int snaplen, PcapTStampPrecision precision) Open a fake pcap_t for compiling filters or opening a capture for output.static Pcap1_10Pcap1_10.openDeadWithTstampPrecision(PcapDlt linktype, int snaplen, PcapTStampPrecision precision) Open a fake pcap_t for compiling filters or opening a capture for output.static Pcap1_5Pcap1_5.openDeadWithTstampPrecision(PcapDlt linktype, int snaplen, PcapTStampPrecision precision) Open a fake pcap_t for compiling filters or opening a capture for output.protected static <T extends Pcap>
TPcap1_5.openDeadWithTstampPrecision(Pcap0_4.PcapSupplier<T> factory, PcapDlt linktype, int snaplen, PcapTStampPrecision precision) Open a fake pcap_t for compiling filters or opening a capture for output.static Pcap1_9Pcap1_9.openDeadWithTstampPrecision(PcapDlt linktype, int snaplen, PcapTStampPrecision precision) Open a fake pcap_t for compiling filters or opening a capture for output.static Pcap.LinuxOpen a device for capturing.static PcapOpen a device for capturing.static PcapOpen a device for capturing.static PcapOpen a device for capturing.static Pcap.UnixOpen a device for capturing.static Pcap0_4Open a device for capturing.protected static <T extends Pcap>
TPcap0_4.openLive(Pcap0_4.PcapSupplier<T> pcapSupplier, String device, int snaplen, boolean promisc, long timeout, TimeUnit unit) Open live.static Pcap0_5Open a device for capturing.static Pcap0_6Open a device for capturing.static Pcap0_7Open a device for capturing.static Pcap0_8Open a device for capturing.static Pcap0_9Open a device for capturing.static Pcap1_0Open a device for capturing.static Pcap1_10Open a device for capturing.static Pcap1_2Open a device for capturing.static Pcap1_5Open a device for capturing.static Pcap1_9Open a device for capturing.static Pcap.LinuxPcap.Linux.openOffline(String fname) Open a saved capture file for reading.static PcapPcap.openOffline(File file) Open a saved capture file for reading.static PcapPcap.openOffline(String fname) Open a saved capture file for reading.static Pcap.UnixPcap.Unix.openOffline(String fname) Open a saved capture file for reading.static Pcap0_4Pcap0_4.openOffline(String fname) Open a saved capture file for reading.protected static <T extends Pcap>
TPcap0_4.openOffline(Pcap0_4.PcapSupplier<T> pcapSupplier, String fname) open a saved capture file for reading.static Pcap0_5Pcap0_5.openOffline(String fname) Open a saved capture file for reading.static Pcap0_6Pcap0_6.openOffline(String fname) Open a saved capture file for reading.static Pcap0_7Pcap0_7.openOffline(String fname) Open a saved capture file for reading.static Pcap0_8Pcap0_8.openOffline(String fname) Open a saved capture file for reading.static Pcap1_0Pcap1_0.openOffline(String fname) Open a saved capture file for reading.static Pcap1_10Pcap1_10.openOffline(String fname) Open a saved capture file for reading.static Pcap1_2Pcap1_2.openOffline(String fname) Open a saved capture file for reading.static Pcap1_5Pcap1_5.openOffline(String fname) Open a saved capture file for reading.static Pcap1_9Pcap1_9.openOffline(String fname) Open a saved capture file for reading.final ByteOrderPcap.order()Returns theByteOrderof the current capture based on results fromPcap.isSwapped()method call.final voidPcap.sendPacket(byte[] buf) Transmit a packet.final voidPcap.sendPacket(byte[] buf, int offset, int length) Transmit a packet.voidPcap.sendPacket(MemorySegment packet, int length) Transmit a packet.final voidPcap.sendPacket(ByteBuffer buf) Transmit a packet.voidPcap0_8.sendPacket(MemorySegment packet, int length) Send packet.Pcap.setBufferSize(int bufferSize) Sets the buffer size for a not-yet- activated capture handle.final Pcap1_0Pcap1_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_8Pcap0_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_4Sets the filter.Pcap.setImmediateMode(boolean enable) Set immediate mode for a not-yet- activated capture handle.final Pcap1_5Pcap1_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_7Pcap0_7.setNonBlock(boolean b) Sets the non block.Pcap.setPromisc(boolean promiscousMode) Set promiscuous mode for a not-yet-activated capture handle.final Pcap1_0Pcap1_0.setPromisc(boolean b) Sets the promisc.final Pcap1_0Pcap1_0.setPromisc(int enable) Set promiscuous mode for a not-yet-activated capture handle.intPcap.Linux.setProtocolLinux(int protocol) Set capture protocol for a not-yet-activated capture handle.protected intPcap0_9.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_0Pcap1_0.setRfmon(boolean enableRfmon) Sets the rfmon.final Pcap1_0Pcap1_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_0Pcap1_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_0Pcap1_0.setTimeout(int timeout) Sets the timeout.Pcap.setTstampPrecision(PcapTStampPrecision precision) Set the time stamp precision returned in captures.final PcapPcap1_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 PcapPcap1_2.setTstampType(PcapTstampType type) Sets the tstamp type.intPcap.snapshot()Get the snapshot length.final intPcap0_4.snapshot()Snapshot.Pcap.stats()Get capture statistics.final PcapStatPcap0_4.stats()Stats.static voidPcapException.throwIfNotOk(int code) Throw if not ok.static voidPcapException.throwIfNotOk(int code, Supplier<String> message) Throw if not ok.static voidPcapException.throwIfNotOk(PcapCode code, Supplier<String> message) Throw if not ok. -
Uses of PcapException in org.jnetpcap.internal
Methods in org.jnetpcap.internal that throw PcapExceptionModifier and TypeMethodDescriptionstatic UnsafePcapHandleCreate a live capture handle.intUnsafePcapHandle.inject(MemorySegment packet, int length) Inject.PcapDispatcher.next()Next.StandardPcapDispatcher.next()Next.PcapDispatcher.nextEx()Next ex.StandardPcapDispatcher.nextEx()Next ex.static UnsafePcapHandleUnsafePcapHandle.openOffline(String fname) Open a saved capture file for reading.voidUnsafePcapHandle.sendPacket(MemorySegment packet, int length) Send packet. -
Uses of PcapException in org.jnetpcap.util
Subclasses of PcapException in org.jnetpcap.utilModifier and TypeClassDescriptionfinal classIndicates 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
Methods in org.jnetpcap.windows that throw PcapExceptionModifier and TypeMethodDescriptionstatic NpcapCreate a live capture handle.static NpcapCreate a live capture handle.static WinPcapCreate a live capture handle.static StringWinPcap.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.voidSave a capture to file.static NpcapOpen a fake pcap_t for compiling filters or opening a capture for output.static WinPcapOpen a fake pcap_t for compiling filters or opening a capture for output.static NpcapNpcap.openDeadWithTstampPrecision(PcapDlt linktype, int snaplen, PcapTStampPrecision precision) Open a fake pcap_t for compiling filters or opening a capture for output.static NpcapOpen a device for capturing.static WinPcapOpen a device for capturing.static NpcapNpcap.openOffline(String fname) Open a saved capture file for reading.static WinPcapWinPcap.openOffline(String fname) Open a saved capture file for reading.static PcapRmt.SourceWinPcap.parseSrcStr(String source) Parse the source string and returns the pieces in which the source can be split.voidWinPcap.setBuff(int dim) Set the size of the kernel buffer associated with an adapter.voidWinPcap.setMinToCopy(int size) Set the minumum amount of data received by the kernel in a single call.voidWinPcap.setMode(int mode) Set the working mode of the interface p to mode.voidWinPcap.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