Module org.jnetpcap

Enum Class PcapMode

java.lang.Object
java.lang.Enum<PcapMode>
org.jnetpcap.constant.PcapMode
All Implemented Interfaces:
Serializable, Comparable<PcapMode>, Constable

public enum PcapMode extends Enum<PcapMode>
Pcap live capture mode flags.
Author:
Sly Technologies, repos@slytechs.com
  • Enum Constant Details

    • NON_PROMISCOUS

      public static final PcapMode NON_PROMISCOUS
      Flag used with openLive to specify that the interface should be put into non-promisuous mode.
    • PROMISCUOUS

      public static final PcapMode PROMISCUOUS
      Flag used with openLive to specify that the interface should be put into promisuous mode.
  • Field Details

    • PCAP_MODE_NON_PROMISCUOUS

      public static final int PCAP_MODE_NON_PROMISCUOUS
      Flag used with openLive to specify that the interface should be put into non-promisuous mode.
      See Also:
    • PCAP_MODE_PROMISCUOUS

      public static final int PCAP_MODE_PROMISCUOUS
      Flag used with openLive to specify that the interface should be put into promisuous mode.
      See Also:
  • Method Details

    • values

      public static PcapMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static PcapMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • valueOf

      public static PcapMode valueOf(int mode) throws IllegalArgumentException
      Converts numerical PCAP_MODE constant to an enum.
      Parameters:
      mode - the PCAP integer mode constant
      Returns:
      the pcap mode constant
      Throws:
      IllegalArgumentException - thrown if not found
    • toEnum

      public static Optional<PcapMode> toEnum(int mode)
      Converts numerical PCAP_MODE constant to an enum, if found.
      Parameters:
      mode - the PCAP integer mode constant
      Returns:
      the optional enum constant