Uses of Class
com.slytechs.sdk.jnetpcap.api.NetPcap

  • Uses of NetPcap in com.slytechs.sdk.jnetpcap.api

    Methods in com.slytechs.sdk.jnetpcap.api that return NetPcap
    Modifier and Type
    Method
    Description
    static NetPcap
    NetPcap.create(com.slytechs.sdk.jnetpcap.PcapIf device)
    Creates a capture handle for the specified device using two-stage configuration.
    static NetPcap
    NetPcap.create(com.slytechs.sdk.jnetpcap.PcapIf device, com.slytechs.sdk.protocol.core.PacketSettings settings)
    Creates a capture handle for the specified device with custom packet settings.
    static NetPcap
    NetPcap.create(String device)
    Creates a capture handle for the named device using two-stage configuration.
    static NetPcap
    NetPcap.create(String device, com.slytechs.sdk.protocol.core.PacketSettings settings)
    Creates a capture handle for the named device with custom packet settings.
    static NetPcap
    NetPcap.openDead(com.slytechs.sdk.jnetpcap.constant.PcapDlt linktype, int snaplen)
    Creates a "dead" handle for filter compilation or dump file writing.
    static NetPcap
    NetPcap.openDead(com.slytechs.sdk.jnetpcap.constant.PcapDlt linktype, int snaplen, com.slytechs.sdk.protocol.core.PacketSettings settings)
    Creates a "dead" handle with custom packet settings.
    static NetPcap
    NetPcap.openDeadWithTstampPrecision(com.slytechs.sdk.jnetpcap.constant.PcapDlt linktype, int snaplen, com.slytechs.sdk.jnetpcap.constant.PcapTStampPrecision precision)
    Creates a "dead" handle with specific timestamp precision.
    static NetPcap
    NetPcap.openDeadWithTstampPrecision(com.slytechs.sdk.jnetpcap.constant.PcapDlt linktype, int snaplen, com.slytechs.sdk.jnetpcap.constant.PcapTStampPrecision precision, com.slytechs.sdk.protocol.core.PacketSettings settings)
    Creates a "dead" handle with specific timestamp precision and custom packet settings.
    static NetPcap
    NetPcap.openLive(com.slytechs.sdk.jnetpcap.PcapIf device, int snaplen, boolean promisc, long timeout, TimeUnit unit)
    Opens a network interface for live packet capture.
    static NetPcap
    NetPcap.openLive(com.slytechs.sdk.jnetpcap.PcapIf device, int snaplen, boolean promisc, long timeout, TimeUnit unit, com.slytechs.sdk.protocol.core.PacketSettings settings)
    Opens a network interface for live packet capture with custom packet settings.
    static NetPcap
    NetPcap.openLive(String device, int snaplen, boolean promisc, long timeout, TimeUnit unit)
    Opens a network interface for live packet capture.
    static NetPcap
    NetPcap.openLive(String device, int snaplen, boolean promisc, long timeout, TimeUnit unit, com.slytechs.sdk.protocol.core.PacketSettings settings)
    Opens a network interface for live packet capture with custom packet settings.
    static NetPcap
    NetPcap.openLive(String device, int snaplen, boolean promisc, Duration timeout)
    Opens a network interface for live packet capture.
    static NetPcap
    NetPcap.openLive(String device, int snaplen, boolean promisc, Duration timeout, com.slytechs.sdk.protocol.core.PacketSettings settings)
    Opens a network interface for live packet capture with custom packet settings.
    static NetPcap
    NetPcap.openOffline(File file)
    Opens a pcap or pcapng capture file for reading.
    static NetPcap
    NetPcap.openOffline(File file, com.slytechs.sdk.protocol.core.PacketSettings settings)
    Opens a capture file for reading with custom packet settings.
    static NetPcap
    NetPcap.openOffline(String fname)
    Opens a pcap or pcapng capture file for reading.
    static NetPcap
    NetPcap.openOffline(String fname, com.slytechs.sdk.protocol.core.PacketSettings settings)
    Opens a capture file for reading with custom packet settings.
    NetPcap.perror(String prefix)
    Prints error message to stderr.
    NetPcap.setBufferSize(int bufferSize)
    Sets the kernel buffer size for the capture.
    NetPcap.setBufferSize(long size, com.slytechs.sdk.common.memory.MemoryUnit unit)
    Sets the kernel capture buffer size.
    NetPcap.setDatalink(int dlt)
    Sets the data link type for the capture.
    NetPcap.setDatalink(com.slytechs.sdk.jnetpcap.constant.PcapDlt dlt)
    Sets the data link type.
    NetPcap.setDatalink(Optional<com.slytechs.sdk.jnetpcap.constant.PcapDlt> dlt)
    Sets the data link type using an Optional.
    NetPcap.setDirection(int dir)
    Sets the capture direction.
    NetPcap.setDirection(com.slytechs.sdk.jnetpcap.constant.PcapDirection dir)
    Sets the capture direction.
    NetPcap.setDirection(Optional<com.slytechs.sdk.jnetpcap.constant.PcapDirection> dir)
    Sets the capture direction using an Optional.
    NetPcap.setFilter(com.slytechs.sdk.jnetpcap.BpFilter bpfProgram)
    Sets the BPF filter program.
    NetPcap.setFilter(String expression)
    Compiles and applies a BPF filter expression.
    NetPcap.setFilter(String expression, boolean optimize)
    Compiles and applies a BPF filter expression with optimization control.
    NetPcap.setFilter(Optional<com.slytechs.sdk.jnetpcap.BpFilter> bpfProgram)
    Sets the BPF filter using an Optional.
    NetPcap.setImmediateMode(boolean enable)
    Enables or disables immediate mode.
    NetPcap.setNonBlock(boolean nonBlock)
    Enables or disables non-blocking mode.
    NetPcap.setPromisc(boolean promiscuousMode)
    Enables or disables promiscuous mode.
    NetPcap.setRfmon(boolean rfMonitor)
    Enables or disables monitor mode (wireless).
    NetPcap.setSnaplen(int snaplen)
    Sets the snapshot length.
    NetPcap.setTimeout(int timeoutInMillis)
    Sets the read timeout in milliseconds.
    NetPcap.setTimeout(long timeout, TimeUnit unit)
    Sets the read timeout with an explicit time unit.
    NetPcap.setTimeout(Duration timeout)
    Sets the read timeout using a Duration.
    NetPcap.setTstampPrecision(com.slytechs.sdk.jnetpcap.constant.PcapTStampPrecision precision)
    Sets the timestamp precision.
    NetPcap.setTstampType(com.slytechs.sdk.jnetpcap.constant.PcapTstampType type)
    Sets the timestamp type.
    Sets the uncaught exception handler.
    NetPcap.setUncaughtExceptionHandler(Consumer<? super Throwable> exceptionHandler)
    Sets the uncaught exception handler using a Consumer.